DISCOVER THE FUTURE OF AI AGENTS

OpenAI Agents SDK

Added Feb 25, 2026
Agent & Tooling
Open Source
PythonWorkflow AutomationMulti-Agent SystemModel Context ProtocolAI AgentsAgent FrameworkSDKAgent & ToolingDeveloper Tools & CodingAutomation, Workflow & RPAProtocol, API & Integration

A lightweight, powerful multi-agent workflow framework by OpenAI with handoffs, function tools, guardrails, and built-in tracing for production-grade AI agent applications.

OpenAI Agents SDK is a lightweight, powerful multi-agent workflow framework open-sourced by OpenAI, providing a complete solution for building production-grade AI agent applications. Evolved from the experimental Swarm project into a production-ready release.

Core Primitives#

  • Agents: LLMs configured with instructions, tools, guardrails, and handoff mechanisms
  • Handoffs: Specialized tool calls for transferring control between agents
  • Guardrails: Configurable input/output validation and safety checks
  • Sessions: Automatic conversation history management across agent runs
  • Tracing: Built-in agent run tracing for visualization, debugging and optimization

Key Features#

FeatureDescription
Agent LoopBuilt-in loop handling tool calls and results until task completion
Python-firstLeverage Python native features to orchestrate agents
Function ToolsAuto-convert any Python function to tool with Pydantic validation
MCP ServerBuilt-in Model Context Protocol server tool integration
Provider-agnosticSupport OpenAI API and 100+ LLMs via LiteLLM
Realtime AgentsBuild voice agents with auto interruption detection
Human-in-the-loopBuilt-in human interaction mechanism
Encrypted SessionsSupport for encrypted persistent session storage

Installation#

# Basic installation
pip install openai-agents

# Voice support
pip install 'openai-agents[voice]'

# Redis session support
pip install 'openai-agents[redis]'

Quick Start#

from agents import Agent, Runner

agent = Agent(name="Assistant", instructions="You are a helpful assistant")
result = Runner.run_sync(agent, "Write a haiku about recursion.")
print(result.final_output)

Agent Handoff Example#

spanish_agent = Agent(name="Spanish agent", instructions="You only speak Spanish.")
english_agent = Agent(name="English agent", instructions="You only speak English")
triage_agent = Agent(
    name="Triage agent",
    instructions="Handoff to the appropriate agent based on language.",
    handoffs=[spanish_agent, english_agent],
)
result = await Runner.run(triage_agent, input="Hola, ¿cómo estás?")

Use Cases#

  • Multi-agent collaboration systems: Task delegation via Handoffs
  • Conversational AI applications: Cross-turn context memory via Sessions
  • Voice interaction systems: Realtime Agents for real-time voice conversations
  • Complex workflow orchestration: Deterministic flows, iterative loops
  • Production-grade AI applications: Built-in tracing, debugging, monitoring

Project Activity#

  • Latest Version: v0.10.1
  • Commits: 1,130+
  • Contributors: 218+
  • Primary Language: Python (99.8%)
  • Runtime: Python 3.10+
  • License: MIT License

Related Projects

View All

STAY UPDATED

Get the latest AI tools and trends delivered straight to your inbox. No spam, just intelligence.