Stack Gems
Menu
← Catalog

Pydantic AI

Typed Python agent loop with a snap-on Coder harness

AI Agents / Coding Agents · OSS/MIT · 19.7k

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

Reviewed on Stack Gems
[![Reviewed on Stack Gems](https://stackgems.com/badge/pydantic-ai.svg)](https://stackgems.com/gems/pydantic-ai)