SpyBara
Go Premium

guides/agents.md 2026-09-23 23:58 UTC to 2026-09-24 23:58 UTC

This page contains 20 additions and 17 deletions.

2026
Fri 11 20:00 Thu 24 23:58 Fri 25 23:58

Agents

For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.

For new agent applications, start with the Agents API. OpenAI runs the Codex harness and manages orchestration, context compaction, and durable sessions. You build the surrounding application, connect tools, and choose where execution happens.

Follow the Agents API quickstart to run a task, stream progress, and continue a session.

Choose your starting point

You want to Start here
Build a new agent application with a managed runtime Agents API quickstart
Run the Codex harness in infrastructure you operate Codex SDK
Call models directly or own the agent loop Responses API

Compare agent runtime options

Choose based on what OpenAI manages and what your application needs to control.

Option What it manages What you operate
Agents API Hosted Codex harness, orchestration, and durable session state Your application, tool integrations, and choice of execution environment
Codex SDK Codex harness running in your environment The harness process, hosting, and application lifecycle
Responses API Model responses and configured hosted capabilities Application logic and any agent loop you build around the API

Use the Agents API architecture guide to understand the boundary between the hosted harness and your execution environment. For direct model integrations, the Responses API also offers hosted tools and state through response chaining or Conversations; follow its guides for the capabilities you use.

Add tools, skills, and prompt caching

Tool design, reusable skills, and prompt caching apply across agent workflows. Their configuration and lifecycle can differ by API.

An Agents API session, an SDK session, a Responses conversation, and a sandbox are different resources. Follow the state and cleanup instructions for the runtime you choose.

If you use the Agents SDK

The Agents SDK is feature complete: major new features are not planned, but maintenance, security fixes, critical bug fixes, and compatibility work continue. You can continue using it for existing applications. See also: SDK support policy.

For new agent applications, start with the Agents API.