Hasty Briefsbeta

Bilingual

OpenAI Agents API

20 days ago
  • The Agents API provides an OpenAI-managed Codex harness that handles sessions, orchestration, context compaction, and recovery while your application supplies tools and chooses the execution environment.
  • Agents can operate in sandboxes to execute code, edit files, connect to MCP servers, and produce artifacts, with usage billed at model API rates, standard OpenAI tool rates, and standard container rates for OpenAI-hosted sandboxes.
  • The API is built around four core concepts: Agent (model, instructions, tools, MCP servers), Environment (optional sandbox or computer), Session (durable agent instance), and Events/items (inputs and outputs during a session).
  • A session lifecycle includes creating a session, giving the agent a task, streaming output or using webhooks to track progress, and continuing or steering the agent in subsequent turns.
  • The managed harness supports running commands and code, applying skills/instructions, connecting to external data via tools or MCP, steering agents mid-turn, summarizing prior work for context management, delegating subtasks to subagents, and resuming sessions.
  • Session state is retained across turns, avoiding the need to rebuild conversation context; sessions and published artifacts can be deleted when no longer needed.
  • Currently, the Agents API supports data residency only in the United States and does not support Zero Data Retention (ZDR), even with a self-hosted sandbox.
  • Configuration examples show how to create a session with model, instructions, tools (programmatic tool calling, MCP server, web search), multi-agent delegation, and a self-hosted environment with capability directories.