I found that the PydanticAI [0] framework strikes a perfect balance between control and abstraction.
I’m building a non trivial AI app and the validation and dependency injection is such a great addition compared to using the LLM libraries directly.
They recently added MCP support: https://ai.pydantic.dev/mcp/
Have you tried it?
Not yet! Really looking forward to it. Their development pace is hard to keep up with.
Thanks, this looks great. I've been playing with Huggingface's Smolagents, which is fun to tinker with and relatively easy to read through. But it is so tightly coupled to its two agent implementations - ToolAgent and CodeAgent - that it's not trivial at all to add your own state transformations.
This framework looks really well designed, I'm going to take it for a spin.
The main problem that I found playing with smolagents is the lack of documentation and examples. Anyway the framework has potential
Thanks just discovered https://ai.pydantic.dev/graph/
from the above link, which seems to use FSMs instead of DAGs.
The one thing I wish was better developed is persistence and streaming - they give sample code to stream, but it’s essentially a complete implementation of streaming that every client needs to implement.