adk-go-workflows
Requires `google.golang.org/adk/v2 >= v2.0.0`, which is where the `workflow` package and `agent/workflowagent` first ship.
**ADK naming.** Tool classes and code snippets below are ADK's. The behavior generalizes: in any framework, Gemini's built-in grounding, retrieval, and code-execution tools run inside the model and never surface as function calls in a trace.
$ npx -y skills add google/agents-cli --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
**ADK naming.** Tool classes and code snippets below are ADK's. The behavior generalizes: in any framework, Gemini's built-in grounding, retrieval, and code-execution tools run inside the model and never surface as function calls in a trace.
> **ADK naming.** Tool classes and code snippets below are ADK's. The behavior generalizes: in any framework, Gemini's built-in grounding, retrieval, and code-execution tools run inside the model and never surface as function calls in a trace.
`google_search` is NOT a regular tool — it's a **model-internal grounding feature**.
**Key behavior:**
**How google_search works internally:**
llm_request.config.tools.append(
types.Tool(google_search=types.GoogleSearch()) # Injected into model config
)Search results come back as `grounding_metadata`, not function call/response events. But the evaluator STILL detects it at the session level:
{
"error_code": "UNEXPECTED_TOOL_CALL",
"error_message": "Unexpected tool call: google_search"
}This causes `multi_turn_tool_use_quality` to fail for agents whose **only** tool is `google_search` — the evaluator flags an unexpected tool call it can never see in the trace. For agents that also call function tools, the metric still scores those function-tool calls (see metric compatibility below).
**Metric compatibility for `google_search` agents:**
| Metric | Usable? | Why | |--------|---------|-----| | `multi_turn_tool_use_quality` | NO | Always fails due to unexpected google_search (the `google_search` invocation is detected by the evaluator but never appears as a `function_call` / `function_response` event) | | `final_response_quality` | YES | Adaptive rubric-based evaluation; works without a reference answer | | `final_response_match` | NO | Search results vary across runs, so the agent's response rarely matches a fixed reference |
**Dataset best practices for `google_search` agents:**
{
"eval_cases": [
{
"eval_case_id": "news_digest_test",
"prompt": {
"role": "user",
"parts": [{"text": "Give me my news digest."}]
}
// NO trajectory criteria for google_search - it won't appear in the trace anyway
}
]
}For agents that mix `google_search` with custom function tools, grade the custom tool usage with `multi_turn_tool_use_quality` — it judges the tool calls in the generated trace, so you don't hand-author expected calls. Optionally add a `reference` response for reference-based matching:
{
"eval_case_id": "news_digest_feedback",
"prompt": {
"role": "user",
"parts": [{"text": "Great, save my positive feedback."}]
},
"reference": {
"response": {
"role": "model",
"parts": [{"text": "Feedback saved!"}]
}
}
}The `google_search` invocation still won't appear in the trace, so `multi_turn_tool_use_quality` only assesses the function-tool calls (e.g., `save_feedback`).
**Config for `google_search` agents (`eval_config.yaml`):**
metrics_to_run: - final_response_quality
The built-in `final_response_quality` is sufficient for most `google_search` agents; it auto-generates a content-based rubric. Define a custom override in `custom_metrics` only if you need project-specific judge instructions — see SKILL.md's *Evaluation Configuration Schema* for the override pattern.
**Bottom line:** `google_search` is a model feature, not a function tool. You cannot test it with trajectory matching. Use `final_response_quality` to verify the agent produces grounded, cited responses.
---
**Model-Internal Tools (DON'T appear in trajectory):**
| Tool | In Trajectory? | Eval Strategy | |------|----------------|---------------| | `google_search` | No | Rubric-based | | `google_search_retrieval` | No | Rubric-based | | `BuiltInCodeExecutor` | No | Check output | | `VertexAiSearchTool` | No | Rubric-based | | `url_context` | No | Rubric-based |
These inject into `llm_request.config.tools` as model capabilities:
types.Tool(google_search=types.GoogleSearch()) types.Tool(code_execution=types.ToolCodeExecution()) types.Tool(retrieval=types.Retrieval(...))
**Function-Based Tools (DO appear in trajectory):**
| Tool | In Trajectory? | Eval Strategy | |------|----------------|---------------| | `load_web_page` | Yes | `multi_turn_tool_use_quality` works | | Custom tools | Yes | `multi_turn_tool_use_quality` works | | AgentTool | Yes | `multi_turn_tool_use_quality` works |
These generate `function_call` and `function_response` events:
types.Tool(function_declarations=[...])
**Quick Reference — Can I use `multi_turn_tool_use_quality`?**
**When mixing both types** (e.g., `google_search` + `save_preferences`): 1. Rely on `final_response_quality` for overall quality, OR 2. Keep `multi_turn_tool_use_quality` — it assesses the function-tool calls that do appear in the trace, accepting that the `google_search` step is invisible to it
**Rule of Thumb:**
Models with "thinking" enabled may decide they have sufficient information and skip tool calls. Force tool usage through the model's tool-choice config (**ADK:** `tool_config` with `mode="ANY"`), or switch to a non-thinking model for predictable tool calling.
When your agent calls external APIs, add mock mode so evals can run without real credentials:
def call_external_api(query: str) -> dict:
api_key = os.environ.getThe CLI and skills that turn any coding assistant into an expert at creating, evaluating, and deploying AI agents on Google Cloud.
Repo: google/agents-cli
Requires `google.golang.org/adk/v2 >= v2.0.0`, which is where the `workflow` package and `agent/workflowagent` first ship.
Reflects `google.golang.org/adk/v2 v2.1.0`, the version the `adk_go` template pins. If a symbol here is missing, check your `go.mod` before assuming the page…
Requires `google-adk >= 2.0.0`. This page documents the Python graph API; ADK Go has its own — see `references/adk-go-workflows.md`. Requires **Python >=…
* **`Agent`**: The core intelligent unit. Can be `LlmAgent` (LLM-driven) or `BaseAgent` (custom/workflow). * **`Tool`**: Callable function providing external…
Recipes live in [google/adk-samples](https://github.com/google/adk-samples). **`core/python/`** is the curated tier — canonical ADK patterns maintained by the…
**Assumes `/google-agents-cli-scaffold` scaffolding.** If your project isn't scaffolded yet, see `/google-agents-cli-scaffold` first.