{"data":{"slug":"openai-openai-agents-python","name":"openai-agents-python","tagline":"A lightweight, powerful framework for multi-agent workflows","github_url":"https://github.com/openai/openai-agents-python","owner":"openai","repo":"openai-agents-python","owner_avatar_url":"https://avatars.githubusercontent.com/u/14957082?v=4","primary_language":"Python","stars":28676,"forks":4516,"topics":["agents","ai","framework","harness","llm","openai","python"],"archived":false,"github_pushed_at":"2026-08-16T09:21:37+00:00","maintenance_label":"Very active","stars_delta_30d":719,"url":"https://www.graphcanon.com/tools/openai-openai-agents-python","markdown_url":"https://www.graphcanon.com/tools/openai-openai-agents-python.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/openai-openai-agents-python","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=openai-openai-agents-python","description":"A lightweight, powerful framework for multi-agent workflows","homepage_url":"https://openai.github.io/openai-agents-python/","license":"MIT","open_issues":13,"watchers":227,"ai_summary":"Python-based framework for creating and managing multiple AI-driven agents in complex workflows.","readme_excerpt":"# OpenAI Agents SDK \n\nThe OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows. It is provider-agnostic, supporting the OpenAI Responses and Chat Completions APIs, as well as 100+ other LLMs.\n\n<img src=\"https://cdn.openai.com/API/docs/images/orchestration.png\" alt=\"Image of the Agents Tracing UI\" style=\"max-height: 803px;\">\n\n> [!NOTE]\n> Looking for the JavaScript/TypeScript version? Check out [Agents SDK JS/TS](https://github.com/openai/openai-agents-js).\n\n### Core concepts:\n\n1. [**Agents**](https://openai.github.io/openai-agents-python/agents): LLMs configured with instructions, tools, guardrails, and handoffs\n1. [**Sandbox agents**](https://openai.github.io/openai-agents-python/sandbox_agents): Agents preconfigured to work with a container to perform work over long time horizons.\n1. [**Realtime agents**](https://openai.github.io/openai-agents-python/realtime/quickstart/): Build powerful voice agents with `gpt-realtime-2.1` and full agent features\n1. [**Voice agents**](https://openai.github.io/openai-agents-python/voice/quickstart/): Build voice pipelines that combine speech-to-text, an agent workflow, and text-to-speech\n1. **[Agents as tools](https://openai.github.io/openai-agents-python/tools/#agents-as-tools) / [Handoffs](https://openai.github.io/openai-agents-python/handoffs/)**: Delegating to other agents for specific tasks\n1. [**Tools**](https://openai.github.io/openai-agents-python/tools/): Various Tools let agents take actions (functions, MCP, hosted tools)\n1. [**Guardrails**](https://openai.github.io/openai-agents-python/guardrails/): Configurable safety checks for input and output validation\n1. [**Human in the loop**](https://openai.github.io/openai-agents-python/human_in_the_loop/): Built-in mechanisms for involving humans across agent runs\n1. [**Sessions**](https://openai.github.io/openai-agents-python/sessions/): Automatic conversation history management across agent runs\n1. [**Tracing**](https://openai.github.io/openai-agents-python/tracing/): Built-in tracking of agent runs, allowing you to view, debug and optimize your workflows\n\nExplore the [examples](https://github.com/openai/openai-agents-python/tree/main/examples) directory to see the SDK in action, and read our [documentation](https://openai.github.io/openai-agents-python/) for more details.\n\n## Get started\n\nTo get started, set up your Python environment (Python 3.10 or newer required), and then install OpenAI Agents SDK package.\n\n### venv\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\npip install openai-agents\n```\n\nFor voice support, install with the optional `voice` group: `pip install 'openai-agents[voice]'`. For Redis session support, install with the optional `redis` group: `pip install 'openai-agents[redis]'`.\n\n### uv\n\nIf you're familiar with [uv](https://docs.astral.sh/uv/), installing the package would be even easier:\n\n```bash\nuv init\nuv add openai-agents\n```\n\nFor voice support, install with the optional `voice` group: `uv add 'openai-agents[voice]'`. For Redis session support, install with the optional `redis` group: `uv add 'openai-agents[redis]'`.\n\n## Run your first agents\n\nThe SDK supports four primary ways to run agents. Set the `OPENAI_API_KEY` environment variable before running any of these examples.\n\n### Run a text agent\n\nUse a text `Agent` for workflows that do not need a persistent realtime connection or a sandbox workspace.\n\n```python\nfrom agents import Agent, Runner\n\nagent = Agent(name=\"Assistant\", instructions=\"You are a helpful assistant\")\n\nresult = Runner.run_sync(agent, \"Write a haiku about recursion in programming.\")\nprint(result.final_output)\n\n# Code within the code,\n# Functions calling themselves,\n# Infinite loop's dance.\n```\n\n(_For Jupyter notebook users, see [hello_world_jupyter.ipynb](https://github.com/openai/openai-agents-python/blob/main/examples/basic/hello_world_jupyter.ipynb)_)\n\n### Run a sandbox agent\n\nUse a [`SandboxAgent`](https:/","github_created_at":"2025-03-11T03:42:36+00:00","created_at":"2026-07-07T17:32:24.721284+00:00","updated_at":"2026-08-16T18:01:46.620796+00:00","categories":[{"slug":"ai-agents","name":"AI Agents","url":"https://www.graphcanon.com/categories/ai-agents","markdown_url":"https://www.graphcanon.com/categories/ai-agents.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/ai-agents"}],"tags":[{"slug":"agents","name":"agents"},{"slug":"ai","name":"ai"},{"slug":"framework","name":"framework"},{"slug":"harness","name":"harness"},{"slug":"llm","name":"llm"},{"slug":"openai","name":"openai"},{"slug":"python","name":"python"}],"trust":{"provenance":{"is_fork":false,"github_id":946380199,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-08-16T18:01:45.818Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":17,"days_since_push":0,"last_release_at":"2026-08-15T02:49:37Z","stars_delta_30d":719,"open_issues_delta_30d":-40},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T10:58:51.749Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-08-16T18:01:46.279Z"},"languages":{"value":["python"],"source":"github.language+pyproject.toml","observed_at":"2026-08-16T18:01:46.279Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-08-16T18:01:46.279Z"}},"decision_facts":{"hosting":{"model":"unknown"},"pricing":null,"requirements":{"requires_docker":false},"constraints":{"hosting_model":"unknown","requires_docker":false},"when_to_use":["Use openai-agents-python when you need a lightweight solution that simplifies managing multiple AI agents in a single workflow.","Select this framework if your project depends heavily on the integration of OpenAI models as part of the agent ecosystem.","It's ideal for complex scenarios where coordination between different AI entities needs to be seamless and managed efficiently."],"when_not_to_use":["Avoid using openai-agents-python when you require a more specialized multi-agent system that is tightly integrated with specific cloud providers beyond OpenAI.","Do not choose this tool if your project does not involve Python or requires agents interacting in a simplified manner without complex workflow support.","If your application needs a framework with an extensive built-in library of pre-specified agent behaviors and models aside from OpenAI's, you may find openai-agents-python lacking."],"source":"enrich:decision_facts","observed_at":"2026-07-11T13:19:52.563Z"},"constraint_facets":{"hosting_model":"unknown","requires_docker":false},"decision_summary":[{"label":"Hosting","value":"unknown"},{"label":"Adopt for","value":"The openai-agents-python is a Python-based framework designed to simplify the creation and management of multiple AI-driven agents in complex workflows. Given its focus on multi-agent coordination and its lightweight, no"},{"label":"License detail","value":"MIT-licensed"}]}}