AI at WorkTopic: AI Automation and Agents →

OpenAI Agents API Explained for Small Teams

A plain-language guide to OpenAI's Agents API: the Codex harness it exposes, where agents run, what it costs, and the safety checks needed before agents act.

Headline card: OpenAI Agents API Explained for Small Teams
On this page
  1. What changed
  2. Why it matters
  3. What to test
  4. What to watch next
  5. The conclusion

OpenAI’s Agents API lets developers build and run cloud agents on the same harness and infrastructure that power Codex, with OpenAI hosting and maintaining that harness. For a small team, that means less custom orchestration: context management, tool handling, and subagent coordination come built in, and OpenAI says there are no extra fees beyond the tokens and tools an agent uses. It does not remove the need to design permissions, failure handling, and human review. An agent is not a longer chatbot reply. It is software that chooses and sequences actions, so ordinary software controls still apply.

What changed

The Agents API launched in public beta and is available to all developers. OpenAI’s framing is that useful agents need two things: a harness that manages context, uses tools efficiently, and coordinates subagents, and infrastructure that keeps them running reliably for long periods with somewhere to work on files and run code. The API packages both.

One call to start an agent. According to the announcement, you create an agent session in a single API call by specifying the task, model, tools, and environment. OpenAI’s own example creates a session through client.beta.agents.sessions.create, attaches an MCP server as a tool, enables up to three concurrent subagents, and points the agent at an OpenAI-hosted environment.

A choice of where agents run. OpenAI hosts the harness, but you choose the compute. Options are an OpenAI-managed sandbox, your own infrastructure, or a sandbox partner. Named partners include Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop, and Vercel, covering fully managed setups or deployments inside your own VPC, different file and secret storage mechanisms, and different CPU, GPU, and memory profiles. The OpenAI-hosted sandbox uses the same sandboxing infrastructure as Codex and ChatGPT and can be configured with your files, packages, skills, and plugins.

Harness features that usually take custom work. The announcement highlights four:

  • Context compaction. The API automatically compacts earlier context as a session nears its context limit, so workflows can span multiple context windows.
  • Tool search. Relevant tool definitions load as needed, which OpenAI says reduces token usage and cost while preserving the model’s cache.
  • Programmatic tool calling. Agents can run calls in parallel, chain operations, and filter results in code, bringing only relevant data back into context.
  • Subagents. Complex tasks can be split across parallel subagents, each with its own context, while a main agent coordinates and combines results.

The API supports MCP servers, custom functions, and built-in tools such as web search. OpenAI also says it provides versioned access to harness improvements with each model launch, and that the underlying Codex harness is open source, so developers can inspect the core logic even though OpenAI operates it.

Why it matters

The appeal for small teams is clear. Building reliable long-running agents usually means writing your own context management, retry logic, tool routing, and orchestration. Several customers quoted in the announcement describe replacing exactly that work. Ciridae said its evaluation score rose from 0.71 to 0.85 and that subagent support gave it a 4x latency reduction. SafetyKit reported a 60% reduction in cost per case after migrating a case review workflow. Hypha said separating the agent harness from the sandbox reduced failed agent responses by 86%. These are early customer claims selected by OpenAI, but they show where the gains are expected.

The trade-off is dependence. Your agent’s execution model, context handling, and upgrade cadence now follow OpenAI’s harness. Versioned access helps, but behavior can still shift when the harness or model changes. The open-source harness reduces the black-box problem, though inspecting the code is not the same as controlling how the hosted version runs.

Cost deserves attention too. No platform fee does not mean cheap. Parallel subagents, long sessions, and repeated tool calls all consume tokens, and costs grow with retries. If you plan to run agents on GPT-6 Astra, as OpenAI’s examples do, review the model’s pricing and controls in our GPT-6 Astra guide first.

Finally, the hard part of an agent is rarely the happy-path demo. Real systems meet stale credentials, ambiguous instructions, malicious content inside retrieved pages, duplicated actions, partial failures, and runaway spending. A better harness does not solve those for you.

What to test

Start with a prepare-only workflow. Let the agent gather sources, produce a draft, and generate a checklist, while a person keeps the final external action. This shows whether reasoning and tool selection are reliable without granting broad authority.

Track these from the first run:

  • each tool call and its inputs;
  • which source supported each important claim;
  • total tokens, tool costs, and elapsed time, including subagents;
  • retries, partial failures, and what happened after context compaction;
  • the exact point where a human approved the result.

Then put these questions to an architecture review:

  • Can every tool call be safely repeated, or does a retry risk a duplicate payment, email, or record?
  • Can the agent read untrusted web content without treating it as an instruction?
  • Are secrets kept out of prompts and logs, and does your chosen sandbox store them the way your policy requires?
  • Is there a hard spending limit per session, and does it account for parallel subagents?
  • Can a person reconstruct why an action happened, from logs you control?
  • What happens to your workflow if the beta API changes before general availability?

Before connecting an agent to email, payments, publishing, customer records, or production systems, define what it may read, what it may prepare, and what requires human confirmation.

What to watch next

The API is in public beta, and OpenAI says it will iterate quickly toward general availability based on feedback. Watch for changes to the interface and the pricing page, and for how versioned harness upgrades are communicated. It is also worth comparing this approach with other vendors’ long-running agent offerings, such as the controls discussed in our piece on Claude Opus 5 and long-running agents.

The conclusion

The Agents API gives small teams a fast path to agents that previously needed a lot of custom infrastructure, and the open-source harness and sandbox choices soften the lock-in. It is a strong option for prototypes and for workloads that benefit from parallel subagents. But responsibility stays with the application owner. Use the launch as a reason to build tighter boundaries, logging, and approval steps, not as a reason to remove them.

AI Tool Herald may earn a commission from some links on this site. It never changes what we report or recommend. Affiliate disclosure