From adk-multi-agent
Use this skill to design ADK 2.0 graph-based workflows — the new-in-2.0 feature for deterministic task routing with explicit node/edge control flow. Triggers on: "ADK graph workflow", "graph-based agent routing", "ADK 2.0 deterministic routing", "agent graph", "node-edge agent flow", "directed graph of agents", "ADK GraphAgent". Generates a graph definition with typed edges, conditional transitions, and entry/exit nodes — strictly deterministic, unlike the LLM-driven coordinator pattern.
How this skill is triggered — by the user, by Claude, or both
Slash command
/adk-multi-agent:graph-workflow-designerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Design **graph-based workflows** introduced in ADK 2.0. Each node is an agent (or function), each edge is a deterministic transition predicate. Use when you need predictable routing without LLM-driven delegation.
Design graph-based workflows introduced in ADK 2.0. Each node is an agent (or function), each edge is a deterministic transition predicate. Use when you need predictable routing without LLM-driven delegation.
from google.adk.agents import LlmAgent, GraphAgent
from google.adk.agents.graph import Node, Edge
# Nodes
classify = LlmAgent(
name="classify",
model="gemini-2.5-flash",
instruction="Classify the request as 'urgent' or 'standard'. Write to state['priority'].",
output_key="priority",
)
urgent_handler = LlmAgent(
name="urgent",
model="gemini-2.5-pro",
instruction="Handle urgent requests with immediate response.",
)
standard_handler = LlmAgent(
name="standard",
model="gemini-2.5-flash",
instruction="Handle standard requests at normal pace.",
)
audit = LlmAgent(
name="audit",
model="gemini-2.5-flash",
instruction="Append a one-line audit log entry.",
)
# Graph
root_agent = GraphAgent(
name="priority_router",
nodes=[classify, urgent_handler, standard_handler, audit],
edges=[
Edge(from_="classify", to="urgent",
when=lambda ctx: ctx.session.state.get("priority") == "urgent"),
Edge(from_="classify", to="standard",
when=lambda ctx: ctx.session.state.get("priority") == "standard"),
Edge(from_="urgent", to="audit"),
Edge(from_="standard", to="audit"),
],
entry="classify",
exit_nodes=["audit"],
)
when is a callable receiving InvocationContext. Return True to take the edge. If multiple edges match from a node, the first listed wins (or use priority).
Edge(from_="reviewer", to="drafter",
when=lambda ctx: ctx.session.state.get("approved") is False,
max_traversals=5), # safety limit
nodes=[]entry nodeexit_nodes entrygraph.validate() if available)max_traversals to avoid infinite loopsdynamic-workflow-builder for code-driven branching when graph topology itself depends on runtime stateGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub healthcare-ai-consulting-llc/adk-2-toolkit --plugin adk-multi-agent