Google released Agent Development Kit (ADK) for Python 2.16.0 on 3 December 2026. The release notes list several new features. The two you can use straight away are skills built from Markdown text and an experimental GroundingPlugin that checks an agent’s final answers against facts you supply. The release also adds a grid-search optimizer for agent settings, allows google-genai 3.x, and contains one breaking change in workflow retries.
This guide shows how to use the new pieces with working code. We ran every snippet below against google-adk==2.16.0 to confirm the imports and constructors. The model calls themselves need your own Gemini or Vertex AI credentials.
Install or upgrade
pip install --upgrade "google-adk==2.16.0"
# The default grounding backend needs the Google Cloud extras:
pip install "google-adk[gcp]==2.16.0"
ADK 2.16 now accepts google-genai 3.x (below 4), so you no longer have to pin the older SDK if other code in your project has moved on.
1. Build a skill from Markdown text
ADK already loads Agent Skills from a folder that contains a SKILL.md file. Version 2.16 adds load_skill_from_markdown(), which builds the same Skill object from a string. That’s handy when skills live in a database, a CMS or a config service, not on disk.
The text needs YAML frontmatter with name and description, followed by the instructions:
from google.adk.agents import LlmAgent
from google.adk.skills import load_skill_from_markdown
from google.adk.tools.skill_toolset import SkillToolset
SKILL_MD = """---
name: refund-policy
description: Answer questions about our refund policy. Use when a customer asks about refunds or returns.
---
# Refund policy skill
1. Ask for the order number if it is missing.
2. Quote the refund window exactly as written in the policy.
3. Never promise a refund for digital downloads.
"""
skill = load_skill_from_markdown(SKILL_MD)
print(skill.frontmatter.name) # refund-policy
agent = LlmAgent(
name="support_agent",
model="gemini-2.5-flash",
instruction="You are a helpful support agent.",
tools=[SkillToolset(skills=[skill])],
)
A few things to know:
- Unlike
load_skill_from_dir(), there’s no directory name to compare with, so the name check is skipped. - Missing or malformed frontmatter raises a
ValueError. Wrap the call if the text comes from users or an external system. - You can pass references, assets and scripts with the optional
resources=argument (agoogle.adk.skills.Resourcesobject).
2. Check answers against facts with GroundingPlugin
GroundingPlugin runs after the model produces a final text answer. It sends the answer and the facts in scope to a grounding backend, then attaches the returned citations to the response as grounding_metadata. It skips partial streamed chunks, tool calls and “thought” parts. The feature is marked experimental, so expect the API to change.
By default the plugin creates a CheckGroundingClient for the Discovery Engine CheckGrounding API, using the GOOGLE_CLOUD_PROJECT environment variable. You can also pass any object that has a limits property, an async check_grounding_async() method and an async close() method. That makes it easy to test without the cloud:
from google.adk.apps import App
from google.adk.integrations.discovery_engine import (
Fact, GroundingLimits, GroundingPlugin, GroundingResult, GroundingStatus,
)
class EchoGroundingClient:
"""Stand-in backend for local tests (no Google Cloud needed)."""
@property
def limits(self) -> GroundingLimits:
return GroundingLimits(max_facts=50, max_fact_chars=2_000)
async def check_grounding_async(self, *, answer_candidate, facts):
return GroundingResult(
status=GroundingStatus.OK, num_facts_evaluated=len(facts)
)
async def close(self):
pass
def on_result(*, callback_context, llm_response, grounding_result):
print("grounding:", grounding_result.status, grounding_result.num_facts_evaluated)
return None # keep the model's response
grounding = GroundingPlugin(
client=EchoGroundingClient(), # omit to use CheckGroundingClient
facts=[
Fact(
text="Physical items can be returned within 30 days of delivery.",
title="Refund policy",
link="https://example.com/refunds",
)
],
on_result=on_result,
agent_names={"support_agent"},
)
app = App(name="support_app", root_agent=agent, plugins=[grounding])
How facts are scoped
There are three places facts can come from, and the plugin checks them in this order:
- Turn facts: registered for one invocation and dropped when the run ends.
- Session facts: kept in that session’s state.
- Constructor facts: the
facts=list, shared by every user and session.
Only put knowledge that’s safe for everyone in the constructor. For per-user data, register facts from a tool or callback:
from google.adk.integrations.discovery_engine import Fact, FactScope
from google.adk.tools import ToolContext
def look_up_order(order_id: str, tool_context: ToolContext) -> dict:
order = {"id": order_id, "delivered": "2026-11-20", "type": "physical"}
grounding.register_fact(
Fact(text=f"Order {order_id} was delivered on {order['delivered']}."),
context=tool_context,
scope=FactScope.TURN,
)
return order
Long fact text is split into chunks that fit the backend’s max_fact_chars. If the constructor facts need more chunks than max_facts, the plugin raises ValueError. For registered facts, the oldest ones in a scope are dropped instead. A failed check never fails the turn. Your on_result hook still receives the result, so you can log it or swap in a safer reply by returning a new LlmResponse.
The new agent_names filter limits checks to the agents you name. Without it, every agent is checked, including sub-agents and agents wrapped in AgentTool.
3. Grid search over agent settings (preview)
The release also adds GridSearchAgentOptimizer, which tries every combination in a parameter grid, scores each candidate on the same eval examples and returns the Pareto front across quality, total tokens and latency. Parameter paths can point at agent fields such as model or instruction, at generate_content_config.temperature, or at children through sub_agents.<Name>. and tools.<Name>. prefixes.
In 2.16.0 the class lives in a private module (google.adk.optimization._grid_search_agent_optimizer) and needs a sampler, such as the existing LocalEvalSampler, plus an eval set. Treat it as a preview. The config accepts options like min_quality_score, max_latency_sec and max_total_tokens to rule out candidates that are too slow or too expensive.
Breaking and behaviour changes to check
- Workflow retries: assigning
retry_configon aWorkflowafter construction now raisespydantic.ValidationError. Pass it to the constructor instead, for exampleWorkflow(..., retry_config=...). A child’s ownretry_confignow replaces the workflow’s policy for that child instead of falling back to a whole-workflow retry. - A2A task store: the default in-memory store used by
to_a2aandget_fast_api_app(a2a=True)now drops finished tasks after one hour, keeps at most 10,000, and scopes authenticated tasks to their creator. Pass your owntask_storeortask_store_uriif you need longer retention. - Remote sandboxes:
read_file,read_file_streamandwrite_fileon the Daytona, E2B, OpenSandbox and Agent Engine environments now raiseValueErrorfor paths that escape the workspace with... - Live runs: in-place edits that a
before_model_callbackmakes to the request config and tools are discarded. Configure those on the agent.
Other additions include GeminiDecisionsClassifier for routing through the Gemini Decisions API, stable EventarcToolset, and Azure metadata support in FsspecArtifactService.
Takeaway
ADK 2.16 is a solid upgrade for teams running agents in production. Loading skills from text makes it easier to manage skills centrally. GroundingPlugin gives you a structured way to see whether answers are backed by your own facts, and you can unit-test it with a fake client before paying for API calls. Before upgrading, search your code for retry_config assignments and check whether you depend on long-lived A2A tasks. Full details are in the ADK 2.16.0 release notes and the ADK documentation.
