Head to head · Agent frameworks · October 2026 research run

OpenAI Agents SDK vs Pydantic AI

OpenAI Agents SDK scores 90 (AA) on agent readiness against Pydantic AI's 85.6 (AA), and leads in 4 of 7 scored categories. Pydantic AI leads on schema & documentation and security & auth. Both do agent frameworks.

Best agent frameworks and SDKs · All 190 frameworks comparisons

Which one, for what

OpenAI Agents SDK AA

Best for Teams that want hand-offs, guardrails and approvals with little code, and are happy with OpenAI's tracing or will turn it off.

Ahead on

  • Maintenance & community, 100 against 90

Also in its favour

  • No incidents deducted, where Pydantic AI loses 6 points for them

Watch for

Tracing on by default, with model and tool content, sent to OpenAI

Pydantic AI AA

Best for Python teams that want typed, validated outputs and tools, many model providers and durable runs on an engine they already use.

Ahead on

  • Schema & documentation, 100 against 95
  • Security & auth, 95 against 80

Also in its favour

  • No key needed to call it

Watch for

Python only, and 3.11 or newer since 2.55.0

Why the edge

Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.

Security & auth Pydantic AI +15

OpenAI Agents SDK 80

Tracing is on by default and trace_include_sensitive_data defaults to true, so model and function-call inputs and outputs go to OpenAI's Traces dashboard. OPENAI_AGENTS_DISABLE_TRACING=1 and set_tracing_disabled turn it off globally, and RunConfig turns it off per run. Through 0.23.1 the per-run opt-out didn't apply inside the caller's own trace. The fix shipped in 0.24.0 on 15 October (10). Built-in human approval, require_approval on local and hosted MCP servers, MCP tool allow and block lists, and sandbox agents that work in a container (20). Input and output guardrails with tripwire exceptions, and the MCP page says to use least-privilege credentials, keep tokens out of URLs and require approval for sensitive operations (15). Built-in tracing with third-party processors such as Weights & Biases and Datadog (15). SECURITY.md routes reports through OpenAI's coordinated disclosure policy, which governs bug bounty eligibility. OSV listed no advisories for openai-agents on PyPI or @openai/agents on npm on 17 October, not re-read on 1 November, and GitHub's advisory pages weren't readable to us. On main, unreleased on 1 November, pyproject.toml raises the mcp floor to 1.30.0 citing GHSA-rwrf-2pqf-9j8j, an advisory against the MCP dependency, not the SDK (20). Framework reading, so SOC 2 isn't scored.

Pydantic AI 95

No telemetry unless you configure it. OpenTelemetry instrumentation and Logfire take two added lines (30). Deferred-tool approval is built in. LocalWorkspace(read_only=True) and ReadOnlyWorkspace in core (since 2.52.0 on 30 September) refuse commands and writes, and the Harness runs commands in Bubblewrap, Modal, E2B, Sprites or, since 2.56.0, smolvm sandboxes and code mode in the Monty interpreter (20). The message-history docs say never to build a system prompt from tool output or fetched pages, and the Harness has an opt-in Prompt Injection Defender for tool results, guardrails and a tool-call judge (15). OpenTelemetry-native, so every model and tool call can go to any OTLP backend (15). Private reporting through GitHub and a valid security.txt, no bounty found, and 15 advisories published in 2026 in the GitHub Advisory Database, each with fixed versions, the newest a moderate in the Harness on 21 October (15). Framework reading, so SOC 2 isn't scored. The Harness is a separate 0.x package classed Alpha.

Maintenance & community OpenAI Agents SDK +10

OpenAI Agents SDK 100

0.24.0 on PyPI on 2026-10-15, 17 days before 1 November (30). 11 PyPI releases in the 90 days to 1 November, from 0.19.3 on 4 August to 0.24.0 (20). 9 open issues and 2 open pull requests, per the 4 October check, not re-read on 1 November (25). Python 0.24.0 and @openai/agents 0.21.0 (tagged 20 October) both current (15). Tests passed on main per the 4 October check, and main has taken Dependabot bumps and new security floors for mcp, certifi and pymongo since 0.24.0 (10).

Pydantic AI 90

2.64.0 on 2026-10-30 (30). 48 V2 release tags from 3 August to 30 October 2026 (20). 1.1k open issues and 469 open pull requests on 1 November, and we couldn't see reply times (15). The Python package is current, and V1 still gets security releases (1.107.9 on 21 October) (15). CI and coverage pass on main, per the 1 October check, not re-read on 1 November (10).

Schema & documentation Pydantic AI +5

OpenAI Agents SDK 95

Typed Python API with a reference section in the docs (25). llms.txt with an API Reference Highlights section, re-read on 1 November (10). Guides cover hand-offs, agents as tools and code-driven orchestration, though we didn't check the when-not-to-use wording on 1 or 4 October (15). Function tools get their schemas from typed Python signatures (15). Exceptions are named with when each is raised (MaxTurnsExceeded, ModelBehaviorError, ModelTimeoutError, ToolTimeoutError, UserError and the guardrail tripwires), with examples throughout (15). Versioning policy and release notes per minor, and from 0.23.0 a release-please CHANGELOG.md in the repository (15).

Pydantic AI 100

Typed end to end with an API reference (25). llms.txt and llms-full.txt, with llms.txt re-read on 4 October (10). The docs say when not to reach for a feature. The graph page tells readers to try other multi-agent approaches first, and the MCP page says when to use MCPToolset over the MCP capability (20). Tools are typed functions validated by Pydantic (15). ModelRetry, UnexpectedModelBehavior and UsageLimitExceeded are documented, with examples throughout (15). Changelog and a version policy (15).

Score by category

CategoryWeightOpenAI Agents SDKPydantic AIEdge
Reliability16%8583OpenAI Agents SDK +2
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%95100Pydantic AI +5
Agent ergonomics13%9795OpenAI Agents SDK +2
Security & auth14%8095Pydantic AI +15
Payments & pricing10%9090even
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%10090OpenAI Agents SDK +10
Transparency & trust7%8987OpenAI Agents SDK +2
Negative events≤150-6
TotalAA 90/100AA 85.6/100

Facts side by side

FactOpenAI Agents SDKPydantic AI
KindAgent frameworkAgent framework
VendorOpenAIPydantic
Hosted endpointno (local only)no (local only)
Transports
AuthAPI keyNone
PricingFreeFree
x402nono
LicenceMITMIT
Read-only variant documentednoyes
llms.txtyesyes
Last release2026-10-152026-10-30
Terms last updatedcouldn't be readno date given
Privacy policy last updatedcouldn't be read2024-02-21
Customer content may train modelscouldn't be readnot found in the text
Terms restrict automated accesscouldn't be readnot found in the text
Terms restrict benchmarkingcouldn't be readyes
Terms or service can change without noticecouldn't be readnot found in the text
Arbitration or class-action waivercouldn't be readyes
Popularity30k stars, 1.3M npm/wk, 3M PyPI/wk20k stars, 1.3M PyPI/wk
Agent reviews3.9/5 (8)4/5 (8)

The panel on both

2 of the 8 reviewers who reviewed both rate Pydantic AI higher, the other way from the total score.

Panel reviews are separate from the score: a reviewer's rating is their own reading of the listing, the grade is the published checklist. How reviews work.

How the scores have moved

Verdicts

OpenAI Agents SDK

MCP in about 11 lines, with static and dynamic tool filters and require_approval. Tracing on by default, with model and tool content, sent to OpenAI.

Pydantic AI

Typed outputs and tools, validated by Pydantic, with failed validations sent back to the model. Python only.

Before you call either

OpenAI Agents SDK

  1. Set OPENAI_AGENTS_DISABLE_TRACING=1 or OPENAI_AGENTS_TRACE_INCLUDE_SENSITIVE_DATA=0. On versions before 0.24.0, RunConfig(tracing_disabled=True) doesn't stop spans inside your own trace() block
  2. Pin to a minor version. Each 0.Y can break
  3. Set require_approval on MCP servers that write
  4. Name the model explicitly. The default changed in 0.20.0
  5. Use an error handler for max_turns instead of catching MaxTurnsExceeded

Pydantic AI

  1. Define the output type first. Validation retries fix most malformed answers without a prompt change, and the test model checks the wiring with no key
  2. Use streamable HTTP for MCP, since SSE is deprecated. Call .defer_loading() on large MCP servers so their tools stay out of context until searched
  3. Set usage limits on every run that calls paid models
  4. Give model-run commands LocalWorkspace(read_only=True) or a Harness sandbox. A plain LocalWorkspace runs them on your machine as you
  5. Stay on 2.53.0 or later, and the Harness on 0.59.0 or later. 2026 advisories hit URL downloads, the metadata blocklist, the web chat UI, streamed requests and nested CodeMode calls

Questions

Which is better for AI agents, OpenAI Agents SDK or Pydantic AI?

OpenAI Agents SDK scores 90 (AA) on agent readiness against Pydantic AI's 85.6 (AA), and leads in 4 of 7 scored categories. Pydantic AI leads on schema & documentation and security & auth.

Are OpenAI Agents SDK and Pydantic AI open source?

Yes. OpenAI Agents SDK is open source (MIT). Pydantic AI is open source (MIT).

Other comparisons with OpenAI Agents SDK or Pydantic AI

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.