openai-agents-python
OpenAI Agents SDK is a Python framework for building multi-agent workflows that delegate tasks between LLM-powered agents. It supports 100+ LLMs, includes sandbox environments for long-running tasks, and provides guardrails, tracing, and human-in-the-loop capabilities.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | openai/openai-agents-python |
| Owner | openai |
| Primary language | Python |
| License | MIT — OSI-approved |
| Stars | 27.7k |
| Forks | 4.3k |
| Open issues | 65 |
| Latest release | v0.18.0 (2026-07-07) |
| Last updated | 2026-07-07 |
| Source | https://github.com/openai/openai-agents-python |
What openai-agents-python is
A provider-agnostic Python SDK enabling agentic orchestration with LLM routing, tool integration (functions, MCP, hosted), session management, and realtime voice agent support via gpt-realtime-2.1. Includes optional Redis sessions, SQLAlchemy persistence, and WebSocket support.
Get the openai-agents-python source
Clone the repository and explore it locally.
git clone https://github.com/openai/openai-agents-python.gitcd openai-agents-python# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Requires Python 3.10+; plan dependency management for optional voice and Redis packages.
- OpenAI API key and billing model required; multi-model support via any-llm/LiteLLM adds abstraction but increases configuration surface.
- Sandbox agents require local filesystem or container client setup; UnixLocalSandboxClient may need hardening for production use.
- Human-in-the-loop workflows demand external approval mechanisms; framework provides hooks but you must implement the UI/workflow.
- Sessions auto-manage conversation history, but Redis or SQLAlchemy persistence setup needed for multi-instance deployments.
When to avoid it — and what to weigh
- Simple single-agent retrieval-augmented generation (RAG) — If you only need a single LLM with basic retrieval, this framework adds unnecessary complexity. Consider simpler libraries like LangChain's BasicRetriever or direct API calls.
- Strict air-gapped or offline deployments — Framework ties closely to OpenAI APIs and cloud-based tracing. Disconnected environments will require significant adaptation or forking.
- Non-Python ecosystems — Python-only implementation. JavaScript/TypeScript teams should use the separate openai-agents-js SDK.
- Real-time sub-100ms latency requirements — Agent orchestration overhead and LLM round-trips incompatible with ultra-low-latency applications.
License & commercial use
MIT License. Permissive OSI-compliant license allowing commercial use, modification, and redistribution with attribution.
MIT permits commercial use without restriction. However, verify OpenAI API Terms of Service for your specific use case (cost implications, data handling, content policies). SDK dependencies (Pydantic, SQLAlchemy, websockets) are also OSI-compatible; no licensing conflicts apparent. Requires review if deploying proprietary agent systems or in regulated industries.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Strong |
| Assessment confidence | High |
Framework includes guardrails for input/output validation, but effectiveness depends on configuration. Tool execution (external functions, MCP servers) introduces attack surface; no mention of sandboxing isolation beyond optional container runtime. Tracing sends agent execution details to OpenAI; ensure sensitive prompts/outputs are handled appropriately. Sandbox agents run arbitrary commands if misconfigured; validate manifest entries. No security audit references provided—requires independent review for high-stakes deployments.
Alternatives to consider
LangChain AgentExecutor / LangGraph
Broader LLM ecosystem support and maturity. LangGraph offers explicit graph-based workflows; less opinionated on handoffs and sandbox patterns.
AutoGen (Microsoft)
Focus on multi-agent conversation and nested tasks. Stronger emphasis on code execution in isolated Docker containers; less voice/realtime integration.
Claude SDK (Anthropic) + tool_use
If locked into Claude models, native tool calling is simpler. No multi-agent handoff framework, but lower operational overhead and cost per request.
Build on openai-agents-python with DEV.co software developers
OpenAI Agents SDK simplifies handoffs and orchestration. Start with a sandbox agent example, validate your cost model, and plan session persistence early.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
openai-agents-python FAQ
Can I use non-OpenAI LLMs?
How do I persist agent state across restarts?
Is this suitable for regulated industries (healthcare, fintech)?
How is cost managed when agents call many LLM APIs?
Software development & web development with DEV.co
Adopting openai-agents-python is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate ai frameworks software in production.
Ready to architect multi-agent systems?
OpenAI Agents SDK simplifies handoffs and orchestration. Start with a sandbox agent example, validate your cost model, and plan session persistence early.