Pydantic AI vs Pi
Pi is a TypeScript coding agent from Earendil Works: a terminal agent you extend with hooks, skills and packages, or embed through createAgentSession. In Pydantic AI, a coding agent is one configuration of a general Agent, and the skills, sandbox and sub-agents are each a capability you can swap.
Pydantic AI is one part of a stack: the Harness SDK for capabilities and complete agents, Pydantic Evals, Pydantic Graph, Pydantic Logfire for observability, and Pydantic itself for validation. The tables below cover the whole of it.
| Pi | Pydantic AI and Harness SDK | |
|---|---|---|
| Language | TypeScript | Python |
| License | MIT | MIT |
| Model providers | Many | Many |
| Extensibility | Extensions, skills, pi install | Capabilities and toolsets; 50+ with the Harness SDK |
| Harnesses | Pi itself; extend it or embed it | Built-in Coder and Researcher, or compose your own |
| Observability | Telemetry contract, no exporter | OpenTelemetry, including Pydantic Logfire |
| Durable execution | No | 5+ integrations |
| Interfaces | CLI | CLI, web chat, AG-UI, Vercel AI, ACP (experimental) |
| Realtime voice | No | Realtime |
| Evals | No | Pydantic Evals |
| Image generation | No | Image Generation |
| Pi | Pydantic AI and Harness SDK | |
|---|---|---|
| Multi-agent | No | Subagents, delegation, or pydantic-graph |
| Planning | No | Planning |
| Skills | Yes | Skills |
| Memory | No | Memory |
| Compaction | Yes | Compaction |
| Guardrails | Yes (tool_call hook) | Guardrails |
| Code sandboxes | No | Execution environments |
| Browser use | No | Web & research |
Can I build a coding agent like this in Python? Yes. Give your agent the
Coder() capability, or start from the harness
repository’s complete coding agent,
built from the pieces Coder puts together.