OpenAI Agents SDK

OpenAI Agents SDK

By OpenAI

OpenAI's lightweight SDK for agents with tools, handoffs, and guardrails

v0.18.32026-07-17PythonMIT
28.1k Completely free Open source

Doc version 1.0 · Updated

Related concepts

Related tools

Overview

The OpenAI Agents SDK is a lightweight, provider-first framework for building agents from a few primitives: agents, tools, handoffs between agents, and guardrails.
It is the production-oriented successor to OpenAI’s Swarm experiment, with built-in tracing and a small surface area.

flowchart LR
  input[input] --> r[Runner]
  r --> agent[Agent]
  agent --> tools[tools / handoffs]
  agent --> out[final output]

The Code samples tab shows a minimal single-agent run.

When to use it

Choose it when you want a thin, composable agent loop close to the OpenAI API — especially for tool use, multi-agent handoffs, and guardrails — without adopting a larger orchestration framework.