Show HN: AI-powered web service combining FastAPI, Pydantic-AI, and MCP servers
46 points| Aherontas | 5 months ago |github.com
To check the workshop, I put together a demo repo: (I will add the slides too soon in my blog: https://www.petrostechchronicles.com/) https://github.com/Aherontas/Pycon_Greece_2025_Presentation_...
The idea was to show how multiple AI agents can collaborate using FastAPI + Pydantic-AI, with protocols like MCP (Model Context Protocol) and A2A (Agent-to-Agent) for safe communication and orchestration.
Features:
- Multiple agents running in containers
- MCP servers (Brave search, GitHub, filesystem, etc.) as tools
- A2A communication between services
- Minimal UI for experimentation for Tech Trend - repo analysis
I built this repo because most agent frameworks look great in isolated demos, but fall apart when you try to glue agents together into a real application. My goal was to help people experiment with these patterns and move closer to real-world use cases.
It’s not production-grade, but would love feedback, criticism, or war stories from anyone who’s tried building actual multi-agent systems. Big questions:
Do you think agent-to-agent protocols like MCP/A2A will stick?
Or will the future be mostly single powerful LLMs with plugin stacks?
Thanks — excited to hear what the HN crowd thinks!
unknown|5 months ago
[deleted]
unknown|6 months ago
[deleted]
tcdent|5 months ago
Your views are not following a single convention: some of them return dictionaries, some return base JSONResponse objects, and others return properly defined Pydantic schemas. I didn't run the code, but I'd venture to guess your generated documentation is not comprehensive, nor is it cohesive.
I'd also further extend this into your agent services; passing bare dictionaries with arbitrary fields into what is supposed to be a modular logic handler is pretty outdated. You're defining a functional (methods) interface; data structures are the other half of the equation.
This plays into the way that Agents (as in the context of this system, versus Pydantic AI agents) are wrapped arbitrarily. I'd favor making the conversion from a Pydantic agent to a native agent part of the system's interface design, rather than re-implementing a subset of the agentic functions in your own BaseAgent and ending up with an `agent.agent` context.
Also, since this is a web-centric application (that leverages agents) dropping all of your view functions into main.py leaves something to be desired; break up your views into logical modules based on role.
Everyone's learning, and I hope this helps someone in their journey. Kudos for putting your code out there as a resource; some of us can't help ourselves from reading it.
Aherontas|5 months ago
Just to clarify: this repo is meant as a quick demo/learning resource after experimenting with Pydanticai(for some limited time), FastAPI, and agents. It’s not something I’d structure or ship in a production environment or at a real job in any case.
That said, your points are spot on:
- Consistency in return types (Pydantic schemas over mixed dicts/JSONResponse, which was done either because I glued code from other projects I had either from generated so if it is used from anyone in real case it needs refactoring).
Structuring data exchange between agents with typed models instead of raw dicts. (totally correct too)
Avoiding redundant abstractions in the agent base. (I wouldn't agree fully on that as it is an area that anyone can have different opinion on what is a redudant abstraction)
Breaking views into logical modules rather than dropping them all into main.py. (I fully agree again)
These are all best practices I’d absolutely follow in production code and more as the codebase is not 100% structured robustly, and it’s great to see them highlighted here so others reading can also learn from the contrast between “demo” and “real-world” implementations.
Again, thanks for diving in this kind of feedback is exactly what makes sharing experiments valuable.
morkalork|5 months ago
colonCapitalDee|5 months ago
gHA5|5 months ago
simple10|5 months ago
Would be great if you can add the slides or video of the presentation to the repo. Maybe also add a description and update the summary at the top?
It seems like the project is a multi-agent playground & demo to learn how to make AI agents work together?
Aherontas|5 months ago
dcreater|5 months ago
Aherontas|5 months ago
maverick98|5 months ago
Aherontas|5 months ago
vivzkestrel|5 months ago
Aherontas|5 months ago
Emma_Schmidt|5 months ago
[deleted]
Emma_Schmidt|5 months ago
[deleted]