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

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

Related Articles