Top 100+ Google ADK Interview Questions and Answers for 2026
Googleβs Agent Development Kit crossed 20,000 GitHub stars within its first year β and with ADK 2.0 reaching GA in May 2026, demand for engineers who can build, orchestrate, and deploy ADK agents is accelerating across every major cloud shop. Whether you are interviewing at a Google Cloud partner, a startup building on Gemini, or an enterprise migrating from monolithic RPA to agentic AI, the questions below cover the full surface area interviewers draw from: fundamentals, agent types, tools, state, memory, multi-agent orchestration, callbacks, deployment, the A2A protocol, and scenario-based system design. Every answer includes the code or config you would write on a whiteboard, not just the concept behind it. If you are building your first ADK agent or preparing to architect a production fleet, this is your single reference β the agentic AI skills landscape in 2026 makes it clear that framework fluency is now a hiring filter, not a nice-to-have.
- Section 1: Core Concepts & Fundamentals (Q1βQ15)
- Q1. What is Google ADK and why was it created?
- Q2. What languages does ADK support?
- Q3. What is the difference between ADK 1.x and ADK 2.0?
- Q4. Name the core primitives in ADKβs architecture.
- Q5. How does ADK relate to Gemini?
- Q6. What is the simplest ADK agent you can build?
- Q7. How do you run and test an ADK agent locally?
- Q8. What is the Runner and how does it work?
- Q9. What is the difference between an Agent and a Tool in ADK?
- Q10. What is ADK Studio?
- Q11. How does ADK handle authentication with Google Cloud?
- Q12. What license is ADK released under and what does that mean for enterprise use?
- Q13. Name three Google products that run on ADK internally.
- Q14. What is the difference between declarative and code-defined agents?
- Q15. How does ADK compare to LangGraph at a high level?
- Section 2: Agent Types & Architecture (Q16βQ28)
- Q16. What is LlmAgent and when do you use it?
- Q17. What is BaseAgent and how do you build a custom agent?
- Q18. Explain SequentialAgent with an example.
- Q19. How does ParallelAgent work?
- Q20. What is LoopAgent and how do you stop it?
- Q21. When would you use LoopAgent vs. a custom BaseAgent loop?
- Q22. How do you compose a multi-level agent hierarchy?
- Q23. What is the Agent Config and why does it matter?
- Q24. How does instruction templating work?
- Q25. What is output_key and why is it important?
- Q26. How do agents communicate with each other in ADK?
- Q27. What is the event loop and how does it drive agent execution?
- Q28. Can an ADK agent operate without an LLM?
- Section 3: Tools System (Q29βQ42)
- Q29. What types of tools does ADK support?
- Q30. How do you create a function tool?
- Q31. What is ToolContext and what can you do with it?
- Q32. How does AgentTool differ from sub_agents delegation?
- Q33. How do you connect an MCP server as a tool source?
- Q34. What are built-in tools and when should you use them?
- Q35. What is LongRunningFunctionTool?
- Q36. How does the model decide which tool to call?
- Q37. How do you handle tool authentication in ADK?
- Q38. What are tool limitations in ADK?
- Q39. How do you test tools in isolation?
- Q40. Can you use LangChain or CrewAI tools inside ADK?
- Q41. How do you create an OpenAPI tool?
- Q42. What is skip_summarization and when should you use it?
- Section 4: State Management & Sessions (Q43βQ55)
- Q43. What are the four state prefixes and their scopes?
- Q44. How do you read and write session state?
- Q45. What is the difference between State and History?
- Q46. What is a Session in ADK?
- Q47. What session backends does ADK support?
- Q48. How do you persist state across sessions using the user: prefix?
- Q49. What are Events and why are they important?
- Q50. How do you emit state changes through Events?
- Q51. What is context compression and why does ADK need it?
- Q52. How do you manage state isolation between agents?
- Q53. How does session rewind work?
- Q54. What is session migration?
- Q55. Best practices for state management in production?
- Section 5: Memory & Artifacts (Q56βQ65)
- Q56. What is the difference between State and Memory?
- Q57. How do you store memories in ADK?
- Q58. How do you retrieve memories?
- Q59. What memory backends does ADK support?
- Q60. What are Artifacts in ADK?
- Q61. How do Artifacts differ from State?
- Q62. When should you use Memory vs. State vs. Artifacts?
- Q63. How does Vertex AI Memory Bank work under the hood?
- Q64. Can agents share memory across different applications?
- Q65. How do you implement a βforget meβ feature using ADKβs memory?
- Section 6: Multi-Agent Orchestration (Q66βQ78)
- Q66. What are the three orchestration paradigms in ADK 2.0?
- Q67. How does dynamic delegation work?
- Q68. How do you implement human-in-the-loop in ADK?
- Q69. What is the A2A protocol and how does ADK support it?
- Q70. What is an Agent Card?
- Q71. How does ADK handle agent-to-agent communication?
- Q72. Design a customer support system with tiered escalation using ADK.
- Q73. How do you build a plan-and-execute pattern in ADK?
- Q74. What is the reflexion loop pattern?
- Q75. How do you implement a supervisor pattern in ADK?
- Q76. How does ADKβs MCP support enable interoperability?
- Q77. What is ambient mode?
- Q78. How do you handle failures in a multi-agent pipeline?
- Section 7: Callbacks & Plugins (Q79βQ88)
- Q79. What are callbacks in ADK?
- Q80. What callback types does ADK support?
- Q81. How do you implement a logging callback?
- Q82. How can a callback modify agent behavior?
- Q83. What are Plugins and how do they differ from callbacks?
- Q84. How do you register a plugin with an ADK application?
- Q85. When should you use a callback vs. a tool?
- Q86. How do you implement a guardrail using before_tool_callback?
- Q87. What is on_event_callback in plugins?
- Q88. Can plugins modify agent behavior at runtime?
- Section 8: Deployment & Production (Q89βQ100)
- Q89. What are the deployment options for ADK agents?
- Q90. How do you deploy to Cloud Run?
- Q91. What is the Vertex AI Agent Runtime?
- Q92. How does ADKβs evaluation framework work?
- Q93. How do you implement CI/CD for ADK agents?
- Q94. What observability features does ADK provide?
- Q95. How do you handle model routing in production?
- Q96. What is the Agent Starter Pack?
- Q97. How do you handle secrets and credentials in deployed agents?
- Q98. What is the cost model for Vertex AI Agent Runtime?
- Q99. How do you scale ADK agents for high traffic?
- Q100. What security features does ADK provide for enterprise deployments?
- Section 9: Scenario-Based & System Design (Q101βQ110)
- Q101. Design a document processing pipeline that extracts data from PDFs, validates it, and stores it in BigQuery.
- Q102. How would you build a multi-language customer support agent?
- Q103. Design a code review agent that reviews pull requests and suggests improvements.
- Q104. How would you migrate an existing RPA bot to an ADK agent?
- Q105. Design a real-time monitoring agent that detects anomalies and auto-remediates.
- Q106. How would you build a research assistant that synthesizes information from multiple sources?
- Q107. Compare deploying the same agent on Agent Runtime vs. Cloud Run vs. GKE.
- Q108. How would you implement a multi-tenant SaaS product using ADK?
- Q109. Design a system where ADK agents collaborate with LangGraph agents via A2A.
- Q110. You inherit a slow ADK agent pipeline (30s per turn). How do you diagnose and fix it?
- Frequently Asked Questions
- Is Google ADK free to use?
- What is the minimum Python version for ADK 2.0?
- Can I use ADK with non-Google models like GPT-4 or Claude?
- How does ADK compare to CrewAI?
- What Google certifications cover ADK?
- Key Takeaways
- External References
Section 1: Core Concepts & Fundamentals (Q1βQ15)
Q1. What is Google ADK and why was it created?
The Agent Development Kit (ADK) is Googleβs open-source framework β released under the Apache 2.0 license at Google Cloud Next in April 2025 β for building, debugging, and deploying AI agents. It was created to give developers a code-first, production-grade path from prototype to deployed agent, with deep integration into the Google Cloud ecosystem (Vertex AI, Cloud Run, GKE) while remaining model-agnostic through LiteLLM adapters. Googleβs own Agentspace (formerly Gemini Enterprise) and Customer Engagement Suite run on ADK internally.
Q2. What languages does ADK support?
ADK ships SDKs for five languages: Python (the most mature, v2.0.0 GA May 2026), TypeScript/JavaScript (v2.0.0 GA August 2026), Go (v2.0.0 GA June 2026), Java (v1.0.0 GA March 2026), and Kotlin (runs on the JVM alongside the Java SDK). Each has its own GitHub repository under the google/ org.
Q3. What is the difference between ADK 1.x and ADK 2.0?
ADK 1.x modeled agents as class hierarchies composed through workflow agents (SequentialAgent, ParallelAgent, LoopAgent). ADK 2.0 introduced a graph-based Workflow Runtime where agents, tools, and functions become nodes in a directed graph with explicit routing, retries, state management, and human-in-the-loop steps β conceptually closer to LangGraphβs approach but with ADKβs multi-language and Google Cloud integration advantages. Graph workflows are available in Python, TypeScript, and Go.
Q4. Name the core primitives in ADKβs architecture.
The seven core primitives are:
- Agent β the reasoning unit (LlmAgent, BaseAgent, workflow agents)
- Tool β extends capabilities beyond conversation (function tools, MCP tools, OpenAPI tools, AgentTool)
- Session β holds the context of a single conversation, including Events and State
- State β key-value working memory scoped by prefix (user:, app:, temp:, unprefixed)
- Event β the atomic unit of communication (user messages, agent replies, tool calls)
- Memory β long-term recall across sessions, distinct from session state
- Runner β manages execution flow, orchestrates agents based on events, coordinates backend services
Q5. How does ADK relate to Gemini?
ADK is optimized for Gemini (supporting context caching with Gemini 2.0+, grounding with Google Search, and bidirectional audio/video streaming via the Gemini Live API) but is model-agnostic. Through LiteLLM adapters, you can plug in OpenAI, Anthropic Claude, Cohere, Mistral, AWS Bedrock models, Ollama for local inference, or vLLM for self-hosted serving. The BaseLlm interface also allows custom model integrations.
Q6. What is the simplest ADK agent you can build?
from google.adk import Agent
root_agent = Agent(
name="greeter",
model="gemini-2.5-flash",
instruction="You are a friendly greeter. Say hello and ask how you can help.",
)
This minimal agent has a name, a model, and an instruction. Run it with adk run . in the terminal or adk web for the browser UI.
Q7. How do you run and test an ADK agent locally?
ADK provides three local modes:
adk run <agent_path>β terminal chat REPLadk webβ browser-based ADK Studio on port 8000 with Events, Traces, State, Artifacts, and Evals tabsadk api_server <agent_path>β launches a FastAPI server for programmatic testing
Q8. What is the Runner and how does it work?
The Runner is the execution engine. It receives events (user messages), routes them to the appropriate agent, processes the agentβs response (including tool calls), and yields output events. The basic pattern:
from google.adk import Runner
from google.adk.sessions import InMemorySessionService
session_service = InMemorySessionService()
runner = Runner(agent=root_agent, app_name="my_app", session_service=session_service)
session = await session_service.create_session(app_name="my_app", user_id="user-1")
async for event in runner.run_async(user_id="user-1", session_id=session.id, new_message=content):
print(event)
Q9. What is the difference between an Agent and a Tool in ADK?
An Agent has reasoning capability β it receives context, decides what to do, and can call tools or delegate to sub-agents. A Tool is a deterministic function an agent calls to perform a specific action (query an API, run code, search the web). The agent decides when to call a tool based on the toolβs name and docstring; the tool executes and returns a result.
Q10. What is ADK Studio?
ADK Studio is the developer UI launched with adk web. It displays an interactive chat interface alongside an inspection panel with tabs for: Info (agent graph visualization), Events (message/tool-call timeline), State (current session key-values), Artifacts (files and binary data), and Evals (test case management). You can save conversations as evaluation cases and replay them with different model parameters.
Q11. How does ADK handle authentication with Google Cloud?
Set GOOGLE_GENAI_USE_VERTEXAI=TRUE to use Vertex AI (authenticates via Application Default Credentials or service account). Otherwise, set a GOOGLE_API_KEY environment variable for the Gemini API directly. For third-party models via LiteLLM, each providerβs API key is set through provider-specific environment variables.
Q12. What license is ADK released under and what does that mean for enterprise use?
ADK is Apache 2.0 β permissive, no copyleft. Enterprises can use, modify, and distribute ADK in proprietary products without disclosing source code. The only requirement is preserving the copyright notice and license text. This is the same license as Kubernetes, TensorFlow, and most Google open-source projects.
Q13. Name three Google products that run on ADK internally.
Google has stated ADK powers: (1) Agentspace (formerly Gemini Enterprise) β the enterprise knowledge agent, (2) Customer Engagement Suite β contact center AI, and (3) Vertex AI Agent Gallery β the managed agent marketplace.
Q14. What is the difference between declarative and code-defined agents?
Code-defined: you write Python (or TypeScript/Go/Java) and expose root_agent in agent.py. Declarative: you define agents in root_agent.yaml with fields like agent_class: LlmAgent, model, instruction, sub_agents, and tools. Declarative agents are useful for non-engineers or configuration-driven deployments where agent behavior should be editable without code changes.
Q15. How does ADK compare to LangGraph at a high level?
Dimension: Maker | Google ADK: Google | LangGraph: LangChain
Dimension: Core model | Google ADK: Agent tree + graph workflows (2.0) | LangGraph: Directed graph with checkpoints
Dimension: Languages | Google ADK: Python, TS, Go, Java, Kotlin | LangGraph: Python, JS (beta)
Dimension: Model support | Google ADK: Gemini-first, model-agnostic via LiteLLM | LangGraph: Model-agnostic
Dimension: MCP support | Google ADK: Native McpToolset | LangGraph: Community adapters
Dimension: A2A protocol | Google ADK: Native | LangGraph: Not native
Dimension: Deployment | Google ADK: Vertex AI Agent Engine, Cloud Run, GKE | LangGraph: LangGraph Platform, self-hosted
Dimension: Evaluation | Google ADK: Built-in CLI + evalsets | LangGraph: LangSmith
Section 2: Agent Types & Architecture (Q16βQ28)
Q16. What is LlmAgent and when do you use it?
LlmAgent is the core agent type β a model-backed reasoning unit defined by a name, model, and instruction, with optional tools, sub_agents, and output_key. Use it whenever you need an agent that reasons about its task using a language model.
from google.adk import LlmAgent
writer = LlmAgent(
name="writer_agent",
model="gemini-2.5-pro",
instruction="Write a blog post about {topic}. Be detailed and cite sources.",
tools=[web_search],
output_key="draft",
)
Q17. What is BaseAgent and how do you build a custom agent?
BaseAgent is the abstract base class for custom Python orchestration agents that do not use a language model for their own logic. You subclass it and implement _run_async_impl(ctx), yielding events from sub-agents:
from google.adk import BaseAgent, InvocationContext, Event, EventActions
class ReviewLoop(BaseAgent):
writer: LlmAgent
critic: LlmAgent
max_iterations: int = 3
async def _run_async_impl(self, ctx: InvocationContext):
for i in range(self.max_iterations):
async for event in self.writer.run_async(ctx):
yield event
async for event in self.critic.run_async(ctx):
yield event
verdict = ctx.session.state.get("critique", "")
if "APPROVED" in verdict:
break
Use BaseAgent when your orchestration logic is deterministic, conditional, or involves patterns that workflow agents cannot express (e.g., branching based on parsed critique content).
Q18. Explain SequentialAgent with an example.
SequentialAgent runs its sub_agents in fixed order, one after another. Each agent can read state written by previous agents:
from google.adk import SequentialAgent
pipeline = SequentialAgent(
name="content_pipeline",
sub_agents=[researcher, writer, editor],
)
In this example, researcher writes findings to state, writer reads them to produce a draft, and editor polishes the draft. The sequence is deterministic and always runs in order.
Q19. How does ParallelAgent work?
ParallelAgent runs all its sub_agents concurrently. Each child agent runs independently and writes its output to state. Use it when tasks are independent and you want to minimize latency:
from google.adk import ParallelAgent
data_gatherer = ParallelAgent(
name="parallel_research",
sub_agents=[market_researcher, competitor_analyst, tech_scanner],
)
All three sub-agents run simultaneously. A downstream SequentialAgent can then aggregate their results.
Q20. What is LoopAgent and how do you stop it?
LoopAgent repeats its sub_agents until a stop signal is received or max_iterations is reached. An agent inside the loop stops it by calling tool_context.actions.escalate = True from a tool:
from google.adk import LoopAgent
def approve_draft(draft: str, tool_context) -> dict:
"""Call this when the draft meets quality standards."""
tool_context.actions.escalate = True
tool_context.actions.skip_summarization = True
return {"status": "approved"}
refinement_loop = LoopAgent(
name="refinement",
sub_agents=[writer_agent, critic_agent],
max_iterations=5,
)
Q21. When would you use LoopAgent vs. a custom BaseAgent loop?
Use LoopAgent when the loop body is identical every iteration β the same agents run in the same order, and the only branching is βcontinue or stop.β Use a custom BaseAgent when the next iteration depends on the previous result β for example, if a factual critique triggers a research sub-agent while a stylistic critique skips it. The custom agent can inspect state between iterations and conditionally invoke different sub-agents.
Q22. How do you compose a multi-level agent hierarchy?
Nest workflow agents to create complex pipelines:
root = SequentialAgent(
name="article_pipeline",
sub_agents=[
theme_agent, # LlmAgent: picks a theme
LoopAgent(
name="refinement_loop",
sub_agents=[writer, critic], # iterates until approved
max_iterations=3,
),
ParallelAgent(
name="post_processing",
sub_agents=[seo_optimizer, image_generator], # run concurrently
),
],
)
Q23. What is the Agent Config and why does it matter?
Agent Config is the declarative YAML representation of an agentβs properties β model, instruction, tools, sub_agents, output_key, and callbacks. It allows non-developers to modify agent behavior without touching Python code. In CI/CD pipelines, you can version-control YAML configs and deploy different agent configurations per environment (dev/staging/prod).
Q24. How does instruction templating work?
Agent instructions support state-based templating. Placeholders like {topic} are replaced with the corresponding session state value before the LLM call. Use {key?} for optional placeholders (omitted if the key is absent):
writer = LlmAgent(
name="writer",
instruction="Write a blog post about {topic}. Previous critique: {critique?}",
output_key="draft",
)
When session.state["topic"] = "agentic AI", the instruction becomes: βWrite a blog post about agentic AI. Previous critique: β (empty because critique is not yet in state).
Q25. What is output_key and why is it important?
output_key automatically stores the agentβs final response into session.state under the specified key name. This is the primary mechanism for agents to communicate through shared state β a writer agent with output_key="draft" stores its output so the critic agentβs instruction can reference {draft}.
Q26. How do agents communicate with each other in ADK?
Agents communicate through shared state, not direct calls. Each agent writes to session state (via output_key or tool-based state writes), and downstream agents read those values through instruction templating or tool access. This decoupled design means agents can be rearranged, replaced, or tested independently.
Q27. What is the event loop and how does it drive agent execution?
The ADK event loop is a cycle between the Runner and agent logic: (1) Runner receives a user event, (2) passes it to the root agent, (3) agent processes and may call tools, (4) each action produces an Event that enters the session history, (5) Runner yields output events back to the caller. For workflow agents, the Runner traverses the agent tree, executing each sub-agent according to the workflow pattern (sequential, parallel, or loop).
Q28. Can an ADK agent operate without an LLM?
Yes. A BaseAgent subclass contains pure Python logic β no model call required. Workflow agents (SequentialAgent, ParallelAgent, LoopAgent) are also model-free orchestrators. Only LlmAgent requires a model. This means you can mix deterministic automation steps with LLM-powered reasoning in the same pipeline.
Section 3: Tools System (Q29βQ42)
Q29. What types of tools does ADK support?
ADK supports six tool categories:
- Function tools β any Python function with type annotations and a docstring
- Built-in tools β
google_search,code_execution,vertex_ai_search - MCP tools β connect to any MCP server via
McpToolset(stdio and Streamable HTTP) - OpenAPI tools β auto-generated from an OpenAPI spec
- AgentTool β wraps another agent as a callable tool
- LongRunningFunctionTool β for async operations that pause the session until completion
Q30. How do you create a function tool?
Any Python function becomes a tool. ADK generates the OpenAPI schema from the docstring and type annotations:
def get_weather(city: str) -> dict:
"""Get the current weather for a city.
Args:
city: The name of the city to check weather for.
Returns:
A dictionary with temperature and conditions.
"""
# Implementation here
return {"status": "success", "temperature": 72, "conditions": "sunny"}
agent = LlmAgent(
name="weather_bot",
model="gemini-2.5-flash",
instruction="Help users check the weather.",
tools=[get_weather],
)
The model decides when to call the tool based on its name and docstring β write them clearly.
Q31. What is ToolContext and what can you do with it?
ToolContext (or Context in ADK 2.0) is injected by ADK into any tool function that declares it as a parameter. It provides access to:
tool_context.stateβ read/write session statetool_context.actions.escalateβ signal a LoopAgent to stoptool_context.actions.skip_summarizationβ skip the modelβs summary of tool outputtool_context.actions.transfer_to_agentβ transfer control to another agenttool_context.request_confirmation()β pause for human approval
Q32. How does AgentTool differ from sub_agents delegation?
AgentTool wraps an agent as a tool β the calling agent sends a request, receives a result, and keeps control. With sub_agents delegation (via transfer_to_agent), control transfers to the target agent and does not return to the caller. Use AgentTool when the parent agent needs to process the sub-agentβs result; use delegation when the sub-agent should take over completely.
from google.adk import AgentTool
research_tool = AgentTool(agent=research_agent)
writer = LlmAgent(
name="writer",
instruction="Write an article. Use research_agent for facts when needed.",
tools=[research_tool],
output_key="draft",
)
Q33. How do you connect an MCP server as a tool source?
ADKβs McpToolset connects to any MCP server, exposing its tools to your agent:
from google.adk.tools.mcp import McpToolset
# Stdio-based MCP server
mcp_tools = McpToolset(
command="npx",
args=["-y", "@anthropic/mcp-server-filesystem", "/data"],
)
# Streamable HTTP MCP server
mcp_tools = McpToolset(url="https://mcp.example.com/mcp")
agent = LlmAgent(
name="file_agent",
tools=[mcp_tools],
)
Q34. What are built-in tools and when should you use them?
Built-in tools are pre-packaged capabilities:
google_searchβ grounds responses with live web search results via Google Searchcode_executionβ lets the agent generate and run Python code in a sandboxed environmentvertex_ai_searchβ searches enterprise data indexed in Vertex AI Search
Use them when you need grounding (search), computation (code execution), or enterprise data retrieval without building custom API integrations.
Q35. What is LongRunningFunctionTool?
LongRunningFunctionTool wraps an asynchronous operation that may take minutes or hours β human approvals, external API callbacks, or batch jobs. It pauses the session and resumes when the operation completes. This is the primary mechanism for human-in-the-loop authorization flows in production.
Q36. How does the model decide which tool to call?
The model selects tools based on name and docstring matching. ADK auto-generates an OpenAPI schema from the functionβs type annotations, name, and docstring, then passes it to the model as available functions. Clear, specific docstrings are critical β a vague docstring leads to incorrect tool selection. The instruction βCall this when the draft is good enough to publishβ in a toolβs docstring acts as the governing rule.
Q37. How do you handle tool authentication in ADK?
ADK provides an authentication framework for tools that access external services. For MCP tools, you can configure OAuth flows where each userβs permissions are respected. For custom function tools, you handle authentication in the function body β reading credentials from state, environment variables, or a secrets manager. ADKβs tool authentication docs cover OAuth, API key, and service account patterns.
Q38. What are tool limitations in ADK?
Key limitations to know: (1) the output_schema parameter on an agent blocks tool use and agent transfers on the same agent β use instruction-based parsing instead; (2) tool call frequency depends on the modelβs judgment, which can be inconsistent; (3) complex nested return types may not be perfectly represented in the auto-generated schema; (4) MCP tools add network latency per call.
Q39. How do you test tools in isolation?
Call the function directly in a unit test, passing a mock ToolContext. For integration tests, use adk eval with evalsets that include expected tool trajectories:
# Unit test
def test_get_weather():
result = get_weather("London")
assert result["status"] == "success"
assert "temperature" in result
# Eval-based test (evalset.json)
# Verifies the agent calls get_weather with city="London"
# and produces a response containing the temperature
Q40. Can you use LangChain or CrewAI tools inside ADK?
Yes. ADK provides tool wrappers for LangChain tools, LlamaIndex tools, and CrewAI tools, allowing you to reuse existing tool ecosystems without rewriting them. This is part of ADKβs interoperability design β you are not locked into one frameworkβs tool format.
Q41. How do you create an OpenAPI tool?
Point ADK at an OpenAPI specification, and it auto-generates callable tools for each endpoint:
from google.adk.tools.openapi import OpenAPIToolset
api_tools = OpenAPIToolset(spec_url="https://api.example.com/openapi.json")
agent = LlmAgent(
name="api_agent",
tools=[api_tools],
)
Each endpoint becomes a tool whose parameters match the specβs request schema.
Q42. What is skip_summarization and when should you use it?
When a tool returns a result, ADK normally makes an additional LLM call to summarize the toolβs output for the user. Setting tool_context.actions.skip_summarization = True bypasses this extra call. Use it for tools whose output is already user-friendly (e.g., a formatted response) or tools that only modify state without producing user-visible output (e.g., the escalate tool in a loop).
Section 4: State Management & Sessions (Q43βQ55)
Q43. What are the four state prefixes and their scopes?
Prefix: user: | Scope: Per-user | Lifecycle: Persists across sessions | Use Case: User preferences, profile metadata
Prefix: app: | Scope: App-wide | Lifecycle: Shared across users | Use Case: Global configuration, feature flags
Prefix: (none) | Scope: Session | Lifecycle: Current session only | Use Case: Conversation continuity, task progress
Prefix: temp: | Scope: Invocation | Lifecycle: Single model call | Use Case: Scratch data, intermediate calculations
Q44. How do you read and write session state?
Write directly via assignment; read through instruction templates or tool access:
# Writing state (in a tool or setup code)
session.state["topic"] = "agentic AI"
session.state["user:preferred_language"] = "Python"
session.state["temp:scratch"] = {"step": 1}
# Reading via instruction template
instruction = "Write about {topic} in {user:preferred_language?}"
# Reading in a tool
def my_tool(query: str, tool_context) -> dict:
topic = tool_context.state.get("topic", "general")
return {"result": f"Searching for {topic}: {query}"}
Q45. What is the difference between State and History?
State is a curated key-value store holding only the values needed to drive the workflow β task progress, flags, preferences, and scratch data. History is the complete transcript of all Events (messages, tool calls, agent outputs). State is concise and structured; history is comprehensive and chronological. An interviewer wants to hear that state is βworking memoryβ while history is the βaudit trail.β
Q46. What is a Session in ADK?
A Session is the top-level container for a single conversation. It holds: (1) the session ID, (2) the user ID, (3) the event history (ordered list of Events), and (4) the state (key-value working memory). Sessions are managed by a SessionService β InMemorySessionService for development, database-backed services for production.
Q47. What session backends does ADK support?
ADK supports multiple async session providers:
memory://β in-memory, development onlysqlite://β SQLite for local persistence- PostgreSQL via
asyncpgβ production-grade - Vertex AI Agent Engine β managed sessions with auto-scaling
The session interface is pluggable β swap backends without changing agent code.
Q48. How do you persist state across sessions using the user: prefix?
Values stored with the user: prefix persist across sessions for that user. Set them in a tool or during session initialization:
def save_preference(preference: str, value: str, tool_context) -> dict:
"""Save a user preference that persists across conversations."""
tool_context.state[f"user:{preference}"] = value
return {"status": "saved", "key": preference, "value": value}
The next time this user starts a new session, session.state["user:preference"] is already populated.
Q49. What are Events and why are they important?
Events are the atomic unit of communication in ADK. Every action β user message, agent reply, tool call, tool result, state change β is an Event in the session history. Events enable: (1) replay and debugging (recreate any point in the conversation), (2) observability (trace exactly what happened), (3) evaluation (compare actual trajectories against expected ones).
Q50. How do you emit state changes through Events?
For production workflows needing deterministic state updates with full audit trail, emit state changes explicitly through Events:
from google.adk import Event, EventActions
event = Event(
author="review_loop",
actions=EventActions(state_delta={"iteration": 2, "status": "reviewing"}),
)
yield event
This ensures every state change appears in the event history and can be replayed or audited.
Q51. What is context compression and why does ADK need it?
Long conversations accumulate many events, which can exceed the modelβs context window. ADKβs context compression (also called compaction) shortens the history while preserving essential information. ADK also supports model context caching with Gemini 2.0+ to reduce redundant processing of repeated context.
Q52. How do you manage state isolation between agents?
In ADK, all agents within a session share the same state dictionary. Isolation is achieved through naming conventions: use the agent name as a prefix (e.g., writer:draft, critic:feedback) or use output_key which automatically namespaces the output. For strict isolation, use temp: prefix for data that should not leak between invocations.
Q53. How does session rewind work?
ADK supports session rewind β rolling back the session to a previous event, effectively undoing everything after that point. This is useful for: (1) recovering from bad agent decisions, (2) implementing βundoβ in user-facing applications, (3) branching conversations for A/B testing different agent strategies.
Q54. What is session migration?
Session migration moves a session between backends β for example, from InMemorySessionService during development to PostgreSQL in production, or between regions for latency optimization. ADKβs pluggable session interface makes this possible without changing agent code.
Q55. Best practices for state management in production?
Key best practices:
- Keep state minimal β store only values needed to drive the workflow
- Use prefixes consistently β
user:for persistence,temp:for scratch - Avoid storing sensitive data in long-lived state fields
- Use
output_keyfor agent-to-agent communication instead of manual state writes - Emit state deltas via Events in production for auditability
- Start small and expand β add state keys only when needed
Section 5: Memory & Artifacts (Q56βQ65)
Q56. What is the difference between State and Memory?
State is session-scoped working memory β it lives and dies with the conversation (except user: and app: prefixed keys). Memory is long-term recall that persists across sessions, enabling agents to remember user interactions, decisions, and context from previous conversations. State is a key-value store; memory is a searchable knowledge base.
Q57. How do you store memories in ADK?
Use a callback to archive the current sessionβs state and history into memory at the end of a conversation:
async def archive_run(callback_context):
"""After-agent callback that saves session to memory."""
await callback_context.add_session_to_memory()
return None
agent.after_agent_callback = archive_run
Q58. How do you retrieve memories?
ADK provides a load_memory built-in tool that lets agents search past sessions:
agent = LlmAgent(
name="assistant",
instruction="Help the user. Use load_memory to recall past conversations when relevant.",
tools=[load_memory],
)
The agent can then query memory naturally: βWhat did we discuss about the migration project last week?β
Q59. What memory backends does ADK support?
Two backends:
InMemoryMemoryServiceβ local development, no persistence- Vertex AI Memory Bank β production-grade, managed by Google Cloud, with vector search and semantic retrieval
Q60. What are Artifacts in ADK?
Artifacts are the system for saving, loading, and versioning files and binary data (images, PDFs, generated documents, code files) within a session. They are managed through an ArtifactService and visible in ADK Studioβs Artifacts tab. Use artifacts when your agent generates or processes files that need to be stored alongside the conversation.
Q61. How do Artifacts differ from State?
State holds small key-value pairs for workflow logic. Artifacts hold larger binary or file data β a generated report, an uploaded image, a code file. State is accessed by key; artifacts are versioned files. You would not store a 50KB PDF in state, but you would store it as an artifact.
Q62. When should you use Memory vs. State vs. Artifacts?
Need: Pass data between agents in one session | Use: State (unprefixed) | Example: output_key="draft"
Need: Persist user preferences across sessions | Use: State (user: prefix) | Example: user:timezone = "EST"
Need: Remember past conversations | Use: Memory | Example: load_memory tool
Need: Store generated files | Use: Artifacts | Example: PDF report, generated image
Need: Scratch data for one model call | Use: State (temp: prefix) | Example: temp:search_results
Q63. How does Vertex AI Memory Bank work under the hood?
Vertex AI Memory Bank stores session transcripts as vector embeddings, enabling semantic search across past conversations. When an agent calls load_memory, the query is embedded and matched against stored sessions using vector similarity. This allows retrieval like βfind the conversation where we discussed the database migrationβ without exact keyword matching.
Q64. Can agents share memory across different applications?
Memory is scoped by app_name in the Runner configuration. Two agents in the same app share memory. To share across apps, you would use a shared memory service or implement cross-app memory retrieval through custom tools.
Q65. How do you implement a βforget meβ feature using ADKβs memory?
Implement a tool that deletes user-specific memories from the memory service, or use the user: state prefix to clear persisted preferences. For GDPR compliance, combine both: clear user: state keys and purge memory entries associated with the user ID from the memory backend.
Section 6: Multi-Agent Orchestration (Q66βQ78)
Q66. What are the three orchestration paradigms in ADK 2.0?
- Graph-based β fixed processes defined as nodes and edges in a directed graph (new in 2.0)
- Dynamic β control flow written with native language constructs (if/else, loops) in custom BaseAgent code
- Collaborative β a coordinator agent uses LLM reasoning to delegate to bounded sub-agents
Q67. How does dynamic delegation work?
A coordinator agentβs LLM reads the user request, evaluates sub-agent descriptions, and routes to the best match using transfer_to_agent:
def route_to_specialist(topic: str, tool_context) -> dict:
"""Route to the appropriate specialist agent."""
tool_context.state["topic"] = topic
tool_context.actions.transfer_to_agent = "specialist_agent"
return {"route": "specialist"}
coordinator = LlmAgent(
name="coordinator",
instruction="Analyze the request and route to the right specialist.",
tools=[route_to_specialist],
sub_agents=[billing_agent, tech_support_agent, sales_agent],
)
Control moves to the selected sub-agent and does not return to the coordinator.
Q68. How do you implement human-in-the-loop in ADK?
ADKβs HITL uses a two-phase tool pattern with request_confirmation:
def confirm_action(action: str, tool_context) -> dict:
"""Execute an action after human approval."""
confirmation = tool_context.tool_confirmation
if confirmation is None:
# Phase 1: request human approval
tool_context.request_confirmation(
hint="Please approve this action.",
payload={"action": action, "risk_level": "high"},
)
return {"status": "awaiting_approval"}
# Phase 2: human has responded
if confirmation.payload.get("approved"):
return {"status": "approved", "action": action}
return {"status": "rejected"}
The run pauses after Phase 1. When the human responds, ADK reruns the tool with tool_confirmation populated.
Q69. What is the A2A protocol and how does ADK support it?
The Agent2Agent (A2A) protocol is Googleβs open standard for agent-to-agent communication across different frameworks. ADK provides native A2A support: agents can expose themselves as A2A endpoints with auto-generated Agent Cards, and they can consume A2A agents from other frameworks (LangGraph, CrewAI, etc.). The protocol launched with 50+ partners and is backed by 150+ organizations through the Linux Foundation. ADK supports A2A in Python, Go, Java, and Kotlin.
Q70. What is an Agent Card?
An Agent Card is a machine-readable descriptor that advertises an agentβs capabilities, accepted inputs, outputs, and connection details β think of it as an OpenAPI spec for agents. ADK auto-generates Agent Cards from your agent definitions. Other A2A-compatible frameworks can discover and call your agent using its card.
Q71. How does ADK handle agent-to-agent communication?
Two mechanisms:
- Within an ADK application: agents communicate through shared state and the
transfer_to_agent/AgentToolpatterns - Across frameworks/services: the A2A protocol enables inter-framework communication β an ADK agent can call a LangGraph agent (or vice versa) using standardized A2A endpoints
Q72. Design a customer support system with tiered escalation using ADK.
# Tier 1: FAQ bot
faq_agent = LlmAgent(name="faq_bot", instruction="Answer common questions from the knowledge base.", tools=[kb_search])
# Tier 2: Technical specialist
tech_agent = LlmAgent(name="tech_support", instruction="Handle technical troubleshooting.", tools=[log_analyzer, remote_diag])
# Tier 3: Human escalation
def escalate_to_human(issue: str, tool_context) -> dict:
tool_context.request_confirmation(hint="Human agent needed", payload={"issue": issue})
return {"status": "escalated"}
# Coordinator
coordinator = LlmAgent(
name="support_coordinator",
instruction="Route based on complexity. Simple questions β faq_bot. Technical β tech_support. Unresolvable β escalate.",
tools=[escalate_to_human],
sub_agents=[faq_agent, tech_agent],
)
Q73. How do you build a plan-and-execute pattern in ADK?
Use a SequentialAgent chaining a planner and executor:
planner = LlmAgent(
name="planner",
model="gemini-2.5-pro", # stronger model for planning
instruction="Break the task into numbered steps. Output as JSON array.",
output_key="plan",
)
executor = LlmAgent(
name="executor",
model="gemini-2.5-flash", # faster model for execution
instruction="Execute each step in {plan}. Report results.",
tools=[web_search, code_execution],
output_key="results",
)
pipeline = SequentialAgent(name="plan_execute", sub_agents=[planner, executor])
Q74. What is the reflexion loop pattern?
A LoopAgent wrapping a draft agent and a critic agent. The critic scores each iteration; the loop stops when the score exceeds a threshold or max_iterations is reached:
draft_agent = LlmAgent(name="drafter", instruction="Write a response to {query}. Address: {critique?}", output_key="draft")
critic_agent = LlmAgent(name="critic", instruction="Score the draft 1-10. If score >= 8, call approve_tool. Else provide critique.", tools=[approve_tool], output_key="critique")
reflexion = LoopAgent(name="reflexion", sub_agents=[draft_agent, critic_agent], max_iterations=5)
Q75. How do you implement a supervisor pattern in ADK?
The supervisor is a coordinator LlmAgent with sub_agents. Unlike delegation (which transfers control), the supervisor uses AgentTool to call workers and retain control, making decisions between each workerβs output:
supervisor = LlmAgent(
name="supervisor",
instruction="Coordinate the team. Use research_tool for facts, writer_tool for drafts, reviewer_tool for quality checks.",
tools=[AgentTool(agent=researcher), AgentTool(agent=writer), AgentTool(agent=reviewer)],
)
Q76. How does ADKβs MCP support enable interoperability?
ADKβs McpToolset connects to any MCP-compliant server β this means your ADK agent can use tools from any MCP ecosystem, including filesystem access, database queries, Slack, GitHub, and hundreds of community servers. Combined with A2A for agent-to-agent calls, ADK agents can participate in heterogeneous multi-framework systems.
Q77. What is ambient mode?
Ambient agents respond to external events β Cloud Pub/Sub messages, Eventarc triggers, or scheduled tasks β rather than user conversations. An ambient agent might monitor a data pipeline and autonomously fix errors, or process incoming webhook events. Deploy with adk api_server or the Vertex AI Agent Runtime.
Q78. How do you handle failures in a multi-agent pipeline?
ADK 2.0βs graph workflows support RetryConfig with exception-aware automatic retries. For deterministic pipelines, wrap risky steps in a try/except within a BaseAgent, log the failure as an Event, and either retry, skip, or escalate. For LoopAgent, set max_iterations as a circuit breaker. Always emit state deltas for each failure so the event history captures the full recovery path.
Section 7: Callbacks & Plugins (Q79βQ88)
Q79. What are callbacks in ADK?
Callbacks are custom functions that run at specific points in the agent lifecycle β before or after a model call, before or after a tool call, or before or after an agent runs. Unlike tools (which the model chooses to call), callbacks are always executed at their registered point. They are used for logging, validation, state manipulation, and behavior modification.
Q80. What callback types does ADK support?
before_model_callbackβ runs before the LLM is called; can modify the prompt or short-circuitafter_model_callbackβ runs after the LLM responds; can inspect or modify the responsebefore_tool_callbackβ runs before a tool executes; can block or modify tool inputsafter_tool_callbackβ runs after a tool returns; can modify tool outputbefore_agent_callbackβ runs before an agent starts processingafter_agent_callbackβ runs after an agent completes
Q81. How do you implement a logging callback?
def log_model_response(callback_context, llm_response):
"""After-model callback that logs response metrics."""
text = str(llm_response)
word_count = len(text.split())
callback_context.state["temp:last_word_count"] = word_count
print(f"Model produced {word_count} words")
return None # None = observe only, don't modify
writer.after_model_callback = log_model_response
Returning None means observe only. Returning a value replaces the original response.
Q82. How can a callback modify agent behavior?
A before_model_callback can return a custom response, short-circuiting the LLM call entirely:
def content_filter(callback_context, llm_request):
"""Block requests containing prohibited topics."""
prompt_text = str(llm_request)
if "prohibited_topic" in prompt_text.lower():
return "I cannot help with that topic. Please ask something else."
return None # proceed normally
Q83. What are Plugins and how do they differ from callbacks?
A callback is scoped to a single agent. A Plugin is registered once on the App and sees every agent and model call in the entire application. Plugins subclass BasePlugin and implement hooks like before_run_callback, after_model_callback, and on_event_callback.
from google.adk import BasePlugin, App
class TokenCounter(BasePlugin):
def __init__(self):
super().__init__(name="token_counter")
self.total_tokens = 0
async def after_model_callback(self, *, callback_context, llm_response):
usage = getattr(llm_response, "usage_metadata", None)
if usage:
self.total_tokens += usage.total_token_count
return None
app = App(name="my_app", root_agent=coordinator, plugins=[TokenCounter()])
Q84. How do you register a plugin with an ADK application?
Pass plugins to the App constructor:
app = App(
name="production_app",
root_agent=root_agent,
plugins=[TokenCounter(), LatencyTracker(), AuditLogger()],
)
runner = Runner(app=app, session_service=session_service)
Note: Plugins do not run in adk web β they only execute when running through the application runner.
Q85. When should you use a callback vs. a tool?
Criterion: Who triggers it? | Callback: ADK (always, at lifecycle points) | Tool: The model (by choice)
Criterion: Best for | Callback: Logging, validation, guardrails, metrics | Tool: External actions, data retrieval, computation
Criterion: Can it block execution? | Callback: Yes (by returning a value) | Tool: No (model decides to call or not)
Criterion: Scope | Callback: One agent (callback) or all (plugin) | Tool: Agents that have it in their tools list
Use callbacks for small, mechanical checks or logging, not expensive reasoning β a callback that makes its own LLM call defeats the purpose.
Q86. How do you implement a guardrail using before_tool_callback?
def validate_tool_input(callback_context, tool_name, tool_input):
"""Block dangerous tool calls."""
if tool_name == "execute_sql" and "DROP" in str(tool_input).upper():
return {"error": "Destructive SQL operations are blocked."}
return None # allow the tool call
agent.before_tool_callback = validate_tool_input
Q87. What is on_event_callback in plugins?
on_event_callback fires for every Event in the session β user messages, agent responses, tool calls, state changes. Use it for comprehensive audit logging, real-time monitoring dashboards, or streaming events to an external observability system.
Q88. Can plugins modify agent behavior at runtime?
Yes. A pluginβs after_model_callback can replace the LLM response (e.g., for content filtering across all agents), and before_run_callback can inject state or modify the conversation context before any agent processes it. Use with caution β plugins affect the entire application and are harder to test in isolation.
Section 8: Deployment & Production (Q89βQ100)
Q89. What are the deployment options for ADK agents?
- Vertex AI Agent Runtime (formerly Agent Engine) β managed, auto-scaling, REST endpoint, built-in sessions/memory/tracing. Single command:
adk deploy agent_runtime - Cloud Run β containerized, pay-per-request,
adk deploy cloud_run --with_uifor embedded web UI - GKE β Kubernetes deployment with Helm charts and manifests for full orchestration control
- Self-hosted β run inside any FastAPI (Python), Express (TS), Go, or JVM service
Q90. How do you deploy to Cloud Run?
# Single command deployment
adk deploy cloud_run --project my-project --region us-central1
# With embedded web UI
adk deploy cloud_run --project my-project --region us-central1 --with_ui
ADK builds a container, pushes it to Artifact Registry, and deploys to Cloud Run. The --with_ui flag embeds ADK Studio for debugging in production.
Q91. What is the Vertex AI Agent Runtime?
The Agent Runtime is Googleβs managed environment for ADK agents. It provides: auto-scaling, REST API endpoints, managed sessions and memory, built-in tracing and monitoring, IAM-based access control, and billing per compute/memory. Deploy with adk deploy agent_runtime or through the google-cloud-aiplatform SDK (v1.95.0+).
Q92. How does ADKβs evaluation framework work?
ADK evaluation uses evalsets β JSON files containing test trajectories with expected tool calls and responses:
# Run evaluation from CLI
adk eval my_agent/ evalset.json
# Three scoring axes:
# 1. Tool trajectory match β did the agent call the right tools in the right order?
# 2. Response match β exact match, ROUGE score, or LLM-as-judge
# 3. Custom metrics β your own scoring functions
Evalsets can be saved from ADK Studio conversations or created manually. CI/CD pipelines can gate deployments on evaluation pass/fail.
Q93. How do you implement CI/CD for ADK agents?
A typical pipeline:
- Lint & type-check the agent code
- Run unit tests for individual tools
- Run eval tests with
adk evalβ check tool trajectory and response quality - Build container (if deploying to Cloud Run or GKE)
- Deploy to staging and run integration tests
- Promote to production if all gates pass
Q94. What observability features does ADK provide?
ADK includes:
- Logging β structured logs for agent decisions, tool calls, and errors
- Metrics β latency, token usage, tool call frequency
- Traces β distributed tracing showing the full execution path including sub-agent calls
- Developer UI β visual inspection of events, state, and traces in ADK Studio
For production, integrate with Google Cloud Monitoring, Cloud Logging, and Cloud Trace.
Q95. How do you handle model routing in production?
ADK supports model routing β directing different agents to different models based on cost, latency, and capability needs. A common pattern: use Gemini 2.5 Pro for complex planning/reasoning agents and Gemini 2.5 Flash for high-volume execution agents. Configure in the agent definition or dynamically through state-based model selection.
Q96. What is the Agent Starter Pack?
The Agent Starter Pack is a set of sample agents in the google/adk-samples GitHub repository with one-click deployment templates. It includes patterns for customer support, data analysis, code generation, and multi-agent pipelines β ready to fork and customize for production.
Q97. How do you handle secrets and credentials in deployed agents?
Never store secrets in state or agent code. Use: (1) Google Secret Manager for API keys and passwords, accessed at runtime; (2) IAM service accounts for Google Cloud service authentication; (3) environment variables injected at deployment time (not committed to source control); (4) ADKβs built-in auth framework for OAuth flows.
Q98. What is the cost model for Vertex AI Agent Runtime?
Agent Runtime bills for compute and memory based on the resources allocated to your agent, even when idle. It is a managed runtime with auto-scaling β you pay for the baseline plus additional capacity during traffic spikes. For cost-sensitive workloads, Cloud Runβs pay-per-request model may be more efficient for bursty traffic patterns.
Q99. How do you scale ADK agents for high traffic?
Options by deployment target:
- Agent Runtime: auto-scales automatically, managed by Google Cloud
- Cloud Run: configure min/max instances, concurrency, and CPU/memory per instance
- GKE: use Horizontal Pod Autoscaler (HPA) based on request count, latency, or custom metrics
Key scaling considerations: session state backend must handle concurrent reads/writes, LLM API rate limits become the bottleneck, and tool call latency (especially external APIs) affects throughput.
Q100. What security features does ADK provide for enterprise deployments?
Enterprise security capabilities include: IAM-based access control (who can deploy, invoke, and manage agents), audit logging (via plugins and Cloud Audit Logs), VPC Service Controls for network isolation, Customer-Managed Encryption Keys (CMEK), DLP integration for sensitive data handling, and model safety filters via Geminiβs built-in content safety layers.
Section 9: Scenario-Based & System Design (Q101βQ110)
Q101. Design a document processing pipeline that extracts data from PDFs, validates it, and stores it in BigQuery.
Architecture: A SequentialAgent pipeline with three stages:
extractor = LlmAgent(
name="extractor",
model="gemini-2.5-pro",
instruction="Extract structured data from the uploaded PDF. Output as JSON.",
tools=[code_execution], # for PDF parsing
output_key="extracted_data",
)
validator = LlmAgent(
name="validator",
instruction="Validate {extracted_data} against the schema. Flag errors.",
tools=[schema_validator],
output_key="validation_result",
)
loader = LlmAgent(
name="loader",
instruction="If {validation_result} shows no errors, load {extracted_data} to BigQuery.",
tools=[bigquery_insert],
output_key="load_status",
)
pipeline = SequentialAgent(name="doc_pipeline", sub_agents=[extractor, validator, loader])
Key design decisions: Use artifacts to store the uploaded PDF. Use output_key for inter-agent communication. Add a LoopAgent around extractor+validator for self-correcting extraction. Add HITL approval before the BigQuery load step for high-value documents.
Q102. How would you build a multi-language customer support agent?
Architecture: Coordinator with language detection β specialist delegation:
- Language detector (tool) identifies the userβs language
- Coordinator LlmAgent routes to language-specific sub-agents via
transfer_to_agent - Each sub-agent has instructions and knowledge base in its language
- Common backend tools (CRM lookup, ticket creation) are shared across all agents
- Geminiβs native multilingual capabilities reduce the need for translation layers
Q103. Design a code review agent that reviews pull requests and suggests improvements.
analyzer = LlmAgent(
name="code_analyzer",
model="gemini-2.5-pro",
instruction="Analyze the diff for bugs, security issues, and style violations.",
tools=[github_pr_tool, code_execution],
output_key="analysis",
)
reviewer = LlmAgent(
name="reviewer",
instruction="Based on {analysis}, write constructive PR review comments.",
output_key="review",
)
pipeline = SequentialAgent(name="code_review", sub_agents=[analyzer, reviewer])
Production considerations: Use an MCP server for GitHub integration. Add a HITL step before posting comments. Use evalsets with known-bad code to validate detection accuracy. Deploy as an ambient agent triggered by GitHub webhooks via Cloud Pub/Sub.
Q104. How would you migrate an existing RPA bot to an ADK agent?
A phased approach for migrating from traditional RPA platforms:
- Wrap existing RPA as tools β expose the RPA botβs API as ADK function tools or MCP server. The agent orchestrates; the bot executes.
- Add reasoning layer β the LlmAgent handles exception cases, unstructured inputs, and decision-making the RPA bot cannot.
- Gradually replace β as confidence grows, replace RPA-executed steps with direct tool calls (API calls, database operations).
- Add multi-agent coordination β split the monolithic process into specialized agents for parallel execution and better maintainability.
Q105. Design a real-time monitoring agent that detects anomalies and auto-remediates.
Deploy as an ambient agent triggered by Cloud Pub/Sub or Eventarc:
# Ambient agent triggered by monitoring alerts
monitor = LlmAgent(
name="monitor",
instruction="Analyze the incoming alert. Classify severity. If auto-remediable, execute fix. If not, escalate to human.",
tools=[log_query, metric_query, restart_service, scale_up, escalate_to_human],
)
# Deploy as ambient agent responding to Pub/Sub
# adk deploy agent_runtime --trigger=pubsub --topic=monitoring-alerts
Key patterns: Use RetryConfig for flaky remediation actions. Add a before_tool_callback to block destructive actions during business hours. Log all actions through a plugin for audit compliance.
Q106. How would you build a research assistant that synthesizes information from multiple sources?
searcher = ParallelAgent(
name="multi_search",
sub_agents=[
LlmAgent(name="web_search", tools=[google_search], output_key="web_results"),
LlmAgent(name="doc_search", tools=[vertex_ai_search], output_key="doc_results"),
LlmAgent(name="db_search", tools=[bigquery_query], output_key="db_results"),
],
)
synthesizer = LlmAgent(
name="synthesizer",
instruction="Synthesize findings from {web_results}, {doc_results}, and {db_results} into a coherent report.",
output_key="report",
)
research_pipeline = SequentialAgent(
name="research_assistant",
sub_agents=[searcher, synthesizer],
)
Q107. Compare deploying the same agent on Agent Runtime vs. Cloud Run vs. GKE.
Dimension: Setup effort | Agent Runtime: Lowest (single command) | Cloud Run: Low (container build) | GKE: Highest (K8s manifests)
Dimension: Scaling | Agent Runtime: Automatic | Cloud Run: Auto, configurable | GKE: HPA, full control
Dimension: Cost model | Agent Runtime: Compute + memory (always-on) | Cloud Run: Pay per request | GKE: Cluster + node costs
Dimension: Sessions/Memory | Agent Runtime: Managed | Cloud Run: Self-managed | GKE: Self-managed
Dimension: Customization | Agent Runtime: Limited | Cloud Run: Medium | GKE: Full
Dimension: Best for | Agent Runtime: Quick production, managed ops | Cloud Run: Bursty traffic, cost optimization | GKE: Complex, multi-service architectures
Q108. How would you implement a multi-tenant SaaS product using ADK?
Key architecture decisions:
- Tenant isolation: Use
app:prefix for shared config,user:prefix for tenant-specific state. Each tenant gets its own session namespace. - Model routing: Premium tenants use Gemini 2.5 Pro; free tier uses Flash.
- Rate limiting: Implement via a
before_model_callbackthat checks tenant quotas. - Data isolation: Each tenantβs tools connect to their own data sources via tenant-scoped credentials from Secret Manager.
- Deployment: Single GKE cluster with namespace-per-tenant or Cloud Run with traffic splitting.
Q109. Design a system where ADK agents collaborate with LangGraph agents via A2A.
Cross-framework collaboration using the A2A protocol:
- ADK coordinator β orchestrates the workflow and manages user interaction
- LangGraph specialist β handles complex stateful analysis with checkpointing (exposed as an A2A endpoint)
- ADK workers β handle Google Cloud integrations (BigQuery, Vertex AI Search)
- Each agent publishes an Agent Card describing its capabilities
- The coordinator discovers agents via their cards and invokes them through A2A calls
Q110. You inherit a slow ADK agent pipeline (30s per turn). How do you diagnose and fix it?
Diagnosis checklist:
- Trace analysis β use ADK Studio or Cloud Trace to identify the slowest steps
- Model latency β check if you are using a larger model than needed (Pro vs. Flash)
- Tool latency β external API calls are often the bottleneck; add caching or parallelize
- Unnecessary summarization β every tool call triggers an extra LLM call; add
skip_summarizationwhere appropriate - Context length β long conversations slow down model inference; enable context compression
- Sequential bottlenecks β replace SequentialAgent with ParallelAgent where tasks are independent
Fixes: Switch reasoning-heavy agents to Gemini 2.5 Pro and execution agents to Flash. Cache frequent tool results in state. Use ParallelAgent for independent tasks. Enable context compression for long sessions. Add a TokenCounter plugin to track token usage per turn.
Frequently Asked Questions
Is Google ADK free to use?
Yes. ADK is open-source under the Apache 2.0 license β free to use, modify, and distribute. You pay only for the underlying services: Gemini API calls, Vertex AI compute, Cloud Run hosting, etc. The framework itself has no licensing cost.
What is the minimum Python version for ADK 2.0?
Python 3.10 through 3.13 is supported for ADK 2.x (Python SDK).
Can I use ADK with non-Google models like GPT-4 or Claude?
Yes. ADK supports OpenAI, Anthropic Claude, Cohere, Mistral, AWS Bedrock, Ollama, vLLM, and others through the LiteLLM adapter. The BaseLlm interface also allows custom integrations with any model provider.
How does ADK compare to CrewAI?
CrewAI uses a role-based βcrewβ metaphor with YAML configuration β faster to prototype but less execution control. ADK provides deeper orchestration (graph workflows, custom BaseAgent, callbacks, plugins) and multi-language support. CrewAI is Python-only; ADK covers Python, TS, Go, Java, and Kotlin. ADK has stronger cloud-native integration; CrewAI has a simpler learning curve.
What Google certifications cover ADK?
As of late 2026, ADK is covered in the Google Cloud Professional Machine Learning Engineer and Google Cloud Professional Cloud Architect certifications. Google has also published ADK-specific learning paths on Google Cloud Skills Boost.
Key Takeaways
- ADK 2.0 is production-ready β Python, Go, and TypeScript all hit GA in 2026, with graph-based workflows as the headline feature.
- Five agent types give you the right abstraction: LlmAgent (reasoning), SequentialAgent (pipelines), ParallelAgent (fan-out), LoopAgent (iteration), and BaseAgent (custom orchestration).
- State management uses four prefixes: unprefixed (session),
user:(persistent per-user),app:(global), andtemp:(invocation-scoped). - Tools are the extensibility layer β function tools, MCP servers, OpenAPI specs, AgentTool, and LongRunningFunctionTool cover every integration pattern.
- Multi-agent communication happens through shared state, not direct calls β agents write to state; downstream agents read from it.
- A2A protocol enables cross-framework interoperability with 150+ supporting organizations.
- Deployment flexibility: from Vertex AI Agent Runtime (managed) to Cloud Run (serverless) to GKE (full control) to self-hosted containers.
- Built-in evaluation with evalsets, trajectory matching, and CLI tooling enables CI/CD quality gates before production deployment.
- Callbacks and plugins separate cross-cutting concerns (logging, guardrails, metrics) from agent logic.
- Model-agnostic design means you are not locked into Gemini β LiteLLM adapters support OpenAI, Claude, Cohere, Mistral, Bedrock, and local models.
External References
- Google ADK Official Documentation β Technical overview and API reference
- AIWiki β Google Agent Development Kit β Version history, adoption stats, and feature summary
- AI Practitioner β Google ADK Explained (Part 1) β Architecture deep dive with code examples
- AI Practitioner β ADK Multi-Agent Orchestration (Part 2) β Delegation, callbacks, plugins, HITL patterns
- Atlan β What Is Google ADK? β ADK 2.0 features and MCP integration guide
- DEV Community β Building AI Agents with ADK 2026 Edition β Hands-on ADK 2.x tutorial
- RaftLabs β AI Agent Framework Comparison β LangGraph vs CrewAI vs ADK vs OpenAI SDK
- FutureAGI β What Is Google ADK 2026 β Evaluation framework and deployment patterns
- KodeKloud β ADK State Management β State prefixes and session patterns
- Google Cloud β Build and Deploy ADK Agents on Cloud Run β Official deployment guide




