OpenAI Agents SDK
The OpenAI Agents SDK is OpenAI's official Python framework for building production-grade agents. Released in 2025 as the successor to the experimental Swarm prototype, it is built on the Responses API. The SDK exposes four primitives: agents (with instructions, tools, handoffs, and an output_type), tools (Python functions), handoffs (control transfer between agents), and guardrails (input/output validators). It includes built-in tracing visible in the OpenAI dashboard, structured outputs via Pydantic, and async support. The SDK works primarily with OpenAI models but supports other providers via Responses API compatibility layers.
Example
A triage application defines a triage agent with handoffs to a billing agent and a tech-support agent; the runner loops the triage agent until it either resolves the issue or hands off, and the destination agent then runs its own loop. Tracing on the OpenAI dashboard surfaces every tool call, handoff, and model response with latency, which makes prompt-engineering changes measurable rather than vibes-based.
Put this into practice
Build polished, copy-ready prompts in under 60 seconds with SurePrompts.
Try SurePrompts