OpenAI Agents SDK
Updated
TL;DR: OpenAI Agents SDK (by OpenAI; category: Agent framework). OpenAI's open-source framework for building agents in Python (Python 3.10+) or TypeScript: agents with instructions, tools, guardrails and handoffs, plus sandbox agents that work in a container over long jobs, realtime and voice agents, sessions for conversation history, human-in-the-loop approvals and built-in tracing. Provider-agnostic: works with OpenAI's Responses and Chat Completions APIs and, per the README, 100+ other LLMs. Pricing: Free, open source (MIT license); you pay for the model API you call (GitHub README and LICENSE, checked Nov 11, 2026).. Best for: Python or TypeScript developers building agents with tools and handoffs.
BuildersAgent frameworkOpenAI
OpenAI's open-source framework for building agents in Python (Python 3.10+) or TypeScript: agents with instructions, tools, guardrails and handoffs, plus sandbox agents that work in a container over long jobs, realtime and voice agents, sessions for conversation history, human-in-the-loop approvals and built-in tracing. Provider-agnostic: works with OpenAI's Responses and Chat Completions APIs and, per the README, 100+ other LLMs.
Features and pricing are based on OpenAI's official site and docs (vendor claims), not our own testing. Our take is labeled separately below.
- Audience: people building software and AI agents
- Pricing (vendor's published price): Free, open source (MIT license); you pay for the model API you call (GitHub README and LICENSE, checked Nov 11, 2026).. Prices change, so verify on the official site.
- Official site: https://openai.github.io/openai-agents-python/
- Source / changelog: https://github.com/openai/openai-agents-python
The Builder Brief Take
Who it's for
- Python or TypeScript developers building agents with tools and handoffs
- Prototyping multi-agent workflows quickly
- Teams that want built-in tracing
Who should skip it
- No-code users
- Teams wanting explicit graph-based state machines (see LangGraph)
Where it works
- Support triage: A triage agent hands off to Billing and Technical specialists.
- Tool-using assistant: Wrap your API in a function tool so the agent can look up orders.
- Guardrailed workflow: Add input/output guardrails to block off-topic requests.
Pros and cons
Pros
- Small set of primitives; quick to learn
- Tracing in the OpenAI dashboard
- Open source
Cons
- API usage costs extra
- Best experience with OpenAI models
- Young, fast-changing API
The move: getting started with OpenAI Agents SDK
- python -m venv .venv and activate it
- pip install openai-agents
- export OPENAI_API_KEY=...
- Create an Agent and run it with Runner.run
- Read our full playbook for tools and handoffs
Playbooks using OpenAI Agents SDK
- Your first AI agent with the OpenAI Agents SDK in 30 minutes
- Run local AI models with Ollama (and use them from your code)
Industries using OpenAI Agents SDK
How it helps
Who: Python or TypeScript developers who want a small, readable framework for a first production agent.
- pip install openai-agents (or uv add openai-agents), set your API key and run a single text agent with one function tool.
- Add a human-in-the-loop approval before any tool that sends, pays or deletes.
- Turn on tracing and read a few real runs end to end before adding handoffs or a second agent.
Result: A working agent with approvals and traces, built on code you can move to another model provider.
Why it matters
Editorial assessment: the SDK keeps the moving parts few, which is why it's a good first framework. Two things make it safer to build on than it looks: it's MIT-licensed, and it isn't tied to OpenAI's models, so a pricing or provider change doesn't force a rewrite. Choose LangGraph instead if you need explicit state machines and checkpoints, and skip frameworks entirely if a no-code tool like n8n already does the job.
OpenAI Agents SDK alternatives
- LangGraph: Open-source library from LangChain for building stateful, long-running agents as graphs: you define the steps, the state passed between them, checkpoints that let a run pause and resume, and points where a human approves before the agent continues. LangChain's paid LangSmith platform adds tracing, evaluation and hosted Agent Servers for running LangGraph agents in production.
- CrewAI: Open-source Python framework for orchestrating role-based teams of agents (for example a researcher, a writer and a reviewer) that work through tasks together, plus a hosted platform with a visual editor, an AI copilot, tracing, guardrails and human-in-the-loop steps for running those workflows.
- LangChain: The most widely used open-source framework for building LLM apps and agents, in Python and JavaScript, with integrations for hundreds of model providers, databases and tools. Its agent layer is built on LangGraph, the same company's lower-level runtime for long-running, stateful agents. Around the free framework LangChain sells LangSmith: tracing and evals to see what each agent run did, hosted Agent Servers, Fleet (agents built in plain language, no code) and Engine, which scans traces for failures and proposes fixes.
- LlamaIndex: Open-source Python and TypeScript framework for building agents and question-answering apps over your own documents and data, with connectors for many file types, databases and model providers. The same company runs LlamaParse, a paid cloud service for parsing and extracting data from complex documents, and LiteParse, a free local parser for simpler ones.
- AutoGen: Open-source framework from Microsoft for multi-agent applications.
- Pydantic AI: An open-source Python framework from the Pydantic team for building AI agents and apps with typed, validated outputs. It works with most model providers (OpenAI, Anthropic, Google, Bedrock, Groq, Mistral, OpenRouter, Ollama and more), and adds tools, MCP, multi-agent patterns, durable execution (Temporal, DBOS, Prefect and others), sandboxed execution environments, guardrails such as spend limits and tool budgets, and realtime speech-to-speech. Observability plugs into Pydantic Logfire or any OpenTelemetry backend.
Recent changes
- 2026-11-17: For agents that don't need an instant answer, the Responses API now offers discounted background windows (public beta): set background to true and a 2h or 8h completion window for 30% or 40% off Standard token rates on GPT-6.2 Astra, GPT-6.2 Sol, GPT-6.1 Terra and GPT-6 Luna. Requires Standard processing and no streaming, shares the Batch rate limit, and the time target covers only the first response, so it fits overnight jobs, not agents someone is waiting on. Vendor-documented. Source
Putting it to work? Get a starter stack for your job in about a minute with the Stack Picker, or see how done-with-you setup works if you want help.
Get changes in your inbox
New AI tools, honest reviews and playbooks. One email a week.
Almost done. Confirm your email in the beehiiv tab we just opened.
That email does not look right. Try again.
Free. Unsubscribe anytime.Make an AI tool? List your tool on Builder Brief. Free listings get the same editorial review as paid ones.