OpenAI Agents API Launch: Build Cloud Agents with Codex

OpenAI has officially launched the Agents API, a managed cloud service designed to simplify the development and deployment of autonomous agents. The new API leverages the Codex harness for orchestration, enabling developers to build agents that handle long-running sessions, maintain state across interactions, and execute multi-step workflows without managing custom infrastructure. The service is now available to developers through OpenAI's platform.
Codex-Powered Orchestration
At the core of the Agents API is the Codex harness, OpenAI's orchestration engine that manages the execution of agent workflows. Unlike traditional API calls that return immediate responses, the Agents API supports persistent sessions where agents can operate over extended periods, maintaining context and state between interactions. This architecture allows developers to build agents that perform complex, multi-turn tasks such as data analysis pipelines, customer service workflows, or research synthesis without writing custom session management code.
The Codex harness handles task decomposition, tool selection, and execution sequencing automatically. When an agent encounters a subtask requiring external data or computation, the harness coordinates tool invocations and integrates results back into the workflow. This managed approach reduces the engineering overhead typically associated with building production-grade agent systems.
Long-Running Sessions and State Management
The Agents API introduces native support for long-running sessions, a critical requirement for agents that operate across hours or days. Developers can launch an agent session, allow it to execute asynchronously, and retrieve results or intermediate outputs at any point. The API maintains session state in the cloud, eliminating the need for developers to implement their own persistence layers.
- Sessions persist across API disconnections and can resume without data loss
- Agents can schedule delayed actions or wait for external events before continuing execution
- Developers query session status and outputs through a unified interface
This session model is particularly valuable for agents handling workflows like scheduled report generation, continuous monitoring tasks, or multi-day research projects where immediate completion is not required.
Tool Use and Integration
The Agents API provides a standardized framework for tool use, allowing agents to interact with external APIs, databases, and services during execution. Developers define available tools using a schema that describes inputs, outputs, and execution behavior. The Codex harness then decides when and how to invoke these tools based on the agent's current task and available context.
Tool integrations can range from simple data retrieval functions to complex operations like executing code, querying vector databases, or triggering webhooks. The API supports both synchronous and asynchronous tool calls, with automatic retry logic and error handling managed by the orchestration layer. This abstraction lets developers focus on defining what tools do rather than managing the control flow of when and how they execute.
Availability and Access
Officially launched on January 2025, the Agents API is accessible through OpenAI's developer platform. Developers can authenticate using existing OpenAI API keys and provision agent sessions through standard REST endpoints. The service includes usage-based pricing tied to session duration and compute resources consumed during agent execution.
OpenAI has published API documentation covering session lifecycle management, tool definition schemas, and example workflows. The initial release supports Python and JavaScript SDKs, with additional language bindings planned for future updates. Developers can monitor agent execution through a dashboard that displays real-time logs, tool invocations, and performance metrics.
What This Means
The Agents API represents OpenAI's entry into managed agent infrastructure, competing with emerging orchestration platforms and internal tooling that many organizations have built in-house. By abstracting the complexity of stateful workflows and multi-step reasoning, OpenAI lowers the barrier for developers to deploy autonomous agents in production environments. The service's integration with the Codex harness positions it as a foundation for building business automation, research assistants, and customer-facing agent applications without the overhead of managing distributed systems. As agent-based architectures become central to AI application development, managed orchestration services like the Agents API will likely define how developers build and scale autonomous systems.
on Emergent today






