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