// HACKER NEWS — CYBERSECURITY
OpenAI Agents API
The Agents API gives your application access to the Codex harness through an OpenAI-managed API.
OpenAI manages sessions, orchestration, context compaction, and recovery while your application provides tools and chooses its execution environment.
Agents can operate in a sandbox where they can execute code, edit files, connect to MCP servers, and produce artifacts.
Model usage is billed at the selected model’s API rates. OpenAI tools use their standard rates, and OpenAI-hosted sandboxes use standard container rates.
Start with an OpenAI-hosted sandbox in the quickstart:
With an OpenAI-hosted session, your application sends input and receives events, while OpenAI runs the agent and provisions and manages its sandbox. See environment options for setup and limitations.
Check the quickstart prerequisites for API-key permissions and SDK setup. Configure these capabilities when you create a session:
The Agents API retains session state so you can continue work across turns without
rebuilding the conversation context. You can delete sessions and published
artifacts when you no longer need them.
The Agents API currently supports data residency only in the United States and
does not support Zero Data Retention (ZDR). Choosing a self-hosted sandbox does
not make the Agents API ZDR-eligible. See Data controls
in the OpenAI platform
for details on data residency and retention.