Define, compose, and wire Google ADK agents with function tools and multi-agent orchestration. Use when writing agent definitions, adding Python function tools, building pipelines with SequentialAgent/LoopAgent/ParallelAgent, or designing router/delegation patterns. Trigger on: adk agent, LlmAgent, SequentialAgent, LoopAgent, ParallelAgent, AgentTool, function tool, output_key, output_schema, agent routing.
91%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Use this skill when:
Agent (LlmAgent) with model, instructions, or tools.tools=[...].output_key / {var} injection.Do not use this skill when:
google-adk-setup).google-adk-setup references).from google.adk.agents.llm_agent import Agent
root_agent = Agent(
name="my_agent",
model="gemini-2.5-flash",
description="One-sentence description used by other agents for routing.",
instruction="You are a helpful assistant. Answer: {topic?}",
tools=[my_tool],
)Key parameters:
| Parameter | Purpose |
|---|---|
name | Unique identifier for the agent |
model | Gemini model string (e.g. gemini-2.5-flash) |
description | Used by orchestrators for routing — be precise |
instruction | System prompt; supports {var} (required) and {var?} (optional) state injection |
tools | List of Python functions or AgentTool instances |
output_schema | Pydantic model for structured output |
output_key | Writes agent output to shared session state under this key |
include_contents | Controls which conversation history is passed |
generate_content_config | Fine-grained generation parameters |
Critical constraint: output_schema and tools cannot both be set on most models. Choose one.
See references/tool-patterns.md for full examples.
def get_weather(city: str) -> dict:
"""Return current weather for the given city name.
Args:
city: The city name to look up.
"""
return {"status": "success", "temperature_c": 22}
agent = Agent(model="gemini-2.5-flash", name="weather_agent", tools=[get_weather])dict with a "status" key: "success", "error", or "pending".{"result": value}.*args and **kwargs are ignored in schema generation — never use them.LongRunningFunctionTool(func=my_func).See references/multi-agent-patterns.md for full examples.
from google.adk.agents import SequentialAgent
pipeline = SequentialAgent(
name="research_pipeline",
sub_agents=[researcher, writer, reviewer],
)output_key="my_key" on an agent to write its result to shared state.{my_key} in their instruction.from google.adk.agents import LoopAgent
loop = LoopAgent(
name="refinement_loop",
sub_agents=[drafter, critic],
max_iterations=5,
)from google.adk.agents import ParallelAgent
parallel = ParallelAgent(
name="parallel_research",
sub_agents=[topic_a_agent, topic_b_agent],
)from google.adk.agents import AgentTool
dispatcher = Agent(
name="dispatcher",
model="gemini-2.5-flash",
tools=[AgentTool(agent=specialist)],
)description on the wrapped agent controls when it is invoked.# Required variable (errors if missing from state)
instruction = "Summarize this text: {raw_text}"
# Optional variable (silently ignored if missing)
instruction = "Context: {context?}\n\nAnswer the user's question."State is populated by prior agents' output_key values or session initialization.
saski/arnesto
752f690
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.