
Google Agents Cli Adk Code
Adopt Google ADK 2.0 Workflow and Graph APIs in Python agents without breaking 1.x storage or staying pinned on google-adk<2.0.0.
Overview
Google Agents CLI ADK Code is an agent skill most often used in Build (also Validate prototype, Ship testing) that documents ADK 2.0 Workflow API setup, upgrades, and storage isolation rules.
Install
npx skills add https://github.com/google/agents-cli --skill google-agents-cli-adk-codeWhat is this skill?
- ADK 2.0 experimental Workflow API—Python >=3.11 only, incompatible with Live Streaming
- Scaffold fix: remove google-adk<2.0.0 upper bound then uv sync --prerelease=allow or pip --pre
- Hard warning: do not share persistent storage between ADK 1.x and 2.0 projects
- Links to official Workflow, Graph routes, and Collaboration docs on adk.dev
- Verification one-liner: import google.adk.workflow
- Requires google-adk >= 2.0.0 and Python >= 3.11
- Documented 3-step upgrade path: pyproject.toml, reinstall, verify import
Adoption & trust: 12.5k installs on skills.sh; 2.7k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your scaffolded ADK project stays on 1.x after a pip install, or you might mix ADK 2.0 with 1.x storage and lose or corrupt agent state.
Who is it for?
Indie builders shipping Python ADK 2.0 agents who need a concise upgrade and Workflow API orientation tied to google-agents-cli workflows.
Skip if: Production teams needing GA-stable APIs without pre-GA churn, non-Python stacks, or agents that rely on ADK Live Streaming.
When should I use this skill?
Working on ADK 2.0 Workflow API projects, upgrading from pinned <2.0.0 scaffolds, or verifying Workflow availability in Python agents.
What do I get? / Deliverables
After the skill runs, pyproject.toml targets google-adk>=2.0.0a1, dependencies reinstall with prerelease flags, and Workflow API availability is verified before building graphs.
- Updated dependency constraints for ADK 2.0
- Verified Workflow API import and install commands
- Agent project isolated from ADK 1.x shared storage
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
ADK workflow cheatsheet sits on Build agent-tooling as the primary shelf where agents are scaffolded and dependencies are upgraded. Content is ADK 2.0 pre-GA Workflow API reference, upgrade steps, and compatibility warnings for agent projects—not generic app frontend work.
Where it fits
Spike a Workflow graph for a support agent before committing to full Build implementation.
Fix pyproject.toml pins and install ADK 2.0 prerelease so codegen uses Workflow routes instead of legacy patterns.
Run the import google.adk.workflow check in CI before tagging an agent release.
How it compares
ADK 2.0 Workflow reference skill—not a replacement for full google-adk product docs or generic LangChain agent tutorials.
Common Questions / FAQ
Who is google-agents-cli-adk-code for?
Solo and small-team builders using Google ADK in Python who scaffold or upgrade agents via CLI-oriented workflows and need ADK 2.0 Workflow API guardrails.
When should I use google-agents-cli-adk-code?
Use it in Build when bumping google-adk to 2.0, enabling Workflow graphs, or in Validate when prototyping agent orchestration; revisit in Ship when verifying imports before release candidates.
Is google-agents-cli-adk-code safe to install?
The skill describes experimental pre-GA APIs and storage risks—check Security Audits on this Prism page and isolate ADK 2.0 data stores from 1.x before agents run upgrade commands.
SKILL.md
READMESKILL.md - Google Agents Cli Adk Code
# ADK 2.0 Workflow API Cheatsheet > **Experimental (Pre-GA)** — The Workflow API requires ADK 2.0 (`google-adk >= 2.0.0`). APIs may change before GA. > Python only. **Incompatible with Live Streaming.** Requires **Python >= 3.11**. > > **WARNING:** Do NOT allow ADK 2.0 projects to share persistent storage with ADK 1.x projects — this can cause data loss or corruption. ### Upgrading a scaffolded project to ADK 2.0 Scaffolded projects pin `google-adk<2.0.0` — this must be updated before ADK 2.0 can install. Simply running `pip install --pre google-adk` or `uv add --prerelease=allow google-adk` will silently stay on 1.x. **Step 1 — Update `pyproject.toml`:** ```toml # Under [project] > dependencies, remove the <2.0.0 upper bound: "google-adk>=2.0.0a1", # was: "google-adk>=1.15.0,<2.0.0" # If you have eval extras, update those too: # [project.optional-dependencies] # eval = ["google-adk[eval]>=2.0.0a1"] # was: "google-adk[eval]>=1.15.0,<2.0.0" ``` **Step 2 — Reinstall dependencies:** ```bash uv sync --prerelease=allow # with uv # or pip install --pre -e ".[eval]" # with pip ``` **Step 3 — Verify:** ```bash python -c "import google.adk.workflow; print('Workflow API available')" ``` ### New project (no scaffolding) ```bash pip install --pre google-adk # or with uv: uv add --prerelease=allow google-adk ``` **Official docs:** [Workflows overview](https://adk.dev/workflows/index.md) · [Graph routes](https://adk.dev/graphs/routes/index.md) · [Collaboration](https://adk.dev/workflows/collaboration/index.md) · [Data handling](https://adk.dev/graphs/data-handling/index.md) · [Dynamic workflows](https://adk.dev/graphs/dynamic/index.md) · [Human-in-the-loop](https://adk.dev/graphs/human-input/index.md) ## 1. Core Concepts A `Workflow` is a graph-based agent: nodes do work, edges define flow, `START` is the entry point. ```python from google.adk.workflow import Workflow def greet(node_input: str) -> str: return f"Hello, {node_input}!" root_agent = Workflow( name="greeter", edges=[('START', greet)], ) ``` Three building blocks: **Nodes** (functions, LLM agents, tools), **Edges** (connections with optional route conditions), **START** (built-in entry receiving user input). ### Workflow Constructor ```python root_agent = Workflow( name="my_workflow", edges=[...], # Edge definitions (or use graph= instead) input_schema=None, # Pydantic model for input validation rerun_on_resume=True, # Rerun workflow on resume (default: True) max_concurrency=None, # Limit parallel node execution (None = no limit) state_schema=None, # Pydantic model for state validation ) ``` --- ## 2. Node Types Any "NodeLike" is accepted in edges and auto-wrapped: | Python Object | Wrapped As | Default `rerun_on_resume` | |--------------|-----------|------------------------| | Function/callable | `FunctionNode` | `False` | | `LlmAgent` | Internal `_LlmAgentWrapper` | `True` | | Other `BaseAgent` | Internal `AgentNode` | `False` | | `BaseTool` | Internal `_ToolNode` | `False` | | `BaseNode` subclass | Used as-is | Per subclass | > **Auto-wrapping is the recommended approach.** Place functions, agents, and tools directly in edges — the framework wraps them automatically. You do not need to import or use internal wrapper classes directly. --- ## 3. Function Nodes Most common node type. Parameter resolution: | Parameter | Source | |-----------|--------| | `ctx` | Workflow `Context` object | | `node_input` | Output from predecessor node | | Any other name | `ctx.state[param_name]` | ```python from google.adk.agents.context import Context def process(ctx: Context, node_input: Any, user_name: str) -> str: # node_input = predecessor output; user_name = ctx.state['user_name'] # START outputs types.Content (not str) unless input_schema is set return f"{user_name}: {node_input}" ``` ### Return Types - **Value** -> wrapped in `Event(output=value)`, triggers