Pydantic AI
Typed Python agent loop with a snap-on Coder harness
AI Agents / Coding Agents · OSS/MIT · 20.8k
Reviewed 2026-09-03 · last push 2026-10-21 · repo checked 2026-10-21
What's Good
This is a different product from Pydantic-the-validator already on the Python stack. Core is a typed agent loop: structured output, typed deps, typed tools, model as a string swap (OpenAI, Anthropic, Gemini, Bedrock, Groq, Ollama, and more). Pydantic AI Harness snaps on Coder—workspace-rooted files, allowlisted shell, repo orientation, planning, sub-agents, context management—as a regular combined capability you can use whole or take apart (FileSystem, Shell, RepoContext, Planning). Same agent runs as CLI (clai), web chat, realtime voice, or a durable Temporal/DBOS/Prefect job. MIT.
The Catch
ACP (Agent Client Protocol, for editors like Zed) is experimental: it lives under pydantic_ai_harness.experimental.acp, may change or be removed in any release without a deprecation period, and importing it emits HarnessExperimentalWarning. Coder is a capability you assemble, not a turnkey SWE agent like OpenHands. Logfire is the convenient observability path; OpenTelemetry works with any backend. Do not confuse this gem with Pydantic validation.
Verdict
The typed Python agent SDK. Not the validator. ACP is still experimental.
Embed
Maintainer? Add the badge to your README. It is free, links to this review, and there is no paid version.
Markdown
[](https://stackgems.com/gems/pydantic-ai)
HTML
<a href="https://stackgems.com/gems/pydantic-ai"><img src="https://stackgems.com/badge/pydantic-ai.svg" alt="Pydantic AI reviewed on Stack Gems" height="20"></a>