Skip to content
All tags

#pydantic-ai

10 posts

Framework Update: Pydantic AI v2.52.0

Three things in Pydantic AI v2.52.0: (1) security — GHSA-v36g-jcw9-x7cw (moderate): attacker-controlled HTML with deeply nested elements fed into the local web_fetch tool could exhaust CPU/memory; provider-native web fetching is unaffected; patched in both 2.52.0 (v2) and 1.107.7 (v1); (2) a new Workspace abstraction — Coder/Shell/FileSystem and the rest of the harness now go through ctx.workspace, sharing one API across local execution and four sandbox backends (SSHWorkspace, BubblewrapSandbox, E2BSandbox, SpritesSandbox), with ModalSandboxSession renamed to ModalSandboxBackend; (3) pydantic-ai-harness jumps from 0.36.0 to 0.52.0 and now ships with every release, alongside the first pydantic-clai2 (`uvx pydantic-clai2`) CLI release, bundled with plugins like github, slack, notion, and logfire_mcp.

Framework Update: Pydantic AI v2.46.0

Three things worth knowing about Pydantic AI v2.46.0: (1) the previous release (2.45.0) introduced TypeSafeModel — a provider for TypeSafe's Jev, a classifier that answers typed questions instead of writing text — and this release fills in what it couldn't do yet: filling tool call arguments and picking a type before filling a union output; (2) a new `typesafe_boolean_threshold` turns the yes/no decision boundary from a fixed distance-from-0.5 into a tunable parameter; (3) `supports_text_output` lets `LLMJudge` and `GEval` run on models that don't produce text at all, so Jev can now serve as the judge model in evals. No breaking changes.

Framework Update: Pydantic AI v2.44.0

Pydantic AI v2.44.0 in three points: (1) four security patches, the most serious being `web_fetch` running both its HTML conversion and charset decoding in superlinear time on the event loop — an attacker-chosen page can stall every agent sharing that process; (2) three compatibility notes: `RunContext.enqueue()` is now safe to call from worker threads, UI adapter requests must carry a JSON `Content-Type`, and a capability's `@durable_operation` invoked from a per-request hook now dispatches properly instead of running inline; (3) a new Vercel AI SDK/Eve migration skill, and `AgentRunResult` now settles into a stable serialized shape.

Framework Update | Pydantic AI v2.42.0

Pydantic AI v2.42.0 highlights: (1) a new `GitHubCopilotProvider` lets Agents use GitHub Copilot's OpenAI-compatible API directly as a model backend; (2) `DeferredToolResults.approvals` now rejects invalid values outright — a compatibility change; (3) fixes for Bedrock Converse sampling settings, `$ref` resolution in code-mode function schemas, and lost Anthropic error-recovery state across normalized history.

Framework Update | Pydantic AI v2.40.0

Pydantic AI v2.40.0 highlights: (1) @agent.on_event decorator gives Agents native event listening; (2) realtime voice sessions now handle barge-in natively; (3) RealtimeSession.enqueue() lets external code inject out-of-band prompts. No breaking changes.

Framework Update | Pydantic AI 2.38.0

Pydantic AI 2.38.0 highlights: (1) new typed `CustomEvent`/`CapabilityEvent` — application code and capabilities can now emit custom events into the Agent's run event stream and subscribe with `@on_event`, filling in a general-purpose observability and extension layer; (2) `RunContext` gains `context_window_used` and `ModelProfile` gains `context_window`, so agent code can read how much of the model's context window remains, for the first time; (3) new model support for `gemini-3.8-flash`, Claude Fable 5.1, and Claude Mythos 5.1, plus a new `VLLMProvider`. No breaking changes in this release.

Framework Update | Pydantic AI 2.36.0

Pydantic AI 2.36.0 highlights: (1) new `@durable_operation` decorator turns any custom capability method into a replay-safe durable unit under Temporal/Prefect/DBOS and other engines; (2) a public backend API (`BaseDurabilityCapability`, `CallableOperationBackend`, `RegisteredOperationBackend`) lets third-party durable engines integrate with zero private imports — verified against three out-of-tree engines; (3) one compatibility tightening: MCP tools can no longer opt out of durable execution via tool metadata (previously allowed on DBOS), plus a Prefect dynamic-tool cache-key fix.

aideep-dive

Choosing an Agent Framework in 2026: LangGraph, CrewAI, MAF, AG2, Mastra, Pydantic AI, and DSPy

These seven tools are not one product category: LangGraph, MAF, and Mastra emphasize durable workflows; CrewAI and AG2 emphasize multi-agent collaboration; Pydantic AI emphasizes typed Python agents; DSPy optimizes AI programs against data and metrics. Choose the control model first.

aideep-dive

Pydantic AI: Building Python Agents with Types, Dependencies, and Validation

Pydantic AI models an agent as Agent[Deps, Output]: dependencies, tool inputs, and final outputs are typed, and model results must pass Pydantic validation.

aiguide

15 Agent Frameworks Worth Watching in 2026

Sorted by GitHub Stars, a survey of 15 mainstream AI Agent frameworks in 2026 — their positioning, key features, and ideal use cases. Not a ranking — it's a map.