OpenAI Agents API vs Responses API vs Agents SDK vs AgentKit: which one to build on

OpenAI Agents API vs Responses API vs Agents SDK vs AgentKit: who runs the loop, where state lives, what you pay, and which one to build on.

Ashley Innocent

Ashley Innocent

2 October 2026

OpenAI Agents API vs Responses API vs Agents SDK vs AgentKit: which one to build on

Apidog for Enterprise

On-Premises Deploy

SSO & RBAC

SOC 2 Compliant

Explore Apidog Enterprise

These four names sit at different layers, and one question separates them: who runs the agent loop? The Responses API is the model call, and your code runs the loop around it. The Agents SDK is a TypeScript and Python library whose runner executes the loop inside your application. The Agents API, in public beta since September 10, 2026, runs OpenAI’s Codex harness for you and keeps the session and, optionally, the sandbox. AgentKit is the October 2025 bundle of Agent Builder, ChatKit, Connector Registry, and Evals, and Agent Builder is scheduled to shut down on November 30, 2026.

button

DevDay on September 29 added computer use to the Agents API (see the DevDay 2026 roundup), which made the naming question harder to ignore. Below: a side-by-side on loop, compute, state, price and maturity, a decision table, and a migration path from a hand-rolled Responses loop. For a hands-on walkthrough of sessions and approvals, read the OpenAI Agents API guide. Whichever you pick, the HTTP surface is testable in Apidog.

OpenAI agent options side by side

Agents API Responses API Agents SDK AgentKit
What it is Managed agent runtime on the Codex harness Model endpoint, POST /v1/responses Library for TypeScript and Python Bundle: Agent Builder, ChatKit, Connector Registry, Evals
Who runs the loop OpenAI Your code The SDK runner, in your app Agent Builder workflows, exported to SDK code or embedded with ChatKit
Where compute runs OpenAI-hosted sandbox, your own sandbox, or none Your environment, plus hosted tools Your runtime and sandbox providers Not applicable
Where state lives OpenAI session: config, turns, items Your history, previous_response_id, or the Conversations API Your storage, SDK sessions, or Responses state Published, versioned workflows
What you pay Tokens, tools, and hosted containers; no extra fee Tokens and tools Tokens and tools, plus your hosting Underlying API usage; no separate subscription
Integration effort (per OpenAI) Low High Medium Not rated
Status Public beta (OpenAI-Beta: agents=v1) Recommended for all new projects Current Agent Builder and Evals shutting down Nov 30, 2026; ChatKit stays
Data controls US data residency only; not ZDR-eligible; state kept until deleted ZDR-eligible (with limitations); regional endpoints Depends on the APIs it calls Not applicable

Sources: OpenAI’s agent runtime comparison, the Agents API overview, and the deprecations page.

Who runs the loop

This is the axis that decides most of the other rows.

Responses API: you run it. Hosted tools such as web search, file search, code interpreter and remote MCP can run several calls inside one request, but your own functions come back to you. When the model calls one, you get a function_call item, run it, and send a function_call_output with the same call_id in the next request. You decide when to stop, how to store history (responses are stored by default; store: false turns that off), and when to compact long contexts with context_management and compact_threshold. The Responses API guide and function calling guide cover that loop.

Agents SDK: your process runs it. OpenAI’s docs say the SDK’s runner “handles the agent loop and handoffs,” while your server owns deployment, tool implementations, state storage, and approval decisions. With Sandbox Agents, the harness can stay in your infrastructure while commands run in a Unix-local, Docker, or hosted-provider workspace, so auth, audit logs and human review stay outside the container.

Agents API: OpenAI runs it. The managed harness handles sessions, orchestration, context compaction, and recovery, and it adds subagents, tool search, and programmatic tool calling. Remote MCP servers are called directly by OpenAI. Your code still handles function tools: when the session reports a function_call in required_actions, you return an agent.session.input.tool_result event with the turn_id and call_id.

The same task, both ways:

# Responses API: one model call; your code owns the loop
curl https://api.openai.com/v1/responses \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6.1-sol",
    "reasoning": {"effort": "low"},
    "tools": [{"type": "web_search"}],
    "input": "Summarize the breaking changes in the latest Node.js release."
  }'

# Agents API: a durable session; OpenAI owns the loop
curl https://api.openai.com/v1/agents/sessions \
  -H "OpenAI-Beta: agents=v1" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent": {"model": "gpt-6-astra", "tools": [{"type": "web_search"}]},
    "environment": {"type": "none"},
    "input": "Summarize the breaking changes in the latest Node.js release."
  }'

The Agents API docs’ examples use gpt-6-astra; they don’t say whether other models are accepted, so check before you swap in gpt-6.1-sol.

Compute, state, and cost

Compute. The Agents API can provision and manage a sandbox for the whole session: set environment.type to openai_hosted, self_hosted, or none. With the SDK, you choose and pay the sandbox provider. With Responses, code runs where you run it, apart from hosted tools.

State. An Agents API session holds configuration, turns, and items on OpenAI’s side, so a follow-up is one event on the same session ID. With Responses you chain previous_response_id or use Conversations. With the SDK, state lives in your storage or SDK sessions.

Cost. Token prices are identical everywhere, since each option calls the same models. The Agents API charges “no additional fees,” but hosted containers cost $0.03 (1 GB) to $0.48 (16 GB) per 20-minute session. The SDK’s extra cost is your own hosting. AgentKit has no separate subscription, per our AgentKit explainer.

Data. The Agents API supports US data residency only and doesn’t support Zero Data Retention, even with a self-hosted sandbox. OpenAI’s data controls page lists /v1/agents as not ZDR-eligible, with state retained until deleted, while /v1/responses is ZDR-eligible with limitations and available on regional endpoints such as eu.api.openai.com. If ZDR or EU residency is a requirement, that rules the Agents API out today.

AgentKit in late 2026: what’s left

AgentKit launched on October 6, 2025 as four pieces. Here’s where each stands:

As our AgentKit guide puts it, the durable, code-first path through AgentKit is the Agents SDK.

Which one to build on

Choose When
Agents API Tasks run for minutes, need files, commands, or a browser, and you don’t want to operate the loop, sandboxes, or session storage. US residency and a beta header are acceptable.
Responses API You make single calls, want every turn under your control, need ZDR or non-US data residency, or already have a working loop.
Agents SDK Typed application code must own tools, storage, approvals, and handoffs, and the loop must run in your infrastructure.
ChatKit You need an embedded chat UI in your product.
Agent Builder Don’t start here. Export existing workflows before November 30, 2026.

On AWS, Bedrock Managed Agents, powered by OpenAI, brings the Agents API’s core capabilities to run natively in AWS. For MCP wiring in either code-first path, see MCP servers with OpenAI agents.

Moving from your own Responses loop to the Agents API

If you’ve built a loop on Responses and want OpenAI to run it:

  1. Map the pieces. Instructions, model and tools move into agent; your container becomes environment; your conversation store becomes a session ID.
  2. Move remote MCP servers into agent.tools. Put their tokens in a vault attached with vault_ids, not in prompts.
  3. Rewrite function handling. Replace your function_call_output loop with a handler for agent.session.requires_action (stream) or agent.session.action_required (webhook) that returns agent.session.input.tool_result. Subagents can’t call function tools, so keep those on the main agent.
  4. Delete your compaction code. The harness compacts context automatically.
  5. Switch to events. Stream turn outcomes (agent.session.turn.completed, agent.session.turn.failed, agent.session.turn.cancelled) or use webhooks. An idle session doesn’t mean success.
  6. Check the constraints. US residency only, no ZDR, and a beta header.

Keep both in one Apidog project

Before you switch, run old and new side by side. In one Apidog project, create a Responses folder and an Agents API folder that share an environment with {{OPENAI_API_KEY}} and a model variable. Send the same prompts through both, assert on status codes and required output fields, and open the Agents API stream as an SSE request to watch turn events. Save the runs as a test scenario and run it in CI with the Apidog CLI, so a beta change shows up as a failed check. The production AI agent reliability guide covers what to assert. Download Apidog to set it up.

FAQ

Is the Agents API replacing the Responses API? No deprecation has been announced. OpenAI’s agents overview lists the Agents API, Agents SDK, and Responses API as current options for different needs.

Is OpenAI AgentKit deprecated? Partly. Agent Builder and Evals are scheduled to shut down on November 30, 2026; ChatKit remains available.

Does the Agents SDK use the Agents API? No. The SDK runs in your application; the Agents API runs a managed harness in OpenAI’s service.

What happened to the Assistants API? OpenAI’s deprecations page set its removal for August 26, 2026, and points developers to the Responses and Conversations APIs.

Which option is cheapest? Token prices match across all of them. The difference is hosted containers on the Agents API versus your own hosting with the SDK or Responses.

Pick one path this week

Choose by who should run the loop, then prove it with requests before writing an app. If you’re starting fresh, try one Agents API session and compare its output against your current Responses setup in Apidog.

button

Explore more

How to Use the Nano Banana 2.1 API

How to Use the Nano Banana 2.1 API

Call the Nano Banana 2.1 API (gemini-nano-banana-2.1): first image in curl, Python and JS, 2K/4K, editing, multi-turn, grounding and cost per image.

6 October 2026

Nano Banana 2.1 vs Nano Banana 2 vs Nano Banana Pro: Which Should You Use?

Nano Banana 2.1 vs Nano Banana 2 vs Nano Banana Pro: Which Should You Use?

Nano Banana 2.1 vs Nano Banana 2 vs Pro: specs, per-image prices at 1K/2K/4K, cost per 1,000 images, when reference-heavy editing flips the math.

6 October 2026

How to Use the Mistral Large 4 API?

How to Use the Mistral Large 4 API?

Call the Mistral Large 4 API in 5 minutes: key, first request, reasoning_effort chunks, images, function calling, JSON output and costs at $0.68/$2.09.

6 October 2026

Practice API Design-first in Apidog

Discover an easier way to build and use APIs

OpenAI Agents API vs Responses API vs Agents SDK vs AgentKit: which one to build on