openai-agents-python  by openai

Python SDK for multi-agent workflows

Created 6 months ago
14,737 stars

Top 3.4% 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

18 hours ago

Responsiveness

1 day

Pull Requests (30d)
151
Issues (30d)
136
Star History
1,090 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.