OpenAI Agents SDK logo

OpenAI Agents SDK

The OpenAI Agents SDK is a Python package for building agentic applications with very few abstractions.

It is the production-ready successor to the earlier experimental project Swarm and rests on a small set of primitives: agents, which are language models equipped with instructions and tools, handoffs that let one agent…

OpenAI Agents SDK screenshot

The OpenAI Agents SDK is a Python package for building agentic applications with very few abstractions. It is the production-ready successor to the earlier experimental project Swarm and rests on a small set of primitives: agents, which are language models equipped with instructions and tools, handoffs that let one agent delegate to another, and guardrails that validate inputs and outputs. A built-in loop keeps an agent working until its task is complete. Installation is a single pip command, and built-in tracing lets developers visualize and debug each run.

It targets Python developers and engineering teams who want a managed runtime for multi-step agents without learning a heavy framework. Backend engineers can wrap existing functions as tools with automatic schema generation, while teams building voice products can use the realtime and voice agent modules. Developers who prefer to own the loop can call the Responses API directly, and the documentation spells out when each approach fits. Platform teams concerned with safety can run guardrails in parallel and fail fast, and those needing audit trails can rely on tracing.

Typical projects include a triage agent that hands conversations to specialist agents, a research workflow that calls tools and returns a structured result, and a voice assistant that chains speech-to-text, an agent and text-to-speech. Sandbox agents run work inside isolated workspaces with resumable sessions, which suits tasks that produce files or run code. Sessions provide persistent memory backed by stores such as SQLite, Redis, MongoDB or SQLAlchemy, and human-in-the-loop controls pause runs for approval. Remote MCP servers can expose extra tools alongside Python function tools, and traces feed evaluation, fine-tuning and distillation work.

OpenAI Agents SDK alternatives

See all →

Frequently asked

6 questions
What are the core building blocks of the OpenAI Agents SDK?
It uses agents, handoffs (including agents as tools) and guardrails as its primary primitives. Function tools, sessions, tracing and human-in-the-loop controls build on top of them.
Who should use the Agents SDK?
Developers working in Python who build applications where a model must plan, call tools and coordinate with other agents. It suits teams that want a runtime handling turns, tool execution and handoffs.
How do agents delegate work to each other?
Through handoffs or by exposing one agent as a tool for another. This lets a triage agent route a request to a specialist for a specific task.
What does the Agents SDK cost?
The SDK installs with pip and is listed without a license fee. Model calls made through it are billed separately by the model provider you use.
What are the limitations of the SDK?
Its design is Python-first, so teams working in other languages need a different route. Tracing also integrates most closely with OpenAI's evaluation, fine-tuning and distillation tools.
How do I get started?
Run pip install openai-agents and follow the hello world example in the quickstart. The documentation also covers sessions, MCP servers, realtime agents and voice pipelines.

Reviews (0)

Write review

No reviews yet. Be the first to share your experience.