What is it?
A small toolkit from OpenAI for building agents: you define an agent with instructions and tools, let it hand work to other agents, add guardrails to check inputs and outputs, and trace what happened.
Also known as: OpenAI Agents SDK, agents sdk, openai swarm, handoffs agents, openai agents python, agent guardrails sdk.
Technical definition
Introduced in 2025 as a production-oriented evolution of an earlier experimental library (Swarm). Documented primitives include agents, tools (function tools, hosted tools), handoffs between agents, guardrails (input/output validation), sessions/memory and tracing. As of 2026-10-09 there are Python and JavaScript/TypeScript SDKs, and the Python README describes the SDK as provider-agnostic (OpenAI Responses and Chat Completions APIs plus other LLMs through adapters such as LiteLLM). Feature parity with hosted OpenAI tools still varies by provider and should be checked per feature.
Entity type: framework · Freshness class: volatile.
When should I use it?
Reasonable when you already build on the vendor's API and want first-party primitives.
Implementation patterns
- Triage agent with specialist handoffs.
- Input/output guardrails running alongside the agent.
- Function tools wrapping your services with validation.
Technologies and frameworks
Commonly associated: OpenAI Agents SDK (Python/JS), tracing, hosted tools. Names are examples of what exists, not recommendations, and projects change quickly.
Practical guide
- Read the current docs.
- Define narrow agents and tools.
- Add guardrails and limits.
- Enable tracing and evaluate.
Common failure modes
- Assuming guardrails are complete security.
- Provider-specific features not portable.
- Version drift.
- Unbounded tool loops.
Troubleshooting
- Handoffs not triggered — Clarify handoff descriptions and agent instructions.
- Behaviour differs with another provider — Check which features are provider-specific.
Contrasted with
- LangGraph — LangGraph exposes explicit graph state; the Agents SDK emphasises small primitives (agents, handoffs, guardrails).
Questions this page answers
- What is the OpenAI Agents SDK?
- What is a handoff in an agent SDK?
- Can the Agents SDK use other model providers?
- OpenAI Agents SDK vs LangGraph?
Typical goals: build agents with vendor tooling; understand handoffs and guardrails.
Sources and verification
Status: not independently verified. This entry was authored on 2026-10-06 from general technical knowledge, without live checking of the sources below. Treat every source as a lead to confirm (identifier, title, authorship, current version) before publication or citation.
Freshness class: volatile — Products, versions, protocols, benchmarks, leaderboards, regulations and dates. Verify against the primary source before relying on specifics; re-review every 3 months.
Time-sensitive claims to verify before relying on them:
- Existence, API, licensing, language support and provider-agnostic claims — verify all.
Canonical sources (unverified leads):
- OpenAI Agents SDK documentation — openai.github.io/openai-agents-python (verify)
- Repository — github.com/openai/openai-agents-python (verify)