# Agents API Agents API gives applications access to an OpenAI-managed Codex harness for building durable cloud agents. It manages sessions, orchestration, context compaction, and recovery while the application supplies tools and selects the execution environment. - Findings24: - ウェブサイト: - 料金: Freemium - カテゴリー: AIエージェント基盤 ## Agents APIとは? Agents API is an API runtime for applications that need agents to perform multi-step work over durable sessions. It exposes the Codex harness through an OpenAI-managed API, separating the agent’s task execution from the application’s user interface or surrounding workflow. OpenAI manages session state, orchestration, context compaction, and recovery, while the application configures the agent, provides tools, and chooses whether to use an OpenAI-hosted sandbox, a self-hosted sandbox, or no sandbox. An agent is configured with a model, instructions, tools, and optional MCP servers. An environment can provide a sandbox or computer where the agent accesses files, loads skills, and runs commands. During a session, the application sends input and receives events and items representing progress and output. Applications can stream output or use webhooks to learn when work finishes or when the agent needs input, then continue the same session with another task or steer the agent during its current turn. ## Agents APIでできること ### Managed durable sessions OpenAI manages session configuration, turns, and items so an application can continue work in the same session, send additional tasks, or resume where the agent left off. ### Orchestration and context management The harness handles orchestration, automatic context compaction, and recovery. It can also summarize previous work to help manage the agent’s context window. ### Sandbox and environment options Agents can run commands and code, edit files, load skills, and access a workspace. Applications can use an OpenAI-hosted sandbox, a self-hosted sandbox, or no sandbox, subject to the selected environment’s setup and limitations. ### Tools and MCP connectivity An agent can use configured tools and connect to external data through MCP servers. The documented configuration also supports web search and programmatic tool calling. ### Multi-agent delegation The managed harness can break work into subtasks and delegate independent work to subagents, with multi-agent behavior configured when a session is created. ### Progress events and steering Applications can stream agent output or use webhooks to track progress, detect completion or requests for input, and guide the agent during an active turn. ## 利用シーン ### Research and technical investigation Configure an agent with web search and an MCP server to investigate a technical question, check recent information, and combine findings from delegated research tasks. ### Incident response Use an agent to investigate alerts and request approval before recovery actions, keeping the investigation and subsequent turns in a durable session. ### Data analysis Build a data analyst workflow that answers warehouse questions with read-only SQL, using the application’s configured tools and execution environment. ### Document review Set up a reviewer that applies policy skills and specialist agents to examine documents and return consolidated findings. ### Connected workplace and code workflows Use connected tools for requests in a workplace system, or investigate a GitHub issue by reproducing a reported bug and sharing the findings on GitHub. ## よくある質問 ### What does Agents API manage for my application? OpenAI manages the Codex harness, including sessions, orchestration, context compaction, and recovery. Your application configures the agent, provides tools, selects the environment, sends input, and consumes events and output. ### Where can an Agents API agent run? The documented options are an OpenAI-hosted sandbox, a self-hosted sandbox, or no sandbox. A sandbox can provide access to files, skills, commands, and code execution; setup and limitations depend on the environment option. ### How does an application follow or continue agent work? After creating a session and giving the agent a task, the application can stream output or use webhooks to learn when the agent finishes or needs input. It can send another task to the same session or steer the agent during its current turn. ### Can Agents API use external services or other agents? Yes. Agents can be configured with tools and MCP servers for external data connections, and the managed harness supports delegating subtasks to subagents. The application must configure the relevant tools, servers, and permissions. ### How is Agents API different from the Agents SDK? Agents API runs a managed Codex harness and saves session progress. The Agents SDK runs in the application and gives the application more control over deployment, storage, approvals, and runtime integration. ## クイック情報 - **Product type**: Managed agent runtime API - **Primary platform**: OpenAI API - **Core runtime**: OpenAI-managed Codex harness - **State model**: Durable sessions with saved configuration, turns, and items - **Environment options**: OpenAI-hosted sandbox, self-hosted sandbox, or no sandbox - **Billing basis**: Selected model API rates, standard rates for OpenAI tools, and standard container rates for OpenAI-hosted sandboxes