google-adk
Guide for building AI agents with Google ADK (Agent Development Kit). Use when creating multi-agent pipelines, implementing conditional agent branching, designing agent tools with FunctionTool, or debugging agent data flow issues. Covers SequentialAgent, LoopAgent, ParallelAgent patterns, session.state management, output_key chaining, and transfer_to_agent for control flow. Essential for understanding non-obvious ADK behaviors like why SequentialAgent runs ALL agents even after rejection.
npx skills add majiayu000/claude-skill-registry --skill google-adk-cuba6112-skillfactory --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Google ADK Agent Development ## Critical Architecture Insight **SequentialAgent runs ALL sub-agents unconditionally.** There is NO native conditional branching. The pipeline does not stop if an agent outputs "REJECT" or any other signal. ```python # THIS RUNS ALL 4 AGENTS regardless of gatekeeper output research_cycle = SequentialAgent( sub_agents=[theorist, critic, gatekeeper, architect] ) ``` To skip agents, use `transfer_to_agent` tool. ## Data Flow: output_key -> session.state -> {placeholder} ```python # Agent A stores output agent_a = Agent( instruction="Generate hypothesis", output_key="hypothesis" # Stored in session.state["hypothesis"] ) # Agent B reads via placeholder agent_b = Agent( instruction=""" Critique this hypothesis: {hypothesis} """, # Resolved from session.state at runtime output_key="critique" ) ``` Placeholders support optional syntax: `{variable?}` (no error if missing). ## Conditional Branching with transfer_to_agent ```python from google.adk.tools import transfer_to_agent gatekeeper = Agent( name="gatekeeper", instruction=""" Decide: PROCEED, REVISE, or REJECT - PROCEED: Continue normally (don't call transfer_to_agent) - REVISE: Call transfer_to_agent("t
- Critical Architecture Insight
- Data Flow: outputkey -> session.state -> {placeholder}
- Conditional Branching with transfertoagent
- FunctionTool Design
- Automatic toolcontext injection
- Docstring becomes tool description
- Agent Types
- Common Pitfalls
- 1. Expecting SequentialAgent to stop on rejection
- 2. Missing outputkey breaks data flow
- 3. Placeholder without matching outputkey
- 4. toolcontext as required parameter
- 5. launchpersistentcontext returns BrowserContext
- 6. Context overflow from session history (token limit exceeded)
rm -rf ika_agent/.adk/session.db
What does the google-adk skill do?
Guide for building AI agents with Google ADK (Agent Development Kit). Use when creating multi-agent pipelines, implementing conditional agent branching, designing agent tools with FunctionTool, or debugging agent data flow issues. Covers SequentialAgent, LoopAgent, ParallelAgent patterns, session.state management, output_key chaining, and transfer_to_agent for control flow. Essential for understanding non-obvious ADK behaviors like why SequentialAgent runs ALL agents even after rejection.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill google-adk-cuba6112-skillfactory --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
