Skip to content

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.

Framework

PiPydantic AI and Harness SDK
LanguageTypeScriptPython
LicenseMITMIT
Model providersManyMany
ExtensibilityExtensions, skills, pi installCapabilities and toolsets; 50+ with the Harness SDK
HarnessesPi itself; extend it or embed itBuilt-in Coder and Researcher, or compose your own
ObservabilityTelemetry contract, no exporterOpenTelemetry, including Pydantic Logfire
Durable executionNo5+ integrations
InterfacesCLICLI, web chat, AG-UI, Vercel AI, ACP (experimental)
Realtime voiceNoRealtime
EvalsNoPydantic Evals
Image generationNoImage Generation

Features

PiPydantic AI and Harness SDK
Multi-agentNoSubagents, delegation, or pydantic-graph
PlanningNoPlanning
SkillsYesSkills
MemoryNoMemory
CompactionYesCompaction
GuardrailsYes (tool_call hook)Guardrails
Code sandboxesNoExecution environments
Browser useNoWeb & research

FAQ

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.