Welcome to the Agent Development Kit (ADK) Samples repository! This collection of samples is designed to help you get started with building your own agents and multi-agent systems using the Google Agent Development Kit (ADK).
Whether you're a seasoned developer or just starting, these examples provide a hands-on approach to learning the ADK.
This project includes the following agents:
Sure! Here's your markdown table converted into a numbered list:
-
google_search_agent An agent designed to interact with Google Search and Google GenAI using the "google_search" tool.
-
app_agent This agent interacts with Google Search and Google GenAI, handles queries, logs responses, and manages events. It uses a Pydantic schema to define the output structure, which means it cannot use tools or agent transfers.
-
llm_auditor An agent that audits LLM responses using
critic
andreviser
sub-agents to evaluate and improve the quality of the responses. This agent demonstrates a human-in-the-loop pattern using aSequentialAgent
workflow. -
parent_and_subagents A parent agent that manages multiple sub-agents, each responsible for different tasks. This sample showcases how to create a multi-agent system where the parent agent delegates tasks to its sub-agents.
-
workflow_agents A collection of agents that work together in a workflow. This sample demonstrates how to orchestrate multiple agents to achieve a common goal, showcasing the power of collaboration in agent-based systems.
Follow these steps to get the project up and running on your local machine.
Before you begin, ensure you have uv installed. uv
is a fast, next-generation Python package installer.
-
Create a virtual environment:
uv venv
-
Install the dependencies:
- For Linux:
uv pip install -r requirements-linux.txt
- For macOS:
uv pip install -r requirements-mac.txt
- For Linux:
The ADK requires authentication to make model API calls. You can configure this in one of two ways by updating the .env
file in the root of this project:
-
Use a Gemini API Key:
- Get your free API key and add it to the
.env
file.
- Get your free API key and add it to the
-
Use Google Cloud Authentication:
- Authenticate your environment with Google Cloud credentials.
- Associate your model API calls with a Vertex AI project and location in the
.env
file.
You can run the agents in this project using any of the following methods:
-
Method 1: ADK Dev UI
# Run on the default port (8000) adk web # Run on a different port adk web --port 8001
-
Method 2: Programmatically
python3 app_agent/agent.py
-
Method 3: Command-Line Interface
adk run my_Google Search_agent
Look for #TODO
in the code to find areas that need your attention to get things working.
Search for #NOTE
to find helpful explanations and insights into the code.
Contributions are welcome!
If you have suggestions for improvements or new samples, please feel free to open an issue or submit a pull request.
Find me on LinkedIn, I'm happy to answer any questions you may have.
LinkedIn link on my GitHub profile.