Favicon of OpenAI Agents SDK

OpenAI Agents SDK

Open-source Python AI agent framework under MIT. Coordinate agents and tools, use local or hosted sandboxes, and connect to OpenAI or other model providers.

Screenshot of OpenAI Agents SDK website

OpenAI Agents SDK is an open-source Python framework for developers building AI apps that need to use tools, delegate tasks, or work across multiple steps. Its runtime manages agent turns and conversation state while letting developers express workflows in ordinary Python. It uses the MIT license.

The runtime runs in your Python environment; model calls use the selected provider. OpenAI models use the cloud Responses API by default and require an API key. The SDK also supports Chat Completions and non-OpenAI providers, so the framework and model service are separate choices.

Agents can call Python functions or remote MCP tools, involve a human during a run, and delegate work through handoffs or by treating another agent as a tool. Input and output guardrails validate what passes through the workflow. Persistent sessions retain conversation context across runs, while built-in tracing helps developers inspect execution and debug tool use or delegation.

Sandbox agents handle tasks that involve files, commands, or code changes in isolated workspaces, with resumable sessions for longer jobs. Local Unix sandboxes work on macOS and Linux. Windows supports Docker sandboxes, and hosted sandbox clients provide a remote alternative.

For voice applications, realtime agents work with gpt-realtime-2.1 and support interruption detection and context management. A separate voice pipeline combines speech recognition, an agent workflow, and streamed speech output.

Similar to OpenAI Agents SDK