Logo of OpenAI Agents SDK: OpenAI's lightweight Python framework for building agents with tools, handoffs, guardrails, sessions and tracing

OpenAI Agents SDK

OpenAI's lightweight Python framework for building agents with tools, handoffs, guardrails, sessions and tracing

Visit openai.github.io

The OpenAI Agents SDK is an open-source framework for building agentic applications from a small set of primitives. Agents are LLMs with instructions and tools that run in a built-in loop until the task is complete, and they can hand work to other agents; it is the production successor to OpenAI's experimental Swarm project.

Key features:

  • Delegate between agents with handoffs or call agents as tools.
  • Validate inputs and outputs with guardrails that run in parallel and fail fast.
  • Turn any Python function into a tool with automatic schema generation and Pydantic validation.
  • Call remote MCP server tools alongside function tools.
  • Keep conversation memory with sessions and run specialists in isolated sandbox workspaces.
  • Build realtime and voice agents with speech-to-text and text-to-speech pipelines.
  • Visualize, debug and evaluate runs with built-in tracing.

The SDK is Python-first, installed from PyPI under the MIT license, with a separate TypeScript version. It is free to use; model calls are billed through the chosen provider's API.

Press the keys to navigate to the next or previous product.