DEV Community

Cover image for OpenAI Agents API vs Responses API vs Agents SDK vs AgentKit: which one to build on
Hassann
Hassann

Posted on Originally published at apidog.com

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

These four names operate at different layers. The key decision is simple: who runs the agent loop? The Responses API is a model endpoint, so your application runs the loop. 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 manages the session and, optionally, the sandbox. AgentKit is the October 2025 bundle of Agent Builder, ChatKit, Connector Registry, and Evals; Agent Builder is scheduled to shut down on November 30, 2026.

Try Apidog today

DevDay on September 29 added computer use to the Agents API, making the naming distinction more important. See the DevDay 2026 roundup. This guide compares the loop, compute, state, pricing, and maturity of each option, then shows how to migrate from a hand-rolled Responses loop. For sessions and approvals, read the OpenAI Agents API guide. You can test each HTTP surface 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 TypeScript and Python library Bundle: Agent Builder, ChatKit, Connector Registry, Evals
Who runs the loop OpenAI Your code SDK runner in your app Agent Builder workflows, exported to SDK code or embedded with ChatKit
Where compute runs OpenAI-hosted sandbox, your 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 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 new projects Current Agent Builder and Evals shut 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, Agents API overview, and deprecations page.

Who runs the loop

This is the decision that drives most of the other tradeoffs.

Responses API: your code runs the loop

Hosted tools such as web search, file search, code interpreter, and remote MCP can perform multiple internal calls in one request. Your custom functions are different: the model returns a function_call item, your application executes it, and then you submit a function_call_output with the same call_id.

Your application controls:

  • When the loop stops
  • How conversation history is stored
  • Whether responses are persisted (store: false disables default storage)
  • When long contexts are compacted with context_management and compact_threshold
  • How function calls are retried, approved, audited, or rejected

Use the Responses API guide and function calling guide when implementing this loop.

Agents SDK: the SDK runner runs the loop in your process

The SDK runner handles the agent loop and handoffs, but your server still owns:

  • Deployment
  • Tool implementations
  • State storage
  • Human approval flows
  • Authentication and audit logs

With Sandbox Agents, the harness can stay in your infrastructure while commands run in a Unix-local, Docker, or hosted-provider workspace. This keeps approval and access-control decisions outside the sandbox.

Agents API: OpenAI runs the loop

The managed harness handles sessions, orchestration, context compaction, and recovery. It also adds subagents, tool search, and programmatic tool calling.

Remote MCP servers are called directly by OpenAI. Your application still handles custom function tools: when a session includes a function_call in required_actions, submit an agent.session.input.tool_result event containing the turn_id and call_id.

Compare the same task

# 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."
  }'
Enter fullscreen mode Exit fullscreen mode

The Agents API documentation uses gpt-6-astra in its examples. It does not state whether other models are accepted, so verify compatibility before replacing it with gpt-6.1-sol.

Compute, state, and cost

Compute

The Agents API can provision and manage a sandbox for the full session. Set environment.type to one of:

  • openai_hosted
  • self_hosted
  • none

With the Agents SDK, you select and pay for the sandbox provider. With Responses, code runs in your environment except for OpenAI-hosted tools.

State

An Agents API session stores configuration, turns, and items on OpenAI’s side. Send a follow-up as an event on the same session ID.

With Responses, chain turns with previous_response_id or use the Conversations API. With the SDK, state lives in your storage, SDK sessions, or Responses state.

Cost

Token pricing is identical across these options because they call the same models.

The Agents API has no additional platform fee, but hosted containers cost from $0.03 for 1 GB to $0.48 for 16 GB per 20-minute session. The SDK adds the cost of your own hosting. AgentKit has no separate subscription, according to the AgentKit explainer.

Data controls

The Agents API supports US data residency only and does not support Zero Data Retention, including when you use a self-hosted sandbox.

OpenAI’s data controls page lists /v1/agents as not ZDR-eligible, with state retained until deletion. In comparison, /v1/responses is ZDR-eligible with limitations and is available through regional endpoints such as eu.api.openai.com.

If ZDR or EU residency is required, the Agents API is not currently an option.

AgentKit in late 2026: what remains

AgentKit launched on October 6, 2025 with four components:

  • Agent Builder: Deprecation was announced June 3, 2026. Shutdown is scheduled for November 30, 2026. OpenAI’s migration guide exports workflows as Agents SDK code or recreates them as ChatGPT Workspace Agents for Business, Enterprise, or Edu.
  • Evals: Existing evals become read-only on October 31, 2026. The dashboard and API are scheduled to shut down on November 30.
  • ChatKit: Remains available for embedded chat.
  • Connector Registry: The administration panel for connectors and MCP servers across OpenAI products.

For a durable, code-first AgentKit path, use the Agents SDK. See the AgentKit guide.

Which option should you build on?

Choose Use it when
Agents API Tasks run for minutes, need files, commands, or a browser, and you do not want to operate the loop, sandboxes, or session storage. US residency and a beta header are acceptable.
Responses API You make single calls, need complete control over each turn, require ZDR or non-US 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 Do not start new work 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 integration in either code-first option, see MCP servers with OpenAI agents.

Move from a Responses loop to the Agents API

If you already run a Responses-based tool loop and want OpenAI to operate it, migrate in these steps.

  1. Map your existing components.

    Move instructions, model selection, and tools into agent. Map your container configuration to environment. Replace your conversation store with a session ID.

  2. Move remote MCP servers into agent.tools.

    Store server tokens in a vault attached through vault_ids; do not include secrets in prompts.

  3. Rewrite custom function handling.

    Replace the function_call_output loop with a handler for:

    • agent.session.requires_action when streaming
    • agent.session.action_required when using webhooks

Return results with agent.session.input.tool_result.

Subagents cannot call function tools, so keep function-tool execution on the main agent.

  1. Remove application-side compaction logic.

    The managed harness compacts context automatically.

  2. Handle turn events.

    Stream or receive webhooks for:

    • agent.session.turn.completed
    • agent.session.turn.failed
    • agent.session.turn.cancelled

Do not treat an idle session as a successful turn.

  1. Validate platform constraints first. Confirm that US-only residency, no ZDR support, and the required beta header work for your application.

Keep both implementations in one Apidog project

Before switching production traffic, test the old and new paths side by side.

  1. Create a Responses folder and an Agents API folder in one Apidog project.
  2. Add a shared environment containing:
    • {{OPENAI_API_KEY}}
    • A model variable
  3. Send identical prompts through both implementations.
  4. Assert status codes and required output fields.
  5. Open the Agents API stream as an SSE request to inspect turn events.
  6. Save the requests as a test scenario.
  7. Run the scenario in CI with the Apidog CLI.

This makes beta-level API changes visible as failed checks instead of production surprises. For assertion ideas, read the production AI agent reliability guide.

Download Apidog to set up the project.

FAQ

Is the Agents API replacing the Responses API?

No deprecation has been announced. OpenAI lists the Agents API, Agents SDK, and Responses API as current options for different requirements.

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 sets its removal for August 26, 2026 and directs developers to the Responses and Conversations APIs.

Which option is cheapest?

Token prices are the same. The main difference is hosted-container pricing for the Agents API versus the infrastructure costs you operate with the SDK or Responses API.

Pick one path this week

Choose based on who should operate the loop, then validate the choice with real requests before building the application.

If you are starting fresh, create one Agents API session and compare its output with your existing Responses setup in Apidog.

Top comments (0)