OpenAI Agents Python

Active
GitHub Python MIT

Description

A lightweight, powerful framework from OpenAI for building multi-agent workflows with tool calling, agent handoffs, and guardrails.

Key Features

  • Multi-agent workflow orchestration — Agent-to-agent task delegation via Handoffs and Agents-as-tools patterns
  • Sandbox Agent — Pre-configured containerized agents with filesystem, commands, patches for long-running tasks
  • Guardrails — Configurable input/output validation to ensure agent behavior is safe and controlled
  • Built-in tracing — Automatic tracking of agent runs for viewing, debugging, and optimizing workflows
  • Realtime voice agents — Build voice interaction agents with gpt-realtime-2 and full agent capabilities
  • Provider agnostic — Supports OpenAI Responses/Chat Completions APIs plus 100+ other LLMs

Use Cases

💡 Customer service multi-turn system — Build multi-agent pipelines with routing, specialized responses, human escalation
💡 Code review & modification — Use Sandbox Agent to review code, run tests, and apply patches in isolated environments
💡 Data analysis workflow — Orchestrate specialized agents for data collection, cleaning, analysis, and report generation
💡 Voice interaction applications — Build real-time voice conversation agents for customer service or voice assistants
💡 Content moderation & safety — Use Guardrails to review agent inputs/outputs for safety and content filtering

Strengths & Limitations

Strengths

  • Actively maintained, recent updates
  • High community interest (29.1k stars)
  • Permissive open-source license (MIT)
  • Responsive to issues, low backlog

Quick Start

pip install openai-agents
export OPENAI_API_KEY={your-key}

from agents import Agent, Runner

agent = Agent(
    name="assistant",
    instructions="You are a helpful assistant."
)

result = Runner.run_sync(agent, "What are multi-agent systems?")
print(result.final_output)

Related Projects

LightAgent

1.2k · Python
Active A

Lightweight AI agent framework with built-in memory, tool calling, and tree-of-thought reasoning, supporting multi-agent collaboration and self-learning, compatible with OpenAI, DeepSeek, Qwen, and other major LLMs with MCP/SSE protocol integration.

pythonagentmulti-agent +5
  • · Ultra-Lightweight Framework: No LangChain/LlamaIndex dependencies, core framework stays small and modular, ready in 5 minutes
  • · Native Skill System: Create reusable skill modules with persistent memory, tool calling, and tree-of-thought reasoning
  • · Multi-Agent Collaboration: Built-in LightSwarm for intent recognition and task delegation, simpler multi-agent collaboration than Swarm

MetaGPT

70.2k · Python
Stale B

The Multi-Agent Framework for building the first AI Software Company, enabling natural language programming with multi-role collaboration for automated requirement analysis, design, coding, and testing.

multi-agentframeworkpython +2
  • · Multi-role collaboration - Built-in product manager, architect, engineer roles simulating a full software company SOP pipeline
  • · Natural language programming - Input a one-line requirement to auto-generate user stories, competitive analysis, API design, and complete code
  • · Data Interpreter - Dynamic code generation and data analysis for CSV processing, visualization, and exploratory tasks

Koog

4.6k · Kotlin
Active A

A JVM framework by JetBrains for building predictable, fault-tolerant, enterprise-ready AI agents across all platforms — from backend services to Android, iOS, and in-browser environments, with built-in MCP and multi-provider LLM support.

kotlinjavaframework +6
  • · Multiplatform deployment across JVM, JS, WasmJS, Android, and iOS via Kotlin Multiplatform
  • · Built-in fault-tolerance with automatic retries and agent state persistence for recovery
  • · Intelligent history compression to optimize token usage in long conversations

Ouroboros

5.8k · Python
Active A

Ouroboros is a spec-driven multi-agent framework that shifts from traditional prompting to specification-driven development, supporting multi-agent collaboration, MCP tool integration, and automated workflow orchestration for building high-quality agent systems.

multi-agentframeworkagent +4
  • · Spec-first workflow: Socratic interview → immutable seed spec → execution → evaluation
  • · Multi-runtime adapter supporting Claude Code, Codex CLI, OpenCode, Hermes, Gemini, Kiro, Copilot
  • · Three-layer architecture: Kernel (contract engine), Plugins (domain workflows), Shell (TUI cockpit)

Related Articles