Comprehensive Guide to Building AI Agents Using Google Agent Development Kit (ADK)
What Is Google Agent Development Kit (ADK)?
AI agents are automated software that complete actions from collecting and analyzing data to taking subsequent action with a number of different tools and APIs. Google released the Agent Development Kit (ADK) at Cloud NEXT 2025 and is an open-source framework specifically designed to create such rich agent systems. Google products, such as Agentspace and the Customer Engagement Suite, are powered by ADK, providing developers the enterprise experience for agent development.
ADK includes tools to support the entire agent development lifecycle, including building, testing, evaluating and deploying agent applications. ADK is strongest when managing multi-agent orchestration, allowing developers to create systems in which specialized agent systems can come together in coordinated hierarchies. ADK includes a rich suite of pre-built tools and functionality for the ADK includes support for third party library interoperability, native streaming around data, and debugging using both the command line interface (CLI) and frontend graphical interface functionality.
In this tutorial, we will build an agentic clone of ChatGPT, that includes tools for image generation, web scraping, web search and deep research. You will practically engage with the in's and out's of ADK project structure and core components, while learning the basic patterns for how to create your own rich multi-agent applications. Let's get started!
Google ADK vs. Other Agent Building Frameworks

Despite being relatively new and less-adopted, ADK provides several advantages over other agent building frameworks. According to Firecrawl's analysis of top agent frameworks, ADK ranks among the top open source frameworks for building AI agents. While frameworks like LangGraph or CrewAI focus primarily on agent orchestration, ADK offers a complete solution spanning the entire agent development lifecycle. It integrates deployment and evaluation capabilities natively, and its connection with Google Cloud provides scalability and security that many alternatives lack, particularly beneficial for organizations already using Google's ecosystem.
Alternative Approaches: Compare ADK with other frameworks in our comprehensive agent frameworks guide. For visual development, explore LangFlow or n8n automation.
ADK's architecture includes several production-focused features:
- Deployment options: Direct integration with Vertex AI Agent Engine and support for containerized deployment
- System connectivity: Pre-built connectors to enterprise systems and databases like AlloyDB, BigQuery, and NetApp
- Bidirectional streaming: Support for real-time audio and video interactions
- Evaluation tools: Built-in frameworks to assess response quality and execution paths
- Model flexibility: Compatibility with Gemini models, Vertex AI Model Garden, and third-party models via LiteLLM
ADK supports three core agent types that serve different purposes in multi-agent systems. LLM Agents use language models for reasoning and making dynamic decisions about tools and tasks. Workflow Agents (Sequential, Parallel, Loop) control execution patterns without using LLMs. Custom Agents implement specialized logic for unique requirements not covered by standard types.
The framework enables different methods for agents to interact and delegate tasks within applications. Agents can transfer control to other agents through LLM-driven decisions or by using other agents as tools via AgentTool. This allows complex tasks to be broken down and handled by the most appropriate specialized agent.
Multi-agent architecture in ADK helps create more modular AI systems for production use. Teams can develop specialized agents separately and combine them as needed. Changing individual agents or reorganizing their hierarchy can be done without rebuilding the entire system. This approach works well for enterprise applications where requirements change frequently.
Firecrawl Provides Best Web Tools For Agents

Firecrawl is the context API to search, scrape, and interact with the web at scale. It transforms complex web content into LLM-ready formats, handling the difficult technical challenges of web scraping like proxies and dynamic JavaScript content. Firecrawl's API-first approach makes it easy to integrate powerful web capabilities into any agent application, with SDKs available for Python, Node.js, Go, and Rust.
Key features that make Firecrawl ideal for AI agents:
- Web Scraping: Converts any webpage into clean markdown, HTML, or structured data formats perfect for LLM consumption (see our scraping endpoint guide)
- Web Search: Provides search functionality with optional content scraping to let agents find and process real-time information
- Deep Research: Conducts multi-step research on complex topics by crawling, searching, and analyzing content with AI
- LLMs.txt Generation: Convert websites to llms.txt files for LLM training
- FIRE-1 Agent: An AI agent specialized in web scraping tasks that can be called directly from other agents
- LLMs.txt API: Creates training data for fine-tuning language models by extracting and formatting web content
- Markdown Conversion: Transforms complex HTML into clean, semantic markdown that minimizes token usage in LLM contexts
Our ChatGPT clone will heavily use Firecrawl's capabilities to give our agent real-time web access without the complexity of browser automation or HTML parsing. Firecrawl is officially supported as a third-party tool in Google's ADK, so connecting it through ADK's tool integration is straightforward - our agent will seamlessly search, extract, and process web information to answer user queries. This web connectivity layer is what transforms a basic LLM into a truly capable agent that can retrieve fresh information and interact with online services.
Step-by-step Guide to Building Multi-agent Applications With Google ADK
Now, without further ado, we'll build a ChatGPT clone with Google's ADK, covering environment setup, agent structure, core functionality, Firecrawl web search integration, specialized agents, multi-agent orchestration, and testing.
Step 1: Setting Up Your ADK Project Environment
Google's Agent Development Kit (ADK) provides a powerful framework for building sophisticated AI agents. In this tutorial, we'll walk through creating a ChatGPT-like clone with multiple specialized agents working together. Let's start by setting up our environment properly.
Understanding ADK Project Structure
ADK projects follow a specific directory structure that is required for the framework to function properly, as detailed in the ADK documentation. For our ChatGPT clone project, we'll use this structure that satisfies the requirements:
google-adk-tutorial/
├── app/ # Application directory
│ ├── main.py # Application entry point
│ ├── requirements.txt # Dependencies
│ └── chatgpt_agentic_clone/ # Agent package
│ ├── __init__.py # Package initialization
│ └── agent.py # Agent definitions and tools
├── pyproject.toml # Project configuration
└── requirements.txt # Top-level dependenciesThis structure separates the agents (in the chatgpt_agentic_clone directory) from the application itself (main.py). The agent package contains our agent definitions, while the main.py handles user interaction and running the agent.
For more details on ADK agent directory structures, you can check out the ADK Quickstart guide and this tutorial from DataCamp.
Setting Up the Environment with UV
For our environment setup, we'll use UV - a modern Python package manager that offers faster installation times and better dependency resolution compared to traditional tools. UV will help us efficiently manage our project dependencies. Here's how to set up our environment:
-
Install UV (if you don't have it already):
pip install uv -
Create a new project directory and navigate to it:
mkdir google-adk-tutorial cd google-adk-tutorial -
Initialize the project with UV:
uv initThis creates a basic project structure with a pyproject.toml file.
-
Add dependencies using UV:
# Add core dependencies uv add google-adk python-dotenv pydantic # Add Firecrawl for web tools uv add firecrawl-py # Add other dependencies uv add ipykernel langchain-community litellm markitdown[all] openaiUV will automatically update your pyproject.toml file with these dependencies.
-
Activate the virtual environment:
# Activate it (macOS/Linux) source .venv/bin/activate # Activate it (Windows CMD) .venv\Scripts\activate.bat # Activate it (Windows PowerShell) .venv\Scripts\Activate.ps1 -
Create the directory structure for ADK:
mkdir -p app/chatgpt_agentic_clone touch app/chatgpt_agentic_clone/__init__.py -
Create a .env file for API keys:
touch app/.envAdd your API keys to this file:
# Gemini API Key GOOGLE_API_KEY=your_google_api_key_here # Firecrawl API Key (for web tools) FIRECRAWL_API_KEY=your_firecrawl_api_key_hereYou'll need:
- A Google AI Studio API key for the Gemini models. Get one at Google AI Studio.
- A Firecrawl API key for web search and content extraction. Sign up at Firecrawl.
-
Populate the
__init__.pyfile:
Your init file must have the following import for the agent assets to run properly when debugging through the UI:
from . import agentWhy This Structure Matters
This directory structure is not just a convention but a requirement for ADK to function properly. It's particularly important for multi-agent applications because:
- Modularity: Each agent is defined in a separate logical unit, making the code more maintainable
- Reusability: Agents can be easily reused across different applications
- Testability: The separation facilitates easier testing of agent components
- Deployment: ADK expects this structure for various deployment options
With our environment set up, we've laid the foundation for our multi-agent ChatGPT clone. This structure will allow us to create specialized agents that work together, each handling different capabilities like web search, content extraction, research, and image generation.
The rest of the steps involve writing actual code. If you want to explore the finished product, you can do so from our GitHub repository before continuing. We recommend that you have the full project open in a separate tab as we don't go through the code line-by-line, focusing only on the main points.
Step 2: Implementing Specialized Tools for Your Agents
After setting up our environment, the next step is to create the specialized tools that our agents will use. Tools in ADK are Python functions that extend an agent's capabilities beyond just language generation.
Understanding Tools in ADK
Tools enable agents to interact with external systems, APIs, and perform specialized tasks. In our ChatGPT clone, we'll implement five key tools that will give our agents real-world capabilities.
Let's examine our first tool - the web search functionality powered by Firecrawl:
def web_search(query: str) -> Dict:
"""Searches the web for current information using Firecrawl."""
print(f"--- Tool: web_search called for query: {query} ---")
try:
app = FirecrawlApp()
# THE SEARCH HAPPENS IN THIS LINE
result = app.search(query, limit=10)
if result.success:
formatted_results = []
for item in result.data:
formatted_results.append({
"title": item.get("title", "No title"),
"url": item.get("url", "No URL"),
"description": item.get("description", "No description"),
})
return {"status": "success", "results": formatted_results}
else:
return {
"status": "error",
"error_message": f"Search failed: {result.error or 'Unknown error'}",
}
except Exception as e:
return {
"status": "error",
"error_message": f"Error during web search: {str(e)}",
}Notice how Firecrawl simplifies the web search process - with just a few lines of code, our agent can search the web and get structured results. Without Firecrawl, we would need to implement complex search logic, handle rate limiting, manage proxies, and deal with parsing different website formats.
Similarly, we implement other tools using Firecrawl's API:
def scrape_webpage(url: str, extract_format: str = "markdown") -> Dict:
"""Scrapes content from a webpage using Firecrawl."""
try:
app = FirecrawlApp()
result = app.scrape_url(url, formats=[extract_format])
# Process and return results
# ...
except Exception as e:
return {"status": "error", "error_message": f"Error scraping webpage: {str(e)}"}def deep_research(topic: str, max_depth: int = 5, time_limit: int = 180) -> Dict:
"""Performs comprehensive research using Firecrawl."""
try:
app = FirecrawlApp()
result = app.deep_research(topic, max_depth=max_depth, time_limit=time_limit)
# Process and return results
# ...
except Exception as e:
return {"status": "error", "error_message": f"Error during deep research: {str(e)}"}scrape_url and deep_research methods demonstrate the power of Firecrawl's API in simplifying complex web operations. With just a few lines of code, our agents can search the web, extract content from pages, and even conduct deep multi-source research.
We also implement tools for image generation using Gemini:
def generate_image(prompt: str, model: str = GEMINI_IMAGE_GEN_MODEL) -> Dict:
"""Generates an image using Gemini's image generation models."""
try:
# Initialize Gemini client and generate image
# ...
except Exception as e:
return {"status": "error", "error_message": f"Error generating image: {str(e)}"}The Bigger Picture: Tools as Agent Capabilities
Tools are the "hands and feet" of our agents, allowing them to:
- Access real-world data: Get current information not available in the model's training
- Perform specialized tasks: Generate images, extract web content, or conduct research
- Provide grounding: Connect AI responses to verifiable data sources
- Extend capabilities: Add new abilities without retraining the underlying models
As described in the ADK documentation on tools, tools can be categorized into several types, including function tools, built-in tools, and third-party services. The function tools we've implemented follow the
