Debuly
OpenAI Agents SDK logo

OpenAI Agents SDK

Open-source Python framework for building multi-agent workflows with tools, handoffs, guardrails, tracing, sandboxes and voice agents.

Open source

What is OpenAI Agents SDK?

The OpenAI Agents SDK is an open-source Python framework for building agent workflows. An agent is a language model configured with instructions, tools, guardrails and handoffs, and agents can delegate to one another either as tools or through handoffs. Tools can be plain functions, MCP servers or hosted tools. The SDK adds sessions for automatic conversation history, built-in human-in-the-loop controls, and tracing so you can view and debug runs. Sandbox agents work inside a container for long tasks such as inspecting files, running commands and applying patches, while realtime and voice agents handle speech through the realtime API or a speech-to-text, agent, text-to-speech pipeline. It is provider-agnostic: it supports the OpenAI Responses and Chat Completions APIs and more than 100 other LLMs. It needs Python 3.10 or newer and installs with pip install openai-agents. The SDK itself is free; a JavaScript and TypeScript version exists separately, and model calls are billed by whichever provider you use.

Use cases

  • Build multi-agent workflows in Python
  • Hand off tasks between specialized agents
  • Add guardrails to agent input and output
  • Build realtime and voice agents
  • Run agents in a sandboxed container workspace
  • Trace and debug agent runs

Who it's for

  • Python developers
  • AI engineers
  • Agent builders
  • Startups building AI products

Why use OpenAI Agents SDK

  • Gives a small set of building blocks (agents, tools, handoffs, guardrails) that cover most multi-agent designs without a heavy framework.
  • Works with models beyond OpenAI, so you are not tied to one provider.
  • Includes tracing and sessions out of the box, which saves building your own logging and memory layers.
  • Supports voice and realtime agents in the same framework as text agents.
  • Lets agents act on files and commands safely through container-based sandbox workspaces.

OpenAI Agents SDK features

  • Agents configured with instructions, tools, guardrails and handoffs
  • Agents as tools and handoffs for delegation
  • Tools: functions, MCP and hosted tools
  • Sandbox agents that work inside a container
  • Realtime agents for voice and multimodal use over WebSocket
  • Voice pipelines combining speech-to-text, an agent and text-to-speech
  • Guardrails for input and output validation
  • Human-in-the-loop mechanisms across runs
  • Sessions with automatic conversation history, including optional Redis support
  • Built-in tracing of agent runs

OpenAI Agents SDK integrations

  • OpenAI Responses API
  • Chat Completions API
  • MCP
  • LiteLLM
  • any-llm
  • Redis
  • SQLAlchemy
  • Docker

How to get started with OpenAI Agents SDK

  1. Create a Python environment and install the package with pip install openai-agents, or add it with uv.
  2. Set the OPENAI_API_KEY environment variable, or configure another supported provider.
  3. Define an Agent with instructions, tools and any guardrails or handoffs.
  4. Run it with Runner, using a text, sandbox, realtime or voice agent depending on the task.
  5. Inspect traces of the run to debug and refine the workflow.

OpenAI Agents SDK limitations

  • Requires Python 3.10 or newer
  • A JavaScript and TypeScript version is a separate package
  • The local Unix sandbox client works on macOS and Linux; Windows needs the Docker or a hosted sandbox client
  • Pull requests are limited to repository collaborators

OpenAI Agents SDK pricing

OpenAI Agents SDK is open source, so you can use and self-host it for free.

Prices can change and may vary by country or exclude tax. Check the official pricing page.

OpenAI Agents SDK alternatives

The main OpenAI Agents SDK alternatives listed on Debuly are LangGraph, CrewAI, AutoGen, Pydantic AI, Mastra and Strands Agents. The table compares pricing and platforms; order is A–Z.

OpenAI Agents SDK compared with its alternatives
ToolPricingStarting pricePlatforms
OpenAI Agents SDKOpen source—Python, macOS, Linux, Windows
AutoGenOpen source—API, CLI
CrewAIOpen source—Web, API, CLI, Self-hosted
LangGraphOpen source—Self-hosted, Web, API
MastraOpen source$250/moWeb, CLI, API, Self-hosted
Pydantic AIOpen source—API, CLI, Self-hosted
Strands AgentsOpen source—Self-hosted, CLI, API
  1. AutoGen

    Microsoft's MIT-licensed Python and .NET framework for multi-agent AI apps, now archived; new projects are pointed to Microsoft Agent Framework.

  2. CrewAI

    Multi-agent framework and platform for building AI agent crews in Python or a visual editor, then deploying and monitoring them.

  3. LangGraph

    Low-level open-source orchestration framework and runtime for building stateful, long-running AI agents as graphs.

  4. Mastra

    Open source TypeScript framework for building AI agents and workflows, plus a hosted platform for Studio, Server, memory and observability.

  5. Pydantic AI

    A type-safe, model-agnostic Python framework for building agents and LLM applications, from the team behind Pydantic.

  6. Strands Agents

    Free Apache-2.0 SDK for creating and running Python and TypeScript AI agents, with built-in tools, MCP, memory and multi-agent patterns.

OpenAI Agents SDK FAQ

What is the OpenAI Agents SDK?

It is an open-source Python framework for building multi-agent workflows. It provides agents, tools, handoffs, guardrails, sessions and tracing, and supports realtime, voice and sandbox agents.

Is the OpenAI Agents SDK free?

The SDK is open source and free to install. You pay for model usage with whichever provider you call, such as the OpenAI API, and no SDK plans are listed.

Does it only work with OpenAI models?

No. It is provider-agnostic and supports the OpenAI Responses and Chat Completions APIs plus 100+ other LLMs.

What Python version does it need?

Python 3.10 or newer. Install with pip install openai-agents, and add the voice or redis extras if you need voice support or Redis sessions.

Is there a JavaScript version?

Yes. The README points to a separate Agents SDK for JavaScript and TypeScript.

Does the Agents SDK support MCP and tracing?

Yes. Tools can include MCP servers, and tracing is built in so you can view, debug and optimize agent runs.

What are alternatives to the OpenAI Agents SDK?

Alternatives include LangGraph, CrewAI, AutoGen, Pydantic AI and Google's Agent Development Kit, which also help build multi-agent applications.

Sources & verification

Facts on this page come from the official sources below, each with the date we read it. Written by Debuly; the vendor did not review this page.

SourceTypeAccessed
github.com/openai/openai-agents-pythonofficial

Image credits

  • Logo: from avatars.githubusercontent.com · fetched · Vendor trademark, used only to identify the product; removed on request
  • Cover: none collected yet, so a generated tile is shown.

Spot an error? Report an issue with this listing. We also remove a logo or image on the owner's request.