OpenAI Agents API: Architecture, Pricing & Responses API Differences

The OpenAI Agents API is a managed agent harness for durable software-engineering tasks. OpenAI manages sessions, orchestration, context compaction and recovery; your application still chooses tools and controls permissions and external side effects.

Published September 11, 2026 · Updated September 30, 2026 · Verified against official OpenAI developer documentation

Quick answer

What the Agents API manages

The API gives an agent a durable session in which it can run code, edit files, connect to MCP servers and produce artifacts inside a sandbox. OpenAI manages the execution harness, including turn orchestration, context compaction and recovery. The application supplies or selects the environment and exposes the tools the agent may use.

OpenAI also documents an OpenAI-hosted browser for computer-use workflows and deferred tool search for loading tools when needed. Authentication and consequential browser actions still need explicit approval handling.

Amazon Bedrock Managed Agents, powered by OpenAI, is a separate AWS preview built on a customized AWS-native Agents API. It adds IAM roles, supported CloudTrail activity and AWS resource integration. Do not assume its preview status or feature set applies to the OpenAI-hosted API.

Agents API vs Agents SDK vs Responses API

OptionWho runs the loop?Best fit
Agents APIOpenAI managed harnessDurable cloud agents, managed sessions and sandboxed engineering work
Agents SDKYour application using SDK primitivesCustom orchestration, handoffs, guardrails and application-owned workflows
Responses APIYour applicationDirect model requests and explicit tool calls with maximum control

How pricing works

OpenAI does not publish one flat price for an Agents API run. Budget each layer separately:

A realistic estimate therefore needs expected turns, tokens per turn, tool calls, sandbox duration and external service costs. Use the AI agent cost calculator for a workload estimate, then replace assumptions with trace data from a representative test set.

Sessions, turns and observability

A session preserves working context across turns. Traces and logs help teams inspect model calls, tool activity, timing and failures. A completed turn does not prove every requested tool action succeeded, so applications should verify important outcomes explicitly.

Security and responsibility boundaries

Managed does not mean permissionless. Your application remains responsible for tool scopes, approval gates, secret handling, data retention and confirmation before consequential external actions.

Expose only the tools and credentials required for the task. Validate artifacts before deployment, require human approval for irreversible actions and keep external side effects idempotent where possible.

When to choose it

Official OpenAI sources

Related APIpulse guides