The OpenAI Agents SDK (openai-agents) is the official Python library for building agentic applications on top of OpenAI's APIs, providing Agent, Runner, tools, guardrails, handoffs, tracing, sessions, MCP integrations, Realtime agents, voice pipelines, and Sandbox agents. It is provider-agnostic — supporting the OpenAI Responses and Chat Completions APIs as well as 100+ other LLMs — and requires Python 3.10 or newer under the MIT License. The architecture centers on a single run loop: Runner drives an Agent through turns, calling a Model, executing tools, evaluating guardrails, and optionally handing off to other agents, with a serializable RunState snapshot that supports interruption, approval, and resume.
Getting started is the entry point, with Orientation, Installation and requirements, Quickstart and how-to, and Examples and developer workflow covering setup and a first agent. The Agents and Agent behavior sections describe how agents are constructed and shaped — including Agent types, Handoffs, Guardrails, Lifecycle hooks, Result and items, and Exceptions and redaction. The Tools section covers the Tool catalog, Function schema, Programmatic tool calling, and Hosted tool search, while the MCP section and its MCP server internals and MCPServerManager pages document Model Context Protocol integration. The Runner and run loop section — Runner API, RunConfig, Run loop internals, Tool execution pipeline, Streaming, and Run context — explains how a run actually executes, and Run lifecycle covers RunState and resume, Sessions and memory, and Sandbox. The Models section documents the Model interface, OpenAIProvider, OpenAI Responses model, OpenAI Chat Completions model, and Model settings; Observability and testing covers Tracing, Testing, and Upgrading.
If you want to build and run your first agent, read Quickstart and how-to in Getting started, then skim Tool catalog to add function tools. If you want to understand the architecture end-to-end, read Orientation, then Agents, then Runner API and Run loop internals. If you are debugging a live run or wiring up observability, start with Streaming and Run context, then Tracing and Testing. If you are integrating external tools or long-running sessions, read MCP for external tool servers and Sessions and memory plus RunState and resume for persistence and human-in-the-loop flows.