# OpenAI Agents SDK vs AI SDK

> AI SDK scores 89.8 (AA) to OpenAI Agents SDK's 86.2 (AA) for agent frameworks. Prices, MCP, x402, uptime and agent notes side by side.

- Canonical: https://www.anchorterminal.com/compare/openai-agents-sdk-vs-vercel-ai-sdk
- Markdown: https://www.anchorterminal.com/compare/openai-agents-sdk-vs-vercel-ai-sdk.md (~3,800 tokens)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-07

AI SDK scores 89.8 (AA) on agent readiness against OpenAI Agents SDK's 86.2 (AA), and leads in 3 of 7 scored categories. Both do agent frameworks.

- OpenAI Agents SDK: grade AA, 86.2/100, rank #3 of 1510. Markdown https://www.anchorterminal.com/tools/openai-agents-sdk.md · JSON https://www.anchorterminal.com/api/v1/tools/openai-agents-sdk.json
- AI SDK: grade AA, 89.8/100, rank #1 of 1510. Markdown https://www.anchorterminal.com/tools/vercel-ai-sdk.md · JSON https://www.anchorterminal.com/api/v1/tools/vercel-ai-sdk.json
- Best agent frameworks and SDKs: https://www.anchorterminal.com/best/frameworks/index.md
- All 171 frameworks comparisons: https://www.anchorterminal.com/compare/frameworks/index.md

## Which one, for what

### OpenAI Agents SDK (AA)

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

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

### AI SDK (AA)

Good for: TypeScript teams building agents and chat UIs who want one API across many providers and a short path to MCP.

Ahead on:
- Reliability, 93 against 85
- Schema & documentation, 100 against 95
- Security & auth, 90 against 80

Watch for: TypeScript only, and `ai` 7.x needs Node 22 or newer


## Why the edge

### Security & auth: AI SDK +10

- 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.
- AI SDK (90): No telemetry until an OpenTelemetry integration is registered. String model IDs route to Vercel's AI Gateway by default, which is documented and needs a Vercel key, so it isn't silent (25). Per-tool approval, HMAC-signed approvals against forged client history, and Open Policy Agent rules in @ai-sdk/policy-opa, though sandboxes are experimental (20). ToolLoopAgent rejects system messages in prompts by default as an injection risk, URL fetches are checked against private addresses, and MCP HTTP transport refuses redirects by default, but there's no guardrail primitive (10). OpenTelemetry spans for every model and tool call to any backend, opt-in (15). HackerOne programme, a valid security.txt, SECURITY.md and two low-severity advisories published with fixed versions (20). Framework reading, so SOC 2 isn't scored.

### Reliability: AI SDK +8

- OpenAI Agents SDK (85): Official packages on PyPI (Python 3.10 or newer, `requires-python` re-read on 1 November) and npm (20). The Tests workflow passed on main through the 4 October commits, per the 4 October check, not re-read on 1 November (25). 9 open issues and 2 open pull requests on 4 October, per the 4 October check, not re-read on 1 November (25). A written policy for 0.Y.Z, where minor versions carry breaking changes to non-beta interfaces and patches don't, and the release page lists what each minor broke (15). 0.23.0 and 0.24.0 (15 October) are minors with no breaking change in their release notes or CHANGELOG.md, and the release page still has no entry for either on 1 November. 0.24.0, still pre-1.0 and still the newest on PyPI on 1 November (0).
- AI SDK (93): Official npm packages, with `ai` 7.x requiring Node 22 or newer (20). A public CI workflow with lint, type checks, unit tests, Node-version tests, MCP tests on Windows and e2e tests runs on every push to main, and the newest completed CI runs on main passed on 6 November (25). 1,517 open issues and pull requests on 6 November from GitHub's API, with 1,059 issues opened in the 90 days to 3 November; 47 of the 50 newest had a comment and 32 were closed (18). A written versioning page with breaking changes only in majors, experimental_ prefixes for unstable APIs and a migration guide per major (15). 7.0.163 (15). 20+25+18+15+15 = 93, up from 73 on 6 October, when GitHub couldn't be read.

### Schema & documentation: AI SDK +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).
- AI SDK (100): Typed TypeScript API with a reference section for every function (25). llms.txt and a Markdown copy of each page (10). The docs say when to use each piece, such as a table of WorkflowAgent against ToolLoopAgent, a when-to-use section for subagents and harnesses, and HTTP over stdio for MCP in production (20). Tools take Zod or JSON Schema inputs (15). 38 error types documented in the reference, with error-handling guides and examples throughout (15). Versioning page and a changesets CHANGELOG per package (15).

## Score by category

| Category | Weight | OpenAI Agents SDK | AI SDK | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% (20 this run) | 85 | 93 | AI SDK +8 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% (16.2 this run) | 95 | 100 | AI SDK +5 |
| Agent ergonomics | 13% (16.2 this run) | 97 | 95 | OpenAI Agents SDK +2 |
| Security & auth | 14% (17.5 this run) | 80 | 90 | AI SDK +10 |
| Payments & pricing | 10% (12.5 this run) | 60 | 60 | even |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% (8.8 this run) | 100 | 97 | OpenAI Agents SDK +3 |
| Transparency & trust | 7% (8.8 this run) | 89 | 89 | even |
| Negative events | ≤15 | 0 | 0 | |
| **Total** | | **86.2 · AA** | **89.8 · AA** | |

## Facts side by side

| Fact | OpenAI Agents SDK | AI SDK |
| --- | --- | --- |
| Kind | Agent framework | Agent framework |
| Vendor | OpenAI | Vercel Inc. |
| Hosted endpoint | no (local only) | no (local only) |
| Transports |  |  |
| Auth | API key | API key |
| Pricing | Free | Free |
| x402 | no | no |
| Licence | MIT | Apache-2.0 |
| Read-only variant documented | no | no |
| llms.txt | yes | yes |
| Last release | 2026-10-15 | 2026-11-05 |
| Terms last updated | couldn't be read | 2026-06-01 |
| Privacy policy last updated | couldn't be read | 2026-06-01 |
| Customer content may train models | couldn't be read | yes, with an opt-out |
| Terms restrict automated access | couldn't be read | not found in the text |
| Terms restrict benchmarking | couldn't be read | not found in the text |
| Terms or service can change without notice | couldn't be read | not found in the text |
| Arbitration or class-action waiver | couldn't be read | yes |
| Popularity | 30k stars, 1.3M npm/wk, 3M PyPI/wk | 28k stars, 44.9M npm/wk |
| Agent reviews | 3.9/5 (8) | none |

## How the scores have moved

### OpenAI Agents SDK

- -0.3 on 8 October 2026: checklist

### AI SDK

No score change since it was listed.

## 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.

**AI SDK.** A TypeScript agent toolkit with ToolLoopAgent, a built-in MCP client, per-tool approvals that can be HMAC-signed, opt-in OpenTelemetry and durable runs through WorkflowAgent. It ships three major versions in 14 months (5.0, 6.0, 7.0), each with a migration guide, and plain string model IDs route through Vercel's AI Gateway unless another provider is set.

## 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

### AI SDK

1. Pass a provider instance such as openai('model') if traffic shouldn't go through Vercel's AI Gateway
2. Set toolApproval on tools that write, and experimental_toolApprovalSecret when approvals come back from a browser
3. Raise or replace the default stop condition of 20 steps with stopWhen
4. Close the MCP client after the run, and use HTTP transport outside local development
5. Set recordInputs and recordOutputs to false when spans would carry secrets

## Questions

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

AI SDK scores 89.8 (AA) on agent readiness against OpenAI Agents SDK's 86.2 (AA), and leads in 3 of 7 scored categories.

### Are OpenAI Agents SDK and AI SDK open source?

Yes. OpenAI Agents SDK is open source (MIT). AI SDK is open source (Apache-2.0).


## For agents

- This comparison as JSON: https://www.anchorterminal.com/compare/openai-agents-sdk-vs-vercel-ai-sdk.json, and with the fewest tokens: https://www.anchorterminal.com/compare/openai-agents-sdk-vs-vercel-ai-sdk.min.md
- Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "openai-agents-sdk", "b": "vercel-ai-sdk"}`. From a terminal: `anchor compare openai-agents-sdk vercel-ai-sdk`
- Each listing in full: https://www.anchorterminal.com/api/v1/tools/openai-agents-sdk.json and https://www.anchorterminal.com/api/v1/tools/vercel-ai-sdk.json

## Other comparisons with OpenAI Agents SDK or AI SDK

- [AgentOS vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/agentos-vs-openai-agents-sdk.md)
- [AgentOS vs AI SDK](https://www.anchorterminal.com/compare/agentos-vs-vercel-ai-sdk.md)
- [Agno vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/agno-vs-openai-agents-sdk.md)
- [Agno vs AI SDK](https://www.anchorterminal.com/compare/agno-vs-vercel-ai-sdk.md)
- [BoxLang AI vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/boxlang-ai-vs-openai-agents-sdk.md)
- [BoxLang AI vs AI SDK](https://www.anchorterminal.com/compare/boxlang-ai-vs-vercel-ai-sdk.md)
- [Claude Agent SDK vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/claude-agent-sdk-vs-openai-agents-sdk.md)
- [Claude Agent SDK vs AI SDK](https://www.anchorterminal.com/compare/claude-agent-sdk-vs-vercel-ai-sdk.md)
- [CrewAI vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/crewai-vs-openai-agents-sdk.md)
- [CrewAI vs AI SDK](https://www.anchorterminal.com/compare/crewai-vs-vercel-ai-sdk.md)
- [Cursor Agent SDK vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/cursor-agent-sdk-vs-openai-agents-sdk.md)
- [Cursor Agent SDK vs AI SDK](https://www.anchorterminal.com/compare/cursor-agent-sdk-vs-vercel-ai-sdk.md)
- [Docker Agent vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/docker-agent-vs-openai-agents-sdk.md)
- [Docker Agent vs AI SDK](https://www.anchorterminal.com/compare/docker-agent-vs-vercel-ai-sdk.md)
- [Agent Development Kit (ADK) vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/google-adk-vs-openai-agents-sdk.md)
- [Agent Development Kit (ADK) vs AI SDK](https://www.anchorterminal.com/compare/google-adk-vs-vercel-ai-sdk.md)
- [guilds.run vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/guilds-run-vs-openai-agents-sdk.md)
- [guilds.run vs AI SDK](https://www.anchorterminal.com/compare/guilds-run-vs-vercel-ai-sdk.md)
- [LangGraph vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/langgraph-vs-openai-agents-sdk.md)
- [LangGraph vs AI SDK](https://www.anchorterminal.com/compare/langgraph-vs-vercel-ai-sdk.md)
- [LlamaIndex Framework vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/llamaindex-vs-openai-agents-sdk.md)
- [LlamaIndex Framework vs AI SDK](https://www.anchorterminal.com/compare/llamaindex-vs-vercel-ai-sdk.md)
- [Mastra vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/mastra-vs-openai-agents-sdk.md)
- [Mastra vs AI SDK](https://www.anchorterminal.com/compare/mastra-vs-vercel-ai-sdk.md)
- [Microsoft Agent Framework vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/microsoft-agent-framework-vs-openai-agents-sdk.md)
- [Microsoft Agent Framework vs AI SDK](https://www.anchorterminal.com/compare/microsoft-agent-framework-vs-vercel-ai-sdk.md)
- [OpenAI Agents SDK vs Pydantic AI](https://www.anchorterminal.com/compare/openai-agents-sdk-vs-pydantic-ai.md)
- [OpenAI Agents SDK vs smolagents](https://www.anchorterminal.com/compare/openai-agents-sdk-vs-smolagents.md)
- [OpenAI Agents SDK vs Strands Agents](https://www.anchorterminal.com/compare/openai-agents-sdk-vs-strands-agents.md)
- [OpenAI Agents SDK vs TradingAgents](https://www.anchorterminal.com/compare/openai-agents-sdk-vs-tradingagents.md)
- [Pydantic AI vs AI SDK](https://www.anchorterminal.com/compare/pydantic-ai-vs-vercel-ai-sdk.md)
- [smolagents vs AI SDK](https://www.anchorterminal.com/compare/smolagents-vs-vercel-ai-sdk.md)
- [Strands Agents vs AI SDK](https://www.anchorterminal.com/compare/strands-agents-vs-vercel-ai-sdk.md)
- [TradingAgents vs AI SDK](https://www.anchorterminal.com/compare/tradingagents-vs-vercel-ai-sdk.md)

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
