# OpenAI Agents SDK (Python) — Open-source Python framework for building agents with tools, handoffs, guardrails and tracing.

> Source: The Agents Index — https://theagentsindex.com/openai-agents-sdk (structured, researched, re-verified)
> Facts last verified: 2026-09-20

The OpenAI Agents SDK is an MIT-licensed Python framework for building agentic applications from a small set of primitives: agents, handoffs, guardrails and function tools. It ships a runner loop, sessions, human-in-the-loop approvals, sandboxed workspaces, realtime voice agents and built-in tracing.

| Fact | Value |
| --- | --- |
| Website | https://openai.github.io/openai-agents-python/ |
| Price | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction |
| Free tier | Yes |

The framework is MIT-licensed and free to install and run with no tier, quota or expiry. Costs arise only outside the package: model inference is billed by whichever provider's API key you supply, and hosted tools such as web search, file search or container shell are billed by OpenAI.

## What it does

**Writes code** · Partly — The SDK is a toolkit for building a code-writing agent rather than a ready-made one: sandbox agents get filesystem editing and an apply_patch tool, but you supply the agent, prompt and model.

> Sandbox Agents in the Agents SDK give the model a persistent workspace where it can search large document sets, edit files, run commands, generate artifacts, and pick work back up from saved sandbox state.
> — https://openai.github.io/openai-agents-python/sandbox_agents/ · Sandbox agents quickstart, opening paragraph

**Debugs and fixes** · Partly — Sandbox agents can run commands and edit files in a real workspace, which covers diagnosing and fixing, but the vendor documents this as a harness you configure, not a diagnosis capability it guarantees.

> Run a coding, review, or document agent inside a real isolated workspace
> — https://openai.github.io/openai-agents-python/ · Choose your path table, Goal column

**Writes tests** · Partly — Adding a regression test is given as a sandbox multi-step workflow example; no dedicated test-generation feature is documented. The SDK's own testing utilities test agent workflows, not application code.

> multi-step workspace tasks, for example fixing a bug in one run and adding a regression test later, or resuming from snapshot or sandbox session state
> — https://openai.github.io/openai-agents-python/sandbox/guide/ · Concepts, "When to use them" bullet list, last bullet

**Reviews code** · Partly — The docs present reviewing as one of the workloads a sandbox agent can be pointed at, but no review-specific tooling, diff ingestion or pull-request integration is documented by the vendor.

> Run a coding, review, or document agent inside a real isolated workspace
> — https://openai.github.io/openai-agents-python/ · Choose your path table, row on sandbox agents

**Whole-codebase work** · Partly — A sandbox manifest can stage a whole local directory or git repository into the workspace, so repository-wide work is possible, but the vendor documents staging and sessions rather than any migration or indexing capability.

> default_manifest: the files, repos, directories, and mounts for fresh sandbox sessions
> — https://openai.github.io/openai-agents-python/sandbox_agents/ · Key choices list, default_manifest bullet

**Done-for-you service** · No — There is no service engagement of any kind: this is a Python package you install and operate yourself, with the vendor supplying only the library, docs and examples.

> The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.
> — https://github.com/openai/openai-agents-python · README, opening sentence

_Not established: Ships it_

## How much it does unattended

**Runs autonomously** · Yes — The runner drives its own loop across model turns, tool calls and handoffs until the task finishes, so a run can complete with no human intervention unless you attach approvals.

> Agents: Build agents with instructions, tools, guardrails, handoffs, and a built-in loop that continues until the task is complete.
> — https://openai.github.io/openai-agents-python/ · Why use the Agents SDK, main features list

**Multi-agent** · Yes — Coordination is a core primitive: agents can hand off the conversation to a specialist, or an orchestrator can call other agents as tools within one run.

> Agents as tools / Handoffs: A powerful mechanism for coordinating and delegating work across multiple agents.
> — https://openai.github.io/openai-agents-python/ · Why use the Agents SDK, main features list

**Agent permissions** · Yes — Tools declare when they need approval, the run pauses and surfaces interruptions, and the serialized run state can be approved or rejected before resuming, including for shell, apply_patch and MCP tools.

> Use the human-in-the-loop (HITL) flow to pause agent execution until a person approves or rejects sensitive tool calls.
> — https://openai.github.io/openai-agents-python/human_in_the_loop/ · Human-in-the-loop, opening paragraph

## Which models it runs on

**Claude** · Partly — The SDK names only OpenAI models; non-OpenAI providers are reached through OpenAI-compatible endpoints or the beta Any-LLM and LiteLLM adapters, and Claude is never named in the docs.

> It is provider-agnostic, supporting the OpenAI Responses and Chat Completions APIs, as well as 100+ other LLMs.
> — https://github.com/openai/openai-agents-python · README, first paragraph

**GPT** · Yes — OpenAI models are the default path, supported natively through both the Responses API and the Chat Completions API, with a GPT-5 family model used when an agent sets none.

> The Agents SDK comes with out-of-the-box support for OpenAI models in two flavors:
> — https://openai.github.io/openai-agents-python/models/ · Models page, opening sentence

**Open models** · Partly — Any OpenAI-compatible endpoint or the beta Any-LLM/LiteLLM adapters can be used, which covers self-hosted open-weight serving, but no open-weight model or local runtime is named in the docs.

> set_default_openai_client is useful in cases where you want to globally use an instance of AsyncOpenAI as the LLM client. This is for cases where the LLM provider has an OpenAI compatible API endpoint, and you can set the base_url and api_key.
> — https://openai.github.io/openai-agents-python/models/ · Models, "Non-OpenAI models" section, numbered list item 1

**Model choice** · Yes — You choose the model per agent, per run or globally, and any OpenAI-compatible endpoint can be substituted by setting a base URL and key; adapters extend this to further providers.

> It is provider-agnostic, supporting the OpenAI Responses and Chat Completions APIs, as well as 100+ other LLMs.
> — https://github.com/openai/openai-agents-python · README, opening paragraph

## Where you use it

**On the command line** · Yes — run_demo_loop gives an interactive terminal chat session with streaming and retained history; it is a demo/testing loop, not a packaged CLI binary.

> The SDK provides run_demo_loop for quick, interactive testing of an agent's behavior directly in your terminal.
> — https://openai.github.io/openai-agents-python/repl/ · REPL utility, first sentence

**In a browser** · Partly — There is no hosted web application for building or running agents; the only web surface is OpenAI's Traces dashboard, where runs recorded by built-in tracing can be inspected.

> Using the Traces dashboard, you can debug, visualize, and monitor your workflows during development and in production.
> — https://openai.github.io/openai-agents-python/tracing/ · Tracing, opening paragraph

_Not established: In your pipeline_

## Whose machine it runs on

**Self-hosted** · Yes — The framework and its local runtime tools execute entirely in your own process or environment; only model inference and optional trace export leave your infrastructure.

> Local runtime tools execute outside the model response itself. The model still decides when to call them, but your application or configured execution environment performs the actual work.
> — https://openai.github.io/openai-agents-python/tools/ · Tools, Local runtime tools section

**Open source** · Yes — The full source is published on GitHub under the permissive MIT licence, allowing use, modification, redistribution and commercial sublicensing without fee.

> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction
> — https://raw.githubusercontent.com/openai/openai-agents-python/main/LICENSE · LICENSE file, MIT grant paragraph

## What it costs to run

**How it meters** · Partly — The framework itself is charged for in no unit at all, being MIT-licensed and free; what a buyer actually pays is their model provider's token metering plus any hosted tool usage, billed outside this product.

> Permission is hereby granted, free of charge, to any person obtaining a copy of this software
> — https://raw.githubusercontent.com/openai/openai-agents-python/main/LICENSE · LICENSE file, MIT grant paragraph

**Free tier** · Yes — No sales contact, account or subscription is involved: the package installs from PyPI and the licence grants use free of charge, though running an agent needs a model provider key.

> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction
> — https://raw.githubusercontent.com/openai/openai-agents-python/main/LICENSE · LICENSE file, MIT grant paragraph

**API access** · Yes — The product is itself a programmatic interface: agents, tools and the runner are ordinary Python objects you compose inside your own application, with no separate API tier or key to obtain.

> Python-first: Use built-in language features to orchestrate and chain agents, rather than needing to learn new abstractions.
> — https://openai.github.io/openai-agents-python/ · Why use the Agents SDK, main features list

**MCP server** · Partly — The SDK acts as an MCP client across stdio, SSE, Streamable HTTP and hosted transports, so agents can consume MCP tools; no documentation describes exposing the SDK itself as an MCP server another agent could query.

> The Agents Python SDK understands multiple MCP transports. This lets you reuse existing MCP servers or build your own to expose filesystem, HTTP, or connector backed tools to an agent.
> — https://openai.github.io/openai-agents-python/mcp/ · Model context protocol (MCP), introduction

**Bring your own key** · Yes — You always bring your own inference credentials, and any OpenAI-compatible endpoint can be pointed at by setting base URL and key, so the vendor never resells inference through this package.

> This is for cases where the LLM provider has an OpenAI compatible API endpoint, and you can set the `base_url` and `api_key`.
> — https://openai.github.io/openai-agents-python/models/ · Non-OpenAI models, set_default_openai_client description

## Buying it for a team

**Admin controls** · Partly — Constraints are real but developer-defined in code — approval rules, guardrails and tool filters, plus network policy on hosted shell containers — rather than an administrator console governing what a fleet of agents may do.

> `require_approval` enables human-in-the-loop approval policies on local MCP tools.
> — https://openai.github.io/openai-agents-python/mcp/ · Streamable HTTP MCP servers, constructor options list

**Audit log** · Partly — Built-in tracing records a detailed run history of model calls, tool calls, handoffs and guardrails, but that is execution telemetry rather than a log of administrative actions, and it can be disabled outright.

> The Agents SDK includes built-in tracing, collecting a comprehensive record of events during an agent run: LLM generations, tool calls, handoffs, guardrails, and even custom events that occur.
> — https://openai.github.io/openai-agents-python/tracing/ · Tracing, opening paragraph

## What happens to your code

**Getting out** · Partly — Paused run state serialises to JSON you store yourself and sessions can be backed by your own SQLite or Redis, so data stays portable; nothing is documented about exporting traces already sent to OpenAI's backend.

> Use `state.to_json()` or `state.to_string()` to store pending work in a database or queue and recreate it later with `RunState.from_json(...)` or `RunState.from_string(...)`.
> — https://openai.github.io/openai-agents-python/human_in_the_loop/ · Long-running approvals section

_Not established: Data residency, Certifications_

## Platform record (as of 2026-08-30)

Reported by the code-hosting platform, not by the vendor.

| Fact | Value |
| --- | --- |
| Licence | MIT |
| Stars | 29068 |
| Forks | 4632 |
| Last push | 2026-08-28 |

## Provenance

3 of 15 sources behind the facts above are independent of the vendor.

## Coverage elsewhere

Pages about this product that the vendor does not control. The label states how independent each one is.

| Source | Kind | Read |
| --- | --- | --- |
| github.com | Platform record | 2026-08-23 |
| pypi.org | Platform record | 2026-08-23 |
| npmjs.com | Platform record | 2026-08-23 |
| github.com | Platform record | 2026-08-23 |

## What changed

- 2026-09-20 — Capabilities · Commercial terms · Free tier · Price
- 2026-09-02 — Capabilities · Commercial terms · Free tier
- 2026-08-31 — Capabilities · Commercial terms · Free tier
- 2026-08-22 — Alternatives · Documentation link · One-liner · Repository · Summary

## Correcting this record

Anything marked "Not established" is a question we have not answered — it is not a No. If you represent OpenAI Agents SDK (Python), or anything here is wrong or out of date, you can supply it with a source: the operations this site accepts from an agent are listed at https://theagentsindex.com/.well-known/agents.json — that catalogue needs no key to read, and each entry states its own auth.

Supplying evidence is free. Nothing that can be bought here changes what a field says, whether a gap is closed, or how this record is scored.
