agents/apiTHE ENCYCLOPEDIA
Comparisons

Agents API vs Agents SDK vs Responses API

Compare runtime ownership, state, tool execution, and the integration work each option requires.

Choose runtime ownership
Choose state ownership
Connect tools
Build your interface

Agents API: OpenAI runs the harness

The service maintains durable sessions and runs the Codex harness. Your application submits work, receives progress, and handles application function calls. An optional hosted or self-hosted environment provides compute. Choose it when managed orchestration fits your operational requirements.

Agents SDK: your application runs the runner

The SDK is an application library for building agents. Its runner manages the agent loop and handoffs, while your application controls deployment, storage integration, approval logic, and runtime lifecycle. An SDK session and an Agents API session are different resources.

Responses API: your application owns the loop

Responses supplies model inference and tool interfaces. Your application decides how to loop, execute custom functions, preserve state, and recover. It is useful for a focused model request or an existing orchestration system. Adding tools to a response does not create an Agents API session.

Migration is an architecture decision

Map tool handlers, state, approvals, monitoring, and cleanup before changing runtimes. Do not replace an import and assume session IDs, event types, or tool schemas are interchangeable. Compare a representative workload for correctness, latency, and total cost.

Read the official reference

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

OpenAI: agents

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