AGENT SKILL

google-adk-python

Build AI agents with Google ADK Python. Multi-agent systems, A2A protocol, MCP tools, workflow agents, state/memory, callbacks/plugins, Vertex AI deployment, evaluation.

License 许可
Apache-2.0
最近更新
2026-03-17
Stars
★ 0
Forks
0

01 前言 Front Matter

name
google-adk-python
license
Apache-2.0
version
2
description
Build AI agents with Google ADK Python. Multi-agent systems, A2A protocol, MCP tools, workflow agents, state/memory, callbacks/plugins, Vertex AI deployment, evaluation.
allowed-tools
Read, Write, Edit, Glob, Grep, Bash
argument-hint
[agent or feature]

02 资源文件 5

03 SKILL.md 正文

Google ADK Python

Expert guide for Google's Agent Development Kit (ADK) Python — open-source, code-first toolkit for building, evaluating, and deploying AI agents. Optimized for Gemini, model-agnostic by design.

When to Use

  • Build single or multi-agent systems with tool integration
  • Implement A2A protocol for remote agent communication
  • Integrate MCP servers as agent tools
  • Use workflow agents (sequential, parallel, loop) for pipelines
  • Manage sessions, state, memory, and artifacts
  • Deploy to Cloud Run, Vertex AI Agent Engine, or GKE

Required Agent Structure

my_agent/
├── __init__.py   # MUST: from . import agent
└── agent.py      # MUST: root_agent = Agent(...) OR app = App(...)

Quick Start

pip install google-adk
from google.adk import Agent

root_agent = Agent(
    name="assistant",
    model="gemini-2.5-flash",
    instruction="You are a helpful assistant.",
    tools=[get_weather],
)

Agent Types

Type Use Case
Agent / LlmAgent Dynamic routing, tool use, reasoning
SequentialAgent Fixed-order pipeline
ParallelAgent Concurrent execution
LoopAgent Iterative processing
RemoteA2aAgent Remote agent via A2A protocol

Key APIs

Feature API
State tool_context.state[key] = value
Artifacts tool_context.save_artifact(name, part)
Callbacks before_agent_callback, after_model_callback
MCP Tools MCPToolset(connection_params=StdioConnectionParams(...))
Sub-agents Agent(..., sub_agents=[agent1, agent2])

CLI Tools

adk web <agents_dir>        # Dev UI
adk run <agent_dir>         # Interactive CLI testing
adk api_server <agents_dir> # FastAPI production server
adk eval <agent> <eval.json> # Run evaluation suite

Models

  • Default: gemini-2.5-flash
  • Advanced: gemini-2.5-pro
  • Also supported: Anthropic Claude, Ollama, LiteLLM

Best Practices

  1. Code-first — define agents in Python for version control
  2. Always use root_agent or app variable in agent.py
  3. Specialize agents per domain, compose via sub_agents
  4. Use workflow agents for predictable, LlmAgent for dynamic
  5. Callbacks for guardrails and safety

Resources

References

  • references/agent-types-and-architecture.md
  • references/tools-and-mcp-integration.md
  • references/multi-agent-and-a2a-protocol.md
  • references/sessions-state-memory-artifacts.md
  • references/callbacks-plugins-observability.md
  • references/evaluation-testing-cli.md
  • references/deployment-cloud-run-vertex-gke.md

04 同仓库更多 Skills

MinhHoangDono
MinhHoangDono/antigravity-kit

ck:web-frameworks

Build with Next.js (App Router, RSC, SSR, ISR), Turborepo monorepos. Use for React apps, server rendering, build optimization, caching strategies, shared dependencies.

★ 0
MinhHoangDono
MinhHoangDono/antigravity-kit

ck:web-frameworks

Build with Next.js (App Router, RSC, SSR, ISR), Turborepo monorepos. Use for React apps, server rendering, build optimization, caching strategies, shared dependencies.

★ 0
MinhHoangDono
MinhHoangDono/antigravity-kit

ck:threejs

Build 3D web apps with Three.js (WebGL/WebGPU). 556 searchable examples, 60 API classes, 20 use cases. Actions: create 3D scene, load model, add animation, implement physics, build VR/XR. Topics: GLTF loader, PBR materials, particle effects, shadows, post-processing, compute shaders, TSL. Integrations: WebGPU, physics engines, spatial audio.

★ 0
MinhHoangDono
MinhHoangDono/antigravity-kit

ck:threejs

Build 3D web apps with Three.js (WebGL/WebGPU). 556 searchable examples, 60 API classes, 20 use cases. Actions: create 3D scene, load model, add animation, implement physics, build VR/XR. Topics: GLTF loader, PBR materials, particle effects, shadows, post-processing, compute shaders, TSL. Integrations: WebGPU, physics engines, spatial audio.

★ 0
MinhHoangDono
MinhHoangDono/antigravity-kit

ck:mintlify

Build and deploy documentation sites with Mintlify. Use when creating API docs, developer portals, or knowledge bases. Covers docs.json configuration, MDX components (Cards, Steps, Tabs, Accordions, CodeGroup, Callouts, Mermaid, View, Tiles, Tree, Badge, Banner, Color, Tooltips, Panel), page frontmatter, navigation structure (tabs, anchors, dropdowns, products, versions, languages), theming (7 themes), OpenAPI/AsyncAPI integration, AI features (llms.txt, MCP, skill.md), deployment (GitHub, GitLab, Vercel, Cloudflare, AWS), and CLI commands for local development and validation.

★ 0
MinhHoangDono
MinhHoangDono/antigravity-kit

ck:mintlify

Build and deploy documentation sites with Mintlify. Use when creating API docs, developer portals, or knowledge bases. Covers docs.json configuration, MDX components (Cards, Steps, Tabs, Accordions, CodeGroup, Callouts, Mermaid, View, Tiles, Tree, Badge, Banner, Color, Tooltips, Panel), page frontmatter, navigation structure (tabs, anchors, dropdowns, products, versions, languages), theming (7 themes), OpenAPI/AsyncAPI integration, AI features (llms.txt, MCP, skill.md), deployment (GitHub, GitLab, Vercel, Cloudflare, AWS), and CLI commands for local development and validation.

★ 0