deniz.in

Markets

Weather

Loading weather

· via Hacker News – Front Page (native)

OpenAI's Agents API exposes the Codex harness, with Vercel sandbox integration

OpenAI's new Agents API hands developers the Codex harness — sessions, orchestration, context compaction and subagents — as a managed service, with a Vercel integration pairing each session with an isolated sandbox.

OpenAI's Agents API exposes the Codex harness, with Vercel sandbox integration

OpenAI packages the Codex harness as a hosted API

OpenAI has launched an Agents API that gives applications direct access to the Codex harness, the orchestration layer behind its coding agent. According to OpenAI's documentation, which circulated on the Hacker News front page, the service is fully managed: OpenAI handles sessions, orchestration, context compaction and recovery, while the developer supplies the tools and chooses the execution environment. Agents running under the harness can execute code, edit files, connect to MCP servers and produce artifacts inside a sandbox.

How a session works

The API is built around four concepts, per the docs:

  • Agent: the model, instructions, tools and MCP servers available to it.
  • Environment: an optional sandbox or computer where the agent accesses files, loads skills and runs commands.
  • Session: a durable instance of an agent that works through tasks and responds to input.
  • Events and items: the inputs sent to, and outputs produced by, the session.

A session begins by configuring the agent, at which point OpenAI provisions the environment. A user message starts a turn of work once that environment is ready. Developers follow progress by streaming output or waiting on webhooks that fire when the agent finishes or needs input, then either send another task to the same session or steer the agent during its current turn. State persists between turns, so the conversation context does not need rebuilding, and sessions and published artifacts can be deleted when they are no longer needed.

The managed harness supports running commands and code in a sandbox, applying skills and instructions, pulling external data through tools or MCP, steering mid-turn, summarizing earlier work to stay within the context window, splitting work into subtasks delegated to subagents, and resuming a session where it left off. The quickstart's Python example creates a session via client.beta.agents.sessions.create, wiring up programmatic tool calling, an OpenAI documentation MCP server, web search, and multi-agent mode capped at four concurrent subagents, running on a model the example names gpt-6-astra. Environments can be OpenAI-hosted sandboxes or self-hosted workspaces.

Billing and example applications

Billing is layered, according to the documentation: model usage is charged at the selected model's API rates, OpenAI's built-in tools at their standard rates, and OpenAI-hosted sandboxes at standard container rates. The docs ship with a set of reference applications, including an incident-response agent that investigates alerts and requests approval for recovery actions, a Slack bot, a data analyst answering warehouse questions over read-only SQL, a GitHub issue investigator that reproduces reported bugs and posts findings back to GitHub, and a document reviewer that applies policy skills with specialist agents.

The Vercel integration

Vercel has published a companion integration. According to the Vercel changelog, you can host the agent-facing application on Vercel and attach each session to Vercel Sandbox for code execution and file access. OpenAI still runs the agent loop and holds session state, while signed OpenAI webhooks are processed durably through Vercel Queues and Vercel Sandbox provides an isolated execution environment that persists for each session. Vercel highlights workspaces that survive follow-up instructions, reliable handling of sandbox lifecycle events, and infrastructure that scales to zero rather than keeping virtual machines running. A step-by-step guide and a sample application are available.

Caveats

The launch comes with constraints that matter for regulated customers. According to the documentation, the Agents API currently supports data residency only in the United States and does not support Zero Data Retention — and choosing a self-hosted sandbox does not make the API ZDR-eligible.

Why it matters

The genuinely hard parts of agentic software — long-lived state, context management across extended tasks, subagent orchestration and resumability — have so far been things teams built themselves on top of raw model APIs. Packaging the Codex harness as a metered service turns that scaffolding into a platform primitive and puts OpenAI in direct competition with agent frameworks. The split between a managed loop and pluggable execution environments, spanning OpenAI-hosted sandboxes and third-party options like Vercel Sandbox, keeps deployment flexible. The US-only residency and absence of ZDR support, however, draw a clear boundary around where the API can responsibly be used today.

  • #openai
  • #ai-agents
  • #codex
  • #vercel
  • #sandbox

Related posts