Pydantic AI
Most agent frameworks ask you to learn their abstractions before you can write a loop. Pydantic AI starts from a different premise: you already know how to write typed Python, so an agent should look like typed Python. It comes from the team behind Pydantic, the validation library most of the Python AI stack already depends on.
What it actually provides
The framework is deliberately thin, and the type system does the heavy lifting:
- Structured results — you declare the output as a Pydantic model and get a validated object back, with the model re-prompted when validation fails.
- Tools as plain functions, their schemas derived from the signature and docstring rather than hand-written JSON.
- Dependency injection, so a tool receives a database connection or an HTTP client instead of reaching for a global.
- Model-agnostic calls across OpenAI, Anthropic, Gemini and others behind one interface.
Where it fits
It sits at the opposite end of the spectrum from a graph-based orchestrator like LangGraph. There is no visual topology and no sprawling chain abstraction — control flow stays in ordinary Python, which makes an agent debuggable with a breakpoint and testable with the same tools as the rest of the codebase. That suits agents whose value is a reliable typed answer feeding downstream code, rather than open-ended multi-agent exploration. Its tracing goes to Logfire, the same team's observability product, which matters when a loop misbehaves and you need to see every call it made.
Pydantic AI is a Python agent framework from the makers of the Pydantic validation library. It defines agents in ordinary typed Python: tool schemas are derived from function signatures, outputs are declared as Pydantic models and validated — with a retry when validation fails — and dependencies are injected rather than hidden in globals. It is a thin, type-first alternative to graph-based orchestrators, suited to agents that must return structured results to downstream code.
If you hire a builder, you want the job done to spec — not roughly, and not in a form you then have to tidy up. Pydantic AI is a toolkit for building AI agents with that attitude.
It is for programmers, and its selling point is strictness. You write down exactly what shape the answer must take, and the toolkit checks the AI's reply against it. If the reply does not fit, it asks again rather than passing on something broken.
That makes it popular where an agent's output feeds other software, which has no patience for a nearly-right answer.