Build AI Agents with Google Agent Development Kit in Python
Learn how to use Google's Agent Development Kit in Python to create AI-powered agents with diverse workflows and multi-agent architectures.
Google has introduced the Agent Development Kit (ADK), a Python and Java library designed to simplify the creation of AI agents. These agents, which interact with users via natural language, can handle tasks ranging from simple queries to complex multi-step workflows. While optimized for Google's Gemini model, the ADK can be adapted for other AI APIs.
Setting Up the ADK
To begin, install the ADK using pip install google-adk
. Be prepared for a significant footprint—84 dependencies totaling ~285MB. Store API keys in an .env
file for automatic loading.
Creating a Basic Agent
- Directory Structure: Organize agents in subdirectories (e.g.,
searchagent
) with__init__.py
andagent.py
. - Agent Configuration: Define agents using the
Agent
class, specifying:model
(e.g.,gemini-2.0-flash
)instructions
(prompts guiding agent behavior)tools
(e.g.,google_search
for web augmentation)
Example agent.py
:
python
from google.adk.agents import Agent
from google.adk.tools import google_search
root_agent = Agent( name="search_assistant", description="An agent that answers questions with web searches.", model="gemini-2.0-flash", instruction="Answer user questions using Google searches.", tools=[google_search] )
- Testing: Run
adk web
to launch a local web interface athttp://localhost:8000
. The UI includes:- Chat functionality
- Debugging panels showing agent metadata
- Token streaming for real-time responses
Advanced Architectures
The ADK supports workflow agents for multi-agent systems:
- Sequential Agents: Chain outputs between agents (e.g., generate text → rewrite in a specific style).
- Loop Agents: Iterate until conditions are met (e.g., condense text → verify completeness → repeat if needed).
- Parallel Agents: Execute tasks concurrently (e.g., fact-checking across multiple search engines).
Extending Functionality with Tools
Agents can integrate non-LLM actions via:
- Function Tools: Wrap existing Python/Java code (must return JSON).
- Built-in Tools: Use prebuilt utilities like Google Search or code execution.
- Third-party Tools: Leverage integrations like LangChain.
Example Projects
Google provides sample projects including:
- LLM Auditor: Fact-checking with sequential agents
- Customer Service: Mock integrations with back-end systems
- Image Scoring: Loop-based image generation and validation
For developers exploring AI agents, the ADK offers a structured approach to building scalable, interactive systems with minimal boilerplate.
Related News
How Specialized AI Agents Will Transform Workflows by 2026
By 2026, AI agents will revolutionize workflows, but success depends on specialization, tool governance, and strict fallback protocols.
APAC enterprises must adapt to AI-driven software development risks
APAC businesses are investing in agentic AI, but must address security, compliance, and operational risks to thrive.
About the Author

David Chen
AI Startup Analyst
Senior analyst focusing on AI startup ecosystem with 11 years of venture capital and startup analysis experience. Former member of Sequoia Capital AI investment team, now independent analyst writing AI startup and investment analysis articles for Forbes, Harvard Business Review and other publications.