Capability · Framework — agents
OpenAI Agents SDK
Released by OpenAI in March 2025, the Agents SDK is a lightweight but production-ready framework for orchestrating single- and multi-agent LLM apps. It provides agents with tools, handoffs between agents, guardrails for input/output validation, built-in tracing, sessions for memory, and both Python and TypeScript implementations. It works with the new OpenAI Responses API and third-party models via LiteLLM.
Framework facts
- Category
- agents
- Language
- Python / TypeScript
- License
- MIT
- Repository
- https://github.com/openai/openai-agents-python
Install
pip install openai-agents
# or
npm install @openai/agents Quickstart
from agents import Agent, Runner
agent = Agent(
name='Assistant',
instructions='Answer concisely.'
)
result = Runner.run_sync(agent, 'What is the capital of India?')
print(result.final_output) Alternatives
- LangGraph — more flexible, not OpenAI-centric
- CrewAI — role-based multi-agent
- Pydantic AI — typed Pythonic alternative
- AutoGen — Microsoft multi-agent equivalent
Frequently asked questions
Is this a replacement for Swarm?
Yes. OpenAI released the Agents SDK as the production-ready successor to the experimental Swarm library. It keeps the handoff/agent concept but adds guardrails, sessions, tracing, and first-class TypeScript support.
Can I use non-OpenAI models?
Yes. The SDK supports any model accessible via the OpenAI Responses API or via LiteLLM (Anthropic, Gemini, open models, etc.). Tracing still works across providers.
Sources
- OpenAI Agents SDK — docs — accessed 2026-04-20
- OpenAI Agents SDK — GitHub — accessed 2026-04-20