◉AgentAgentic capabilityFree
OpenAI Agents SDK
OpenAI's lightweight Python framework for building multi-agent systems with handoffs, tracing, and guardrails.
Installs380k
Rating★ 4.8
Reviews127
OpenAI Agents SDK
The OpenAI Agents SDK (formerly Swarm) is a production-ready, MIT-licensed Python framework for building agentic applications. It ships with primitives for tool calling, agent handoffs, input/output guardrails, and a powerful tracing UI — plus first-class support for any model via the OpenAI-compatible API.
Key Features
- Agents: define agents as a model + system prompt + list of tools + optional handoff targets
- Handoffs: cleanly transfer control (and context) between specialised agents in a pipeline
- Tool calling: any Python function decorated with
@function_toolbecomes a callable tool - Guardrails: input and output validators run in parallel to the agent for fast rejection
- Tracing: built-in OpenAI dashboard traces every step — LLM call, tool call, handoff
- MCP support: mount any MCP server as a tool source without extra glue code
Quick Start
pip install openai-agents
from agents import Agent, Runner, function_tool
@function_tool
def get_weather(city: str) -> str:
return f"Sunny and 22°C in {city}"
agent = Agent(
name="Weather Bot",
instructions="Answer questions about weather using the provided tool.",
tools=[get_weather],
)
result = Runner.run_sync(agent, "What's the weather in Berlin?")
print(result.final_output)
npx ai-supply add openai-agents-python-sdk
Curated mirror of the open-source OpenAI Agents SDK (MIT). Get it from the source.