Agent Development Kit
$git clone https://github.com/google/adk-pythonInstalls into the current project.
Install adk-python by running `git clone https://github.com/google/adk-python`, then use it for the current task and follow its documentation at https://github.com/google/adk-python.
| 1 | # Agent Development Kit (ADK) 2.0 |
| 2 | |
| 3 | [](LICENSE) |
| 4 | [](https://pypi.org/project/google-adk/) |
| 5 | [](https://pypi.org/project/google-adk/) |
| 6 | [](https://pepy.tech/project/google-adk) |
| 7 | [](https://github.com/google/adk-python/actions/workflows/python-unit-tests.yml) |
| 8 | [](https://google.github.io/adk-docs/) |
| 9 | |
| 10 | <h2 align="center"> |
| 11 | <img src="https://raw.githubusercontent.com/google/adk-python/main/assets/agent-development-kit.png" width="256"/> |
| 12 | </h2> |
| 13 | <h3 align="center"> |
| 14 | An open-source, code-first Python framework for building, evaluating, and deploying sophisticated AI agents with flexibility and control. |
| 15 | </h3> |
| 16 | <h3 align="center"> |
| 17 | Important Links: |
| 18 | <a href="https://google.github.io/adk-docs/">Docs</a>, |
| 19 | <a href="https://github.com/google/adk-samples">Samples</a> & |
| 20 | <a href="https://github.com/google/adk-web">ADK Web</a>. |
| 21 | </h3> |
| 22 | |
| 23 | ______________________________________________________________________ |
| 24 | |
| 25 | > **⚠️ BREAKING CHANGES FROM 1.x** |
| 26 | > |
| 27 | > This release includes breaking changes to the agent API, event model, and |
| 28 | > session schema. **Sessions generated by ADK 2.0 are readable by ADK 1.28+ |
| 29 | > (extra fields will be ignored), but are incompatible with older 1.x versions.** |
| 30 | |
| 31 | ______________________________________________________________________ |
| 32 | |
| 33 | ## 🔥 What's New in 2.0 |
| 34 | |
| 35 | - **Workflow Runtime**: A graph-based execution engine for composing |
| 36 | deterministic execution flows for agentic apps, with support for routing, |
| 37 | fan-out/fan-in, loops, retry, state management, dynamic nodes, |
| 38 | human-in-the-loop, and nested workflows. |
| 39 | |
| 40 | - **Task API**: Structured agent-to-agent delegation with multi-turn task |
| 41 | mode, single-turn controlled output, mixed delegation patterns, |
| 42 | human-in-the-loop, and task agents as workflow nodes. |
| 43 | |
| 44 | ## 🚀 Installation |
| 45 | |
| 46 | ```bash |
| 47 | pip install google-adk |
| 48 | ``` |
| 49 | |
| 50 | **Requirements:** Python 3.10+. |
| 51 | |
| 52 | To install optional integrations, you can use the following command: |
| 53 | |
| 54 | ```bash |
| 55 | pip install "google-adk[extensions]" |
| 56 | ``` |
| 57 | |
| 58 | The release cadence is roughly bi-weekly. |
| 59 | |
| 60 | ## Quick Start |
| 61 | |
| 62 | > **Beginner Note:** ADK applications are built using two main classes: |
| 63 | > **`Agent`** (defines an AI's instructions, tools, and behavior) and |
| 64 | > **`Workflow`** (orchestrates agents and tasks in a graph-based flow). |
| 65 | |
| 66 | ### Agent |
| 67 | |
| 68 | ```python |
| 69 | from google.adk import Agent |
| 70 | |
| 71 | root_agent = Agent( |
| 72 | name="greeting_agent", |
| 73 | model="gemini-2.5-flash", |
| 74 | instruction="You are a helpful assistant. Greet the user warmly.", |
| 75 | ) |
| 76 | ``` |
| 77 | |
| 78 | ### Workflow |
| 79 | |
| 80 | ```python |
| 81 | from google.adk import Agent, Workflow |
| 82 | |
| 83 | generate_fruit_agent = Agent( |
| 84 | name="generate_fruit_agent", |
| 85 | instruction="Return the name of a random fruit. Return only the name.", |
| 86 | ) |
| 87 | |
| 88 | generate_benefit_agent = Agent( |
| 89 | name="generate_benefit_agent", |
| 90 | instruction="Tell me a health benefit about the specified fruit.", |
| 91 | ) |
| 92 | |
| 93 | root_agent = Workflow( |
| 94 | name="root_agent", |
| 95 | edges=[("START", generate_fruit_agent, generate_benefit_agent)], |
| 96 | ) |
| 97 | ``` |
| 98 | |
| 99 | ### Run Locally |
| 100 | |
| 101 | ```bash |
| 102 | # Interactive CLI |
| 103 | adk run path/to/my_agent |
| 104 | |
| 105 | # Web UI (supports multi-agent directories or pointing directly to a single agent folder) |
| 106 | adk web path/to/agents_dir |
| 107 | ``` |
| 108 | |
| 109 | ## 📚 Documentation |
| 110 | |
| 111 | - **Getting Started**: https://google.github.io/adk-docs/ |
| 112 | - **Samples**: See `contributing/workflow_samples/` and |
| 113 | `contributing/task_samples/` for workflow and task API examples. |
| 114 | |
| 115 | ## 🤝 Contributing |
| 116 | |
| 117 | See [CONTRIBUTING.md](CONTRIBUTING.md) for details. |
| 118 | |
| 119 | ## 📄 License |
| 120 | |
| 121 | This project is licensed under the Apache 2.0 License — see the |
| 122 | [LICENSE](LICENSE) file for details. |