Skip to content
StackPick

Pydantic AI

What shipped in Pydantic AI

Pydantic AI is an open-source Python library for building agents with typed inputs, outputs, and tools. It comes from the team behind Pydantic. Use it when the service is Python and you want the type checker involved. Use Mastra or the AI SDK when the service is TypeScript.

Pydantic AI scores 7.6 in Agent frameworks. Best for: Typed Python agents. 2 releases, newest first.

Pydantic AI review · LangChain vs Mastra · The best agent framework in 2026

Releases

  1. Pydantic AI

    Pydantic AI 2.71.0

    Released November 19, 2026. The GitHub release is titled 2026-11-18. GoogleModel supports Gemini 4 Neon (gemini-4-neon). ModelRouter routes agent runs. ToolBridge keeps the tool list fixed behind tool_search, tool_describe, and tool_call so the prompt cache holds for large or changing tool sets. PermissionRule in Harness Permissions can allow, ask about, or deny tool calls and shell commands. Goal keeps unattended runs working until a caller-defined completion check passes. RequireVerification sends a coding agent back to run its checks when it tries to finish after an unverified edit. ReportStaleFiles tells the model when workspace files it read change or are deleted. ReportRemainingBudget, ReportToolErrors, WrapUpAtLimits, LabelCrossModelHistory, CurrentTime, and DenyUnanswered are new harness capabilities. Shell(secret_env=) masks secrets it injects into tool results. Peers(network) joins an InMemoryPeerNetwork under the agent's name, and PeerNetwork is renamed PeerConnection. StavProvider and Otari are new gateway providers. Remote CodeMode turns run as Temporal activities. The release also includes a large compatibility and fix sweep for model providers, deferred tools, and Code Mode.

    Source for Pydantic AI 2.71.0 (opens in a new tab)
  2. Pydantic AI

    Pydantic AI 2.70.0

    Released November 17, 2026. Two high-severity fixes ship in pydantic-ai-harness 0.70.0. With strip_ansi set to true, ToolOutputLimits removed ANSI escape sequences with a pattern that took time quadratic in the length of a line, so a tool result of a few hundred kilobytes with many unterminated escape sequences could occupy the event loop for tens of seconds to minutes. The jwt pattern in secret redaction, included by default in redact_secrets and secret_data(), backtracked the same way on crafted text. The fixed pattern no longer matches a JWT whose header segment contains -eyJ. This release forwards service_tier to xAI and records the served tier, lets Skills read a loaded skill's bundled files when read_files is true and substitute ${SKILL_DIR}, lets a SpendLimits Budget resolve its ceiling from the run context, lets PlaywrightBrowser provision its CDP endpoint per run, lets a parent check a running background delegation with check_task and DelegationTasks.snapshot(), adds StreamGuardrail for streamed text, thinking, and tool-call parts, and adds PruneToolResults so the model can replace a tool result it just received with a summary. PostgresMemoryStore prefix filters can use an index. A finished sub-agent task can be resumed from message_task. The release also includes a large compatibility and fix sweep for model providers, file input, and harness tools.

    Source for Pydantic AI 2.70.0 (opens in a new tab)

Updated