Agent Skillsphuc-nt/my-translator › ck:google-adk-python

ck:google-adk-python

GitHub

Google ADK Python 技能指南,涵盖多智能体系统构建、A2A协议、MCP工具集成、工作流编排、状态管理及 Vertex AI 部署评估。

.opencode/skills/google-adk-python/SKILL.md phuc-nt/my-translator

Trigger Scenarios

构建单/多智能体系统 集成 MCP 服务器作为工具 配置 A2A 远程通信 使用工作流代理进行管道处理 部署到 Cloud Run 或 Vertex AI

Install

npx skills add phuc-nt/my-translator --skill ck:google-adk-python -g -y
More Options

Non-standard path

npx skills add https://github.com/phuc-nt/my-translator/tree/main/.opencode/skills/google-adk-python -g -y

Use without installing

npx skills use phuc-nt/my-translator@ck:google-adk-python

指定 Agent (Claude Code)

npx skills add phuc-nt/my-translator --skill ck:google-adk-python -a claude-code -g -y

安装 repo 全部 skill

npx skills add phuc-nt/my-translator --all -g -y

预览 repo 内 skill

npx skills add phuc-nt/my-translator --list

SKILL.md

Frontmatter
{
    "name": "ck:google-adk-python",
    "license": "Apache-2.0",
    "metadata": {
        "author": "claudekit",
        "version": "2.0.0"
    },
    "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.",
    "argument-hint": "[agent or feature]"
}

Google ADK Python Skill

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 Activate

  • 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
  • Add callbacks, plugins, or observability hooks
  • Deploy to Cloud Run, Vertex AI Agent Engine, or GKE
  • Evaluate agents with adk eval framework

Agent Structure Convention (Required)

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

Quick Start

pip install google-adk          # stable (weekly releases)
uv sync --all-extras            # dev setup (uv required, Python 3.10+, 3.11+ recommended)
from google.adk import Agent

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

App Pattern (Production)

from google.adk import Agent
from google.adk.apps import App
from google.adk.apps.app import EventsCompactionConfig
from google.adk.plugins.save_files_as_artifacts_plugin import SaveFilesAsArtifactsPlugin

app = App(
    name="my_app",
    root_agent=Agent(name="my_agent", model="gemini-2.5-flash", ...),
    plugins=[SaveFilesAsArtifactsPlugin()],
    events_compaction_config=EventsCompactionConfig(compaction_interval=2),
)

Use App when needing plugins, event compaction, or custom lifecycle management.

CLI Tools

Command Purpose
adk web <agents_dir> Dev UI (recommended for development)
adk run <agent_dir> Interactive CLI testing
adk api_server <agents_dir> FastAPI production server
adk eval <agent> <evalset.json> Run evaluation suite

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, etc.
MCP Tools MCPToolset(connection_params=StdioConnectionParams(...))
Sub-agents Agent(..., sub_agents=[agent1, agent2])
Human-in-loop LongRunningFunctionTool(func=my_func)
Plugins App(..., plugins=[MyPlugin()])

Model Support

Latest: gemini-2.5-flash (default), gemini-2.5-pro, gemini-2.0-flash (sunsets Mar 2026) Preview: gemini-3-flash-preview, gemini-3-pro-preview Also: Anthropic Claude, Ollama, LiteLLM, vLLM, Model Garden

Best Practices

  1. Code-first — define agents in Python for version control and testing
  2. Agent convention — always use root_agent or app variable in agent.py
  3. Modular agents — specialize per domain, compose via sub_agents
  4. Workflow selection — workflow agents for predictable, LlmAgent for dynamic
  5. StateToolContext.state for ephemeral, MemoryService for long-term
  6. Safety — callbacks for guardrails, tool confirmation for sensitive ops
  7. Evaluate — test with adk eval + evalset JSON before deployment

References

Detailed guides (load as needed):

  • references/agent-types-and-architecture.md — Agent types, workflows, custom agents
  • references/tools-and-mcp-integration.md — Custom tools, MCP, tool filtering
  • references/multi-agent-and-a2a-protocol.md — Sub-agents, A2A, coordinator patterns
  • references/sessions-state-memory-artifacts.md — State, artifacts, sessions, memory
  • references/callbacks-plugins-observability.md — Lifecycle hooks, plugins, tracing
  • references/evaluation-testing-cli.md — adk eval, CLI, evalset format
  • references/deployment-cloud-run-vertex-gke.md — Cloud Run, Vertex AI, GKE

External Resources

Version History

  • 3495f99 Current 2026-07-25 07:19

Same Skill Collection

.opencode/skills/agent-browser/SKILL.md
.opencode/skills/ai-artist/SKILL.md
.opencode/skills/ai-multimodal/SKILL.md
.opencode/skills/ask/SKILL.md
.opencode/skills/backend-development/SKILL.md
.opencode/skills/better-auth/SKILL.md
.opencode/skills/bootstrap/SKILL.md
.opencode/skills/brainstorm/SKILL.md
.opencode/skills/chrome-devtools/SKILL.md
.opencode/skills/ck-autoresearch/SKILL.md
.opencode/skills/ck-debug/SKILL.md
.opencode/skills/ck-loop/SKILL.md
.opencode/skills/ck-plan/SKILL.md
.opencode/skills/ck-predict/SKILL.md
.opencode/skills/ck-scenario/SKILL.md
.opencode/skills/ck-security/SKILL.md
.opencode/skills/code-review/SKILL.md
.opencode/skills/coding-level/SKILL.md
.opencode/skills/context-engineering/SKILL.md
.opencode/skills/cook/SKILL.md
.opencode/skills/copywriting/SKILL.md
.opencode/skills/databases/SKILL.md
.opencode/skills/deploy/SKILL.md
.opencode/skills/devops/SKILL.md
.opencode/skills/docs-seeker/SKILL.md
.opencode/skills/docs/SKILL.md
.opencode/skills/fix/SKILL.md
.opencode/skills/frontend-design/SKILL.md
.opencode/skills/frontend-development/SKILL.md
.opencode/skills/git/SKILL.md
.opencode/skills/gkg/SKILL.md
.opencode/skills/journal/SKILL.md
.opencode/skills/kanban/SKILL.md
.opencode/skills/llms/SKILL.md
.opencode/skills/markdown-novel-viewer/SKILL.md
.opencode/skills/mcp-builder/SKILL.md
.opencode/skills/mcp-management/SKILL.md
.opencode/skills/media-processing/SKILL.md
.opencode/skills/mermaidjs-v11/SKILL.md
.opencode/skills/mobile-development/SKILL.md
.opencode/skills/payment-integration/SKILL.md
.opencode/skills/plans-kanban/SKILL.md
.opencode/skills/preview/SKILL.md
.opencode/skills/problem-solving/SKILL.md
.opencode/skills/project-management/SKILL.md
.opencode/skills/project-organization/SKILL.md
.opencode/skills/react-best-practices/SKILL.md
.opencode/skills/remotion/SKILL.md
.opencode/skills/repomix/SKILL.md

Metadata

Files
0
Version
3495f99
Hash
0726dff5
Indexed
2026-07-25 07:19

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 05:58
浙ICP备14020137号-1 $mapa de visitantes$