{"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":29539,"forks":4764,"topics":["agents","ai","framework","harness","llm","openai","python"],"archived":false,"github_pushed_at":"2026-09-17T22:19:03+00:00","maintenance_label":"Very active","stars_delta_30d":863,"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":85,"watchers":232,"ai_summary":"The OpenAI Agents SDK is a provider-agnostic framework for building multi-agent workflows, supporting OpenAI APIs and over 100 other LLMs. It includes features for building voice agents, managing sessions, and implementing guardrails.","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-09-20T04:33:01.910521+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":"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-09-18T08:44:30.808Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":18,"days_since_push":0,"last_release_at":"2026-09-17T22:19:05Z","stars_delta_30d":863,"open_issues_delta_30d":72},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-09-18T08:44:33.369Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-09-18T08:44:29.684Z"},"languages":{"value":["python"],"source":"github.language+pyproject.toml","observed_at":"2026-09-18T08:44:29.684Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-09-18T08:44:29.684Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["When you need a provider-agnostic framework that supports over 100 LLMs, including OpenAI APIs.","For building voice agents with speech-to-text and text-to-speech capabilities.","If you require session management for automatic conversation history across agent runs.","When you want to implement guardrails for configurable safety checks on input and output validation."],"when_not_to_use":["If you are working in a language other than Python, as the SDK is specifically designed for Python.","When you need a JavaScript/TypeScript version of the framework, as this tool is the Python version.","If you do not require support for over 100 LLMs and prefer a more specialized solution for a specific provider.","When you do not need features such as voice agents or session management, and a simpler framework would suffice."],"source":"enrich:decision_facts","observed_at":"2026-09-18T09:32:59.582Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"The OpenAI Agents SDK is a provider-agnostic framework for building multi-agent workflows in Python, supporting OpenAI APIs and over 100 other LLMs. It includes features for building voice agents, managing sessions, and护"}]}}