Another day, another agentic Framework released... In - oh yeah, the best language that exists - python. Seriously though, its one of the better ones.
Agents in PydanticAI are ReAct agents, so the LLMs are able to call tools (python functions), see the output and make a decision to end the conversation or make another tool (function) call.
Agents in Pydantic AI consist of 5 things:
Its really fast to create this type of agent, and it supports streaming and async execution straight away. I usually use LangGraph, which I prefer for its graph execution setup, however, the abstractions are much simplier for this framework and because it supports streaming I will probably be using it for anything that doesnt require (as pydantic puts it) a 'nail gun' (their grpah execution setup) over a hammer (standard agent).
The framework supports two different paradigms for a multi-agent setup:
𝘿𝙚𝙡𝙚𝙜𝙖𝙩𝙞𝙤𝙣: One agent can ask a question of another agent down and back up a chain, but you cannot create cyclic graphs. This isnt a new abstraction but is supported with their simple API.
𝗚𝗿𝗮𝗽𝗵:You can create a more complex agents using their graph abstraction, which works the same way as LangGraph. The difference between this abstraction and LangGraph is that there are no explicitly defined edges with this framework, which I dont know if I am a fan of personally.You can also just join togethere their lower level API abstraction to create your own multi-agent setup.