Agent skill
google-adk-python
Google Agent Development Kit (ADK) for Python. Capabilities: AI agent building, multi-agent systems, workflow agents (sequential/parallel/loop), tool integration (Google Search, Code Execution), Vertex AI deployment, agent evaluation, human-in-the-loop flows. Actions: build, create, deploy, evaluate, orchestrate AI agents. Keywords: Google ADK, Agent Development Kit, AI agent, multi-agent system, LlmAgent, SequentialAgent, ParallelAgent, LoopAgent, tool integration, Google Search, Code Execution, Vertex AI, Cloud Run, agent evaluation, human-in-the-loop, agent orchestration, workflow agent, hierarchical coordination. Use when: building AI agents, creating multi-agent systems, implementing workflow pipelines, integrating LLM agents with tools, deploying to Vertex AI, evaluating agent performance, implementing approval flows.
Install this agent skill to your Project
npx add-skill https://github.com/samhvw8/dot-claude/tree/main/skills/google-adk-python
SKILL.md
Google ADK Python Skill
You are an expert guide for Google's Agent Development Kit (ADK) Python - an open-source, code-first toolkit for building, evaluating, and deploying AI agents.
When to Use This Skill
Use this skill when users need to:
- Build AI agents with tool integration and orchestration capabilities
- Create multi-agent systems with hierarchical coordination
- Implement workflow agents (sequential, parallel, loop) for predictable pipelines
- Integrate LLM-powered agents with Google Search, Code Execution, or custom tools
- Deploy agents to Vertex AI Agent Engine, Cloud Run, or custom infrastructure
- Evaluate and test agent performance systematically
- Implement human-in-the-loop approval flows for tool execution
Core Concepts
Agent Types
LlmAgent: LLM-powered agents capable of dynamic routing and adaptive behavior
- Define with name, model, instruction, description, and tools
- Supports sub-agents for delegation and coordination
- Intelligent decision-making based on context
Workflow Agents: Structured, predictable orchestration patterns
- SequentialAgent: Execute agents in defined order
- ParallelAgent: Run multiple agents concurrently
- LoopAgent: Repeat execution with iteration logic
BaseAgent: Foundation for custom agent implementations
Key Components
Tools Ecosystem:
- Pre-built tools (google_search, code_execution)
- Custom Python functions as tools
- OpenAPI specification integration
- Tool confirmation flows for human approval
Multi-Agent Architecture:
- Hierarchical agent composition
- Specialized agents for specific domains
- Coordinator agents for delegation
Installation
# Stable release (recommended)
pip install google-adk
# Development version (latest features)
pip install git+https://github.com/google/adk-python.git@main
Implementation Patterns
Single Agent with Tools
from google.adk.agents import LlmAgent
from google.adk.tools import google_search
agent = LlmAgent(
name="search_assistant",
model="gemini-2.5-flash",
instruction="You are a helpful assistant that searches the web for information.",
description="Search assistant for web queries",
tools=[google_search]
)
Multi-Agent System
from google.adk.agents import LlmAgent
# Specialized agents
researcher = LlmAgent(
name="Researcher",
model="gemini-2.5-flash",
instruction="Research topics thoroughly using web search.",
tools=[google_search]
)
writer = LlmAgent(
name="Writer",
model="gemini-2.5-flash",
instruction="Write clear, engaging content based on research.",
)
# Coordinator agent
coordinator = LlmAgent(
name="Coordinator",
model="gemini-2.5-flash",
instruction="Delegate tasks to researcher and writer agents.",
sub_agents=[researcher, writer]
)
Custom Tool Creation
from google.adk.tools import Tool
def calculate_sum(a: int, b: int) -> int:
"""Calculate the sum of two numbers."""
return a + b
# Convert function to tool
sum_tool = Tool.from_function(calculate_sum)
agent = LlmAgent(
name="calculator",
model="gemini-2.5-flash",
tools=[sum_tool]
)
Sequential Workflow
from google.adk.agents import SequentialAgent
workflow = SequentialAgent(
name="research_workflow",
agents=[researcher, summarizer, writer]
)
Parallel Workflow
from google.adk.agents import ParallelAgent
parallel_research = ParallelAgent(
name="parallel_research",
agents=[web_researcher, paper_researcher, expert_researcher]
)
Human-in-the-Loop
from google.adk.tools import google_search
# Tool with confirmation required
agent = LlmAgent(
name="careful_searcher",
model="gemini-2.5-flash",
tools=[google_search],
tool_confirmation=True # Requires approval before execution
)
Deployment Options
Cloud Run Deployment
# Containerize agent
docker build -t my-agent .
# Deploy to Cloud Run
gcloud run deploy my-agent --image my-agent
Vertex AI Agent Engine
# Deploy to Vertex AI for scalable agent hosting
# Integrates with Google Cloud's managed infrastructure
Custom Infrastructure
# Run agents locally or on custom servers
# Full control over deployment environment
Model Support
Optimized for Gemini:
- gemini-2.5-flash
- gemini-2.5-pro
- gemini-1.5-flash
- gemini-1.5-pro
Model Agnostic: While optimized for Gemini, ADK supports other LLM providers through standard APIs.
Best Practices
- Code-First Philosophy: Define agents in Python for version control, testing, and flexibility
- Modular Design: Create specialized agents for specific domains, compose into systems
- Tool Integration: Leverage pre-built tools, extend with custom functions
- Evaluation: Test agents systematically against test cases
- Safety: Implement confirmation flows for sensitive operations
- Hierarchical Structure: Use coordinator agents for complex multi-agent workflows
- Workflow Selection: Choose workflow agents for predictable pipelines, LLM agents for dynamic routing
Common Use Cases
- Research Assistants: Web search + summarization + report generation
- Code Assistants: Code execution + documentation + debugging
- Customer Support: Query routing + knowledge base + escalation
- Content Creation: Research + writing + editing pipelines
- Data Analysis: Data fetching + processing + visualization
- Task Automation: Multi-step workflows with conditional logic
Development UI
ADK includes built-in interface for:
- Testing agent behavior interactively
- Debugging tool calls and responses
- Evaluating agent performance
- Iterating on agent design
Resources
- GitHub: https://github.com/google/adk-python
- Documentation: https://google.github.io/adk-docs/
- llms.txt: https://raw.githubusercontent.com/google/adk-python/refs/heads/main/llms.txt
Implementation Workflow
When implementing ADK-based agents:
- Define Requirements: Identify agent capabilities and tools needed
- Choose Architecture: Single agent, multi-agent, or workflow-based
- Select Tools: Pre-built, custom functions, or OpenAPI integrations
- Implement Agents: Create agent definitions with instructions and tools
- Test Locally: Use development UI for iteration
- Add Evaluation: Create test cases for systematic validation
- Deploy: Choose Cloud Run, Vertex AI, or custom infrastructure
- Monitor: Track agent performance and iterate
Remember: ADK treats agent development like traditional software engineering - use version control, write tests, and follow engineering best practices.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
debugging
Systematic debugging methodology with root cause analysis. Phases: investigate, hypothesize, validate, verify. Capabilities: backward call stack tracing, multi-layer validation, verification protocols, symptom analysis, regression prevention. Actions: debug, investigate, trace, analyze, validate, verify bugs. Keywords: debugging, root cause, bug fix, stack trace, error investigation, test failure, exception handling, breakpoint, logging, reproduce, isolate, regression, call stack, symptom vs cause, hypothesis testing, validation, verification protocol. Use when: encountering bugs, analyzing test failures, tracing unexpected behavior, investigating performance issues, preventing regressions, validating fixes before completion claims.
prompt-enhancer
Prompt engineering and optimization for AI/LLMs. Capabilities: transform unclear prompts, reduce token usage, improve structure, add constraints, optimize for specific models, backward-compatible rewrites. Actions: improve, enhance, optimize, refactor, compress prompts. Keywords: prompt engineering, prompt optimization, token efficiency, LLM prompt, AI prompt, clarity, structure, system prompt, user prompt, few-shot, chain-of-thought, instruction tuning, prompt compression, token reduction, prompt rewrite, semantic preservation. Use when: improving unclear prompts, reducing token consumption, optimizing LLM outputs, restructuring verbose requests, creating system prompts, enhancing prompt clarity.
refactoring-expert
Systematic code refactoring following Martin Fowler's catalog. Methodologies: characterization tests, Red-Green-Refactor, incremental transformation. Capabilities: SOLID compliance, DRY cleanup, code smell detection, complexity reduction, legacy modernization, design patterns, functional programming patterns. Actions: refactor, extract, inline, rename, move, simplify code. Keywords: refactor, SOLID, DRY, code smell, complexity, extract method, inline, rename, move, clean code, technical debt, legacy code, design pattern, characterization test, Red-Green-Refactor, functional programming, higher-order function, immutability, pure function, composition, currying, side effects. Use when: improving code quality, reducing technical debt, applying SOLID principles, fixing DRY violations, removing code smells, modernizing legacy code, applying design patterns.
infra-engineer
Comprehensive infrastructure engineering covering DevOps, cloud platforms, FinOps, and DevSecOps. Platforms: AWS (EC2, Lambda, S3, ECS, EKS, RDS, CloudFormation), Azure basics, Cloudflare (Workers, R2, D1, Pages), GCP (GKE, Cloud Run, Cloud Storage), Docker, Kubernetes. Capabilities: CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins), GitOps, infrastructure as code (Terraform, CloudFormation), container orchestration, cost optimization, security scanning, vulnerability management, secrets management, compliance (SOC2, HIPAA). Actions: deploy, configure, manage, scale, monitor, secure, optimize cloud infrastructure. Keywords: AWS, EC2, Lambda, S3, ECS, EKS, RDS, CloudFormation, Azure, Kubernetes, k8s, Docker, Terraform, CI/CD, GitHub Actions, GitLab CI, Jenkins, ArgoCD, Flux, cost optimization, FinOps, reserved instances, spot instances, security scanning, SAST, DAST, vulnerability management, secrets management, Vault, compliance, monitoring, observability. Use when: deploying to AWS/Azure/GCP/Cloudflare, setting up CI/CD pipelines, implementing GitOps workflows, managing Kubernetes clusters, optimizing cloud costs, implementing security best practices, managing infrastructure as code, container orchestration, compliance requirements, cost analysis and optimization.
aesthetic
Visual design intelligence and UI aesthetics. Integrates: chrome-devtools, ai-multimodal, media-processing. Capabilities: design analysis, visual hierarchy, color theory, typography, micro-interactions, animation, design systems, accessibility. Actions: analyze, design, create, capture, evaluate, implement UI aesthetics. Keywords: Dribbble, Behance, Mobbin, design inspiration, visual hierarchy, color palette, typography, spacing, animation, micro-interaction, design system, style guide, accessibility, WCAG, contrast ratio, golden ratio, whitespace, visual rhythm. Use when: building beautiful UIs, analyzing design inspiration, implementing visual hierarchy, adding animations/micro-interactions, creating design systems, evaluating aesthetic quality, capturing design screenshots.
ui-ux-design
UI/UX design reference database. 50+ styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.
Didn't find tool you were looking for?