openai-agents-python  by openai

Python SDK for multi-agent workflows

created 4 months ago
13,096 stars

Top 3.9% on sourcepulse

GitHubView on GitHub
Project Summary

This Python SDK provides a framework for building multi-agent workflows, supporting over 100 LLMs and offering features like configurable agents, handoffs between agents, guardrails for validation, and built-in tracing. It's designed for developers and researchers looking to orchestrate complex LLM interactions.

How It Works

The framework operates on an agent loop where an LLM, configured with instructions and tools, processes input. Responses can trigger tool calls, handoffs to other agents, or a final output. The loop continues until a final output is produced, which is determined by whether the agent has a defined output_type. This approach allows for flexible workflow design, from simple Q&A to complex, multi-agent decision-making processes.

Quick Start & Requirements

  • Install: pip install openai-agents or pip install 'openai-agents[voice]' for voice support.
  • Prerequisites: Python environment, OPENAI_API_KEY environment variable.
  • Documentation: https://github.com/openai/openai-agents-python (Examples are in the examples/ directory).

Highlighted Details

  • Provider-agnostic, supporting OpenAI APIs and 100+ other LLMs.
  • Features configurable agents with instructions, tools, and guardrails.
  • Built-in tracing for debugging and optimization, with support for external destinations like Logfire and AgentOps.
  • Supports defining agent handoffs for control transfer between agents.

Maintenance & Community

The project acknowledges contributions from the open-source community, including Pydantic, MkDocs, Griffe, uv, and ruff. OpenAI is committed to continued open-source development.

Licensing & Compatibility

The repository does not explicitly state a license in the provided README. This requires further investigation for commercial use or closed-source linking.

Limitations & Caveats

The README does not specify a license, which could be a blocker for commercial adoption. The framework is presented as lightweight, but the complexity of multi-agent workflows can lead to significant computational and API costs depending on the LLMs and interaction patterns used.

Health Check
Last commit

22 hours ago

Responsiveness

1 day

Pull Requests (30d)
216
Issues (30d)
139
Star History
3,493 stars in the last 90 days

Explore Similar Projects

Starred by Zhiqiang Xie Zhiqiang Xie(Author of SGLang), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
6 more.

swarm by openai

0.3%
20k
Multi-agent orchestration framework for lightweight agent coordination
created 1 year ago
updated 4 months ago
Feedback? Help us improve.