# OpenAI Agents SDK

> OpenAI's lightweight, open-source framework for agents — handoffs, guardrails, sessions, and built-in tracing.

OpenAI's open-source Agents SDK is a small, unopinionated framework for building agents: a core agent loop plus handoffs (delegation between agents), guardrails (input/output validation), sessions (memory), and built-in tracing. The production-grade successor to Swarm; works with non-OpenAI models too.

Website: https://openai.github.io/openai-agents-python/

The OpenAI Agents SDK is OpenAI's lightweight, open-source framework for building agentic applications. It's the production-ready successor to the experimental Swarm project, and its design philosophy is "few primitives, learned fast": a core agent loop, plus a handful of well-chosen building blocks rather than a large abstraction layer.

It is aimed at developers who want a minimal, Pythonic framework with the essentials built in. Although it comes from OpenAI, it is **provider-agnostic** — you can run agents on non-OpenAI models — which makes it a reasonable default even outside the OpenAI ecosystem.

## Highlights

- **Agents & the loop** — define an agent with instructions and tools; the SDK runs the model-tool-observation loop for you.
- **Handoffs** — delegate from one agent to another, the SDK's mechanism for multi-agent systems.
- **Guardrails** — validate inputs and outputs (and run checks in parallel) to keep agents safe and on-task.
- **Sessions** — built-in conversation memory across runs.
- **Tracing** — first-class tracing for debugging and evaluating agent runs.

## In an AI-assisted workflow

```python
from agents import Agent, Runner

agent = Agent(name="Support", instructions="Help with billing", tools=[lookup_invoice])
result = Runner.run_sync(agent, "Why was I charged twice?")
```

> [!TIP]
> Reach for the Agents SDK when you want a small, standard agent loop with handoffs and guardrails and minimal ceremony. For explicit state graphs and checkpointing, compare [LangGraph](/tools/langgraph); for role-based crews, [CrewAI](/tools/crewai).

## Good to know

The Agents SDK is open source (MIT) and free; you pay your model provider for tokens. It works with OpenAI models out of the box and with other providers through compatible interfaces. See [the agent framework comparison](/guides/concepts/agent-frameworks-2026) for how it stacks up against LangGraph, CrewAI, AutoGen, and the Claude Agent SDK.

---

_Source: https://agentscamp.com/tools/openai-agents-sdk — Tool on AgentsCamp._
