SpyBara
Go Premium

guides/agents/sdk.md 2026-09-10 18:01 UTC to 2026-09-11 20:00 UTC

This page contains 66 additions and 0 deletions.

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

Agents SDK

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

Agents can plan and complete tasks using tools, work with other agents, and maintain context across steps.

Get your first agent running

Start with the Agents SDK quickstart to install the SDK, define one agent, and run it. Once that works, return here to choose the next capability your application needs.

Get the Agents SDK

Use the GitHub repositories for more examples, issues, and language-specific reference details.

[TypeScript SDK

    Open the TypeScript SDK repository on GitHub.](https://github.com/openai/openai-agents-js)

[Python SDK

    Open the Python SDK repository on GitHub.](https://github.com/openai/openai-agents-python)

Choose your starting point

If you want to Start here Why
Build a code-first agent app Quickstart This is the shortest path to a working SDK integration.
Define one specialist cleanly Agent definitions Start here when you are still shaping the contract for a single agent.
Choose models, defaults, and transport Models and providers Use this when model choice, provider setup, or transport strategy affects the workflow.
Understand the runtime loop and state Running agents This is where the agent loop, streaming, and continuation strategies live.
Run work in a container-based environment Sandbox agents Use this when the agent needs files, commands, packages, snapshots, mounts, or provider links.
Design specialist ownership Orchestration and handoffs Use this when you need more than one agent and must decide who owns the reply.
Add validation or human review Guardrails and human review Use this when the workflow should block or pause before risky work continues.
Understand what a run returns Results and state This page explains final output, resumable state, and next-turn surfaces.
Add hosted tools, function tools, or MCP Using tools and Integrations and observability Tool semantics live in the platform tools docs; SDK-specific MCP and tracing live here.
Inspect and improve runs Integrations and observability and evaluate agent workflows Use traces for debugging first, then move into evaluation loops.
Build a voice-first workflow Voice agents Use the SDK voice pipeline and realtime agent patterns.

Build with the SDK

Use the SDK track when your server owns deployment, tool implementations, state storage, and approval decisions, while the SDK runs the agent loop and invokes those tools. That path is the best fit when you want:

  • typed application code in TypeScript or Python
  • direct control over tools, MCP servers, and runtime behavior
  • custom storage or server-managed conversation strategies
  • tight integration with existing product logic or infrastructure

A typical SDK reading order is:

Compare agent runtime options

Use the Agents overview to compare the Agents SDK, Agents API, and Responses API. The Agents SDK runs in your application; the Agents API runs a managed harness in OpenAI's service.