adk-python
Use Google ADK Python to build agents, Workflow graphs, tools, runtime services, CLI apps, evaluations, deployments, and ADK repository changes.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- adk-python
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use Google ADK Python to build agents, Workflow graphs, tools, runtime services, CLI apps, evaluations, deployments, and ADK repository changes.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/capability-map.md4.1 KB
- 参考文档references/repo-provenance.md2.0 KB
- 参考文档references/repo-routing-metadata.json494 B
- 参考文档references/troubleshooting.md4.0 KB
- 脚本scripts/check_adk_install.py4.8 KB
03 SKILL.md 正文
ADK Python
Use this repo skill when a task involves Google Agent Development Kit for Python (google-adk / google.adk), ADK 2.0 Agent and Workflow APIs, ADK CLI commands, tool integrations, runtime services, evaluation/debugging, or modifying the ADK Python repository itself.
Start Here
- Install the package with
pip install google-adkon Python 3.10+. - For optional integrations, install the narrow extra for the task instead of
allby default, such asgoogle-adk[db],google-adk[mcp],google-adk[eval],google-adk[gcp], orgoogle-adk[extensions]. - Verify the base install with
python -c "import google.adk; print(google.adk.__version__)"andadk --help. - Run check_adk_install.py for a safe diagnostic covering imports, CLI command availability, package version, and optional-extra signals.
- Read Repository Provenance before deciding whether this skill is current for a checkout; refresh if commit, dirty state, package version, or major evidence paths changed.
Route by Task
- Build Python agents: Use agent-construction for
Agent/LlmAgent, instructions, model settings, callbacks, schemas, task/single-turn modes, sub-agents, and multi-agent delegation. - Build Workflow graphs: Use workflow-orchestration for
Workflow,BaseNode, function nodes, graph edges,JoinNode, dynamic nodes, parallel worker, HITL, retry, checkpoint/resume, and event flow. - Add tools or integrations: Use tools-and-integrations for
FunctionTool,ToolContext, toolsets, confirmation/long-running tools, auth, MCP, OpenAPI, Google API/cloud integrations, A2A, and optional extras. - Configure runtime services: Use runtime-services for
Runner,App, sessions, memory, artifacts, plugins, telemetry, code executors, environments, event persistence, and service lifecycles. - Use CLI/config/deployment: Use cli-configuration-deployment for
adk run,adk web,adk api_server,adk test,adk eval,adk deploy, app discovery, YAML config, service URIs, and safe CLI/schema inspection. - Evaluate or debug behavior: Use evaluation-debugging for eval sets, JSON test fixtures,
adk test,adk eval, event summaries, traces, session inspection, flaky evals, and assertion design. - Modify this repository: Use repo-development for ADK Python source edits, style, tests, docs, samples, generated schema, review gates, and repository-specific validation.
Shared References
- Capability Map maps common user request families to sub-skills, bundled scripts, and validation expectations.
- Troubleshooting covers cross-cutting install/import, optional dependency, CLI, credential, server, and repository-staleness failures.
- Repository Routing Metadata is structured metadata used by DisCo's managed
repo-skills-routerduring import.
Safe Defaults
- Prefer import/signature checks,
--help, and dry-run diagnostics before starting servers, deployments, cloud calls, model-backed evals, or database migrations. - Do not assume optional extras are installed in base
google-adk; diagnose missing modules and install only what the selected workflow requires. - Do not put API keys, OAuth secrets, service-account JSON, production database URLs, or cloud project credentials into examples or YAML files.
- For repository-maintenance tasks, run focused tests first and avoid remote/cloud/credentialed tests unless the user explicitly asks and the environment is configured.
Minimal Examples
Create a simple agent:
from google.adk import Agent
root_agent = Agent(
name="greeter",
model="gemini-2.5-flash",
instruction="Greet the user and answer briefly.",
)
Create a simple workflow:
from google.adk import Workflow
root_agent = Workflow(
name="fruit_flow",
edges=[("START", pick_fruit, explain_benefit)],
)
Run local checks:
python scripts/check_adk_install.py --json
adk --help
adk run path/to/my_agent --help
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).