agents/apiTHE ENCYCLOPEDIA
Foundations

What is the OpenAI Agents API?

Understand the managed agent runtime, its core resources, and what your application still owns.

Your application
Agents API
Managed Codex harness
Tools & results

A managed runtime for agent work

The Agents API gives applications access to an OpenAI-managed Codex harness. Your server submits tasks; the harness coordinates model calls and tool use. OpenAI manages orchestration, session continuity, context compaction, and recovery. The API is available through the beta.agents namespace in the OpenAI SDK.

Four resources to understand

An agent is reusable configuration: model, instructions, and tools. A session is a durable instance doing work. An environment is optional compute and a filesystem. Events carry inputs and progress; saved items let your application retrieve the work later. A saved agent is not a conversation.

Where it fits in a product

A support application can send a question, give the agent an order lookup function, and show the result. A report generator can add a hosted environment so the agent can run code and publish files. Your application remains responsible for user identity, authorization, product UI, and the business rules inside its tools.

Choose the right starting point

Use the managed API when you want durable agent work without operating the harness. Consider the Agents SDK when runtime ownership and deployment control are central requirements. Use Responses directly when your application already owns the orchestration loop.

Read the official reference

Check the source for current API fields, account requirements, and service limits.

OpenAI: overview

23 matching topics

What is the OpenAI Agents API?FoundationsAgents API vs Agents SDK vs Responses APIComparisonsAgents API quickstartGetting startedSessions, turns & durable stateCore conceptsHosted vs self-hosted sandboxesInfrastructureConnect MCP servers to Agents APITools & integrationsFunction calling & application toolsTools & integrationsMulti-agent orchestrationCore conceptsStreaming, webhooks & event handlingIntegration guidesFiles, outputs & published artifactsCore conceptsVaults & MCP authenticationTools & integrationsAgent security & credential boundariesProductionTracing, usage & debuggingProductionAgents API pricing & cost planningProductionOpenAI Agents API with PythonGetting startedAgents API with TypeScript & Next.jsIntegration guidesWhat is the OpenAI Agents SDK?FoundationsResponses API in the agent stackFoundationsAgent Skills & SKILL.mdTools & integrationsProgrammatic Tool CallingTools & integrationsRAG, file search & vector storesTools & integrationsWeb search & source citationsTools & integrationsChatKit & Agent BuilderIntegration guides
K to open Esc to close