Skip to content
Agents CLI Evaluation Guide

Agents CLI Evaluation Guide Skill

Google's skill for evaluating agents with agents-cli: write eval cases, pick LLM-judge metrics, run agents-cli eval run, read the scores and iterate on the agent until every case meets the bar.

GitHub Docs

Install

Install with the skills CLI

One command for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf and dozens of other agents. Needs Node.js; the skill is fetched straight from google/agents-cli.

$ npx skills add google/agents-cli --skill google-agents-cli-eval

Run it in a terminal. The CLI finds the agents installed on your machine, asks which ones to add the skill to, and whether to install it into the folder you ran it from or for all your projects.

Other ways to install

Copy the whole skill folder — SKILL.md and any scripts or references beside it — into ~/.claude/skills/google-agents-cli-eval/, where Claude Code picks it up in every project. Only git is needed.

tmp=$(mktemp -d) && \
  git clone --depth 1 --branch main https://github.com/google/agents-cli.git "$tmp" && \
  mkdir -p ~/.claude/skills && \
  cp -R "$tmp"/skills/google-agents-cli-eval ~/.claude/skills/google-agents-cli-eval

No scripts or references next to it? Saving the SKILL.md alone as ~/.claude/skills/google-agents-cli-eval/SKILL.md works too.

Using another agent? Its personal skills folder
Codex
~/.agents/skills/
Cursor
~/.cursor/skills/
GitHub Copilot
~/.copilot/skills/
Gemini CLI
~/.gemini/skills/
Windsurf
~/.codeium/windsurf/skills/
OpenCode
~/.config/opencode/skills/

About

  • Eval-fix loop: write cases, run, read judge rationales, fix, rerun
  • Metric guide: task success, trajectory, tool use, hallucination, safety, rubrics
  • What-to-fix table for each low metric
  • Threshold gating for CI via agents-cli eval run exit codes
  • Held-back cases, simulated users and failure clustering
  • Requires agents-cli; Apache-2.0

Agents CLI Evaluation Guide is the evaluation skill in Google's agents-cli suite. It teaches a coding agent to test an agent built with the Agent Development Kit (ADK) or another framework agents-cli supports by running it over a dataset of cases, grading each trace with metrics and fixing the agent until the scores hold, rather than declaring it done after a demo.

The core is a fixed loop. The agent writes one or two cases for the agent's main task and agrees a pass bar with the user, runs agents-cli eval run, reports every case's score per metric plus the final RESULT: PASS|FAIL line (a passing mean can hide a failing case), reads the judge's rationale for each failure, changes the agent and reruns, comparing each metric and case with the previous results file. Five to ten or more iterations per case is described as normal. The bar is never lowered to make a case pass: a flaky case gets a lower temperature, more judge samples or a rubric metric instead.

A metrics table maps goals to built-ins: multi_turn_task_success, multi_turn_trajectory_quality and multi_turn_tool_use_quality for multi-turn traces, final_response_quality, hallucination or grounding, safety, final_response_match against a golden answer, per-case rubrics, and custom LLM-judge or code metrics. A second table says what to change in the agent when each one is low. Because eval run exits non-zero below a threshold, it can gate CI, and the skill requires a fresh run before every deploy.

It also covers splitting runs into eval generate and eval grade, holding back cases to catch overfitting, simulated-user datasets with eval dataset synthesize, failure clustering with eval analyze, prompt tuning with eval optimize (ADK Python only, run once and only on request) and the managed Eval Service. Bundled references cover dataset schema, metrics, multimodal cases and hill-climbing. Requires agents-cli (uv tool install google-agents-cli). Apache-2.0.

SKILL.md

The instructions your agent loads, as published by Google.

SKILL.md
name
google-agents-cli-eval
description
Evaluates agents with agents-cli: eval cases, LLM-judge metrics, scores and the fix loop. Use when the user wants to evaluate or test the agent's answers, write eval cases, measure hallucination or tool use, compare runs after a change, make it cheaper or faster at the same quality, group failures, or auto-tune its instructions.
metadata
author: Google license: Apache-2.0 version: 1.17.0 requires: bins: - agents-cli install: "uv tool install google-agents-cli"

Agent evaluation

An eval runs the agent over a dataset of cases, grades each trace with metrics, and writes scores. The commands work for every agents-cli framework. agents-cli eval <cmd> --help gives flags and defaults.

Before the first eval run, read the framework's skill for this stage: the skill the project's guidance file (CLAUDE.md, GEMINI.md or AGENTS.md) names. On ADK, call the Skill tool with google-agents-cli-adk-code and read its references/adk-eval.md. No Skill tool: read its SKILL.md directly (../<skill-name>/ for a bundled skill, .agents/skills/<skill-name>/ for an extension's).

References
FileRead when
references/dataset_schema.mdWriting or fixing cases: single-turn, multi-turn, multi-agent, per-case rubrics
references/metrics-guide.mdWriting eval_config.yaml or a custom metric, picking a built-in beyond the table below, or grading outside the global region
references/user-simulation.mdRunning eval dataset synthesize to generate multi-turn cases
references/builtin-tools-eval.mdThe agent uses Google Search, retrieval, URL context or code execution
references/multimodal-eval.mdCases carry images, audio or video, in the input or the output
references/build-eval.mdAsked for an eval suite, or growing past the core cases
references/hillclimb.mdClimbing toward a quality, cost or latency goal over rounds
Find the eval files

A scaffolded project already has a dataset (datasets/basic-dataset.json), an eval_config.yaml and a local judge metric under tests/eval/ (Python) or eval/ (Go, Java, Kotlin and TypeScript; agents-cli info prints the language). Its default cases test the sample agent; replace them when you replace it.

No eval files? Write a dataset (references/dataset_schema.md) and a config (references/metrics-guide.md), then pass them with --dataset and --config.

agents-cli eval doesn't read a framework's own eval file, such as an ADK *.evalset.json (often with a test_config.json). Port its cases into a new dataset as the framework's skill describes (ADK: adk-eval.md) and leave the original untouched.

The loop
  1. Write 1 to 2 cases for the agent's core task. Take the pass bar from the spec's success criteria, or agree one with the user.
  2. Run agents-cli eval run. It runs the agent, grades the traces, prints each metric's mean, any Failures: and a final RESULT: PASS|FAIL (...) line (or RESULT: NOT GATED when no thresholds are set), and writes results_<timestamp>.json and .html to artifacts/grade_results/.
  3. After every run, paste each case's score per metric from the results JSON, and the RESULT: line: a passing mean can hide a failing case.
  4. Start from the Failures: list (metrics below threshold, their cases, errored cases), then read those cases' judge rationales in the results file and fix the agent (What to fix).
  5. Rerun and compare each metric's mean_score and each case's score with the previous results file. Show the target metric rose and no other case regressed. <!-- remove when eval compare reports per-metric deltas with noise -->
  6. Repeat; 5 to 10 or more iterations per case is normal. Add cases only after the core cases pass (references/build-eval.md). To climb toward a goal, follow references/hillclimb.md.

eval run exits 1 when a metric's mean score is below its threshold (thresholds in the config, or --fail-under METRIC=SCORE, repeatable) or a case errored, so CI can gate on the exit code. No thresholds means only errored cases fail: agree them with the user and record them in the config (references/metrics-guide.md). Results JSON: summary_metrics[] holds each metric's mean_score and num_cases_error. Per case, eval_case_results[k].response_candidate_results[0].metric_results.<metric> holds score, explanation and error_message. Pair results with cases by eval_case_results[k].eval_case_index, not by position: evaluation_dataset[0].eval_cases[eval_case_index].eval_case_id names the case.

Check every dataset case is in the results: a case whose inference fails is dropped with a stderr warning. <!-- remove when failed cases count as errors -->

Scores average only the cases that graded: when grading warns that cases errored, find the cause in the results file before trusting the mean. When a score surprises you, run the sanity checks in references/hillclimb.md.

Past about 10 cases, hold back a few in a separate dataset file to catch fixes fitted to the iterated cases, and grade them only when you think you're done (a climb grades them each round).

Keep the bar: when a case fails, change the agent, not the bar or the expected output. For a flaky case, lower the agent's temperature, raise judge_model_sampling_count on a prompt_template judge, or switch to a rubric metric, and keep the case.

The loop is done when every case, held-back ones included, meets the bar on a run after your last edit.

Split eval run into eval generate and eval grade to regrade without rerunning the agent, or to grade traces from eval dataset synthesize. eval generate --url drives a running or deployed agent.

Local eval run and eval generate set USE_IN_MEMORY_SESSION=false, overriding your env, so the agent uses its configured session store. A 403 or a session-store error during a local eval comes from that store; the framework's skill shows how to evaluate on in-memory sessions (ADK: adk-eval.md). <!-- remove when eval generate honors USE_IN_MEMORY_SESSION -->

Before each deploy

Redeploys included, rerun agents-cli eval run after your last code change and paste every case's score, not only the fixed ones, plus the final RESULT: line. Done when every case meets the bar on that run. Then call the Skill tool with google-agents-cli-deploy for the deploy approval gate.

Choose metrics

Only the three multi_turn_* metrics below accept multi-turn traces; every other built-in returns a 400 on one. agents-cli eval metric list prints the built-ins.

GoalMetric
Did the agent achieve the user's goal (recommended first built-in)multi_turn_task_success
Was the path logical and efficientmulti_turn_trajectory_quality
Were tool calls rightmulti_turn_tool_use_quality
Final response quality, no reference needed (single-turn)final_response_quality
Claims grounded in tool outputhallucination, or grounding when the case has context
Policy compliancesafety
Match a golden answerfinal_response_match (needs reference on the case)
Different criteria per caserubric_groups on the case, graded by a managed rubric metric (single-turn) or a local judge (multi-turn; references/metrics-guide.md)
A check no built-in coversA custom LLM-judge or code metric (references/metrics-guide.md)

Grade tool use with these rubric metrics, not a fixed call sequence, which fails when agents reorder calls or add steps.

What to fix
FailureChange
multi_turn_task_success lowOrchestration: missing tool calls, early stops, wrong tool choice
multi_turn_trajectory_quality lowPlanning prompts, instruction order, redundant tool calls
multi_turn_tool_use_quality lowTool descriptions, parameter docs, tool-selection instructions
final_response_quality lowThe instruction behind the worst-scoring rubric verdict
hallucination lowInstructions to stay grounded in tool output; check the tool returned what the agent claimed
Agent skips toolsFix the tool descriptions and the instruction; to force one call, see the framework's skill (ADK: adk-eval.md)
Judge ignores images or audioA custom metric with a vision-capable judge (references/multimodal-eval.md)
User simulation

agents-cli eval dataset synthesize plays generated scenarios against a simulated user and writes multi-turn traces for eval grade (references/user-simulation.md). It and eval optimize run only on ADK Python projects and fail with an unsupported-language error on other languages; there, write multi-turn cases and tune prompts by hand.

Opt-in commands
  • agents-cli eval analyze clusters failure modes when many cases fail.
  • agents-cli eval optimize tunes the agent's prompt against a metric. It is long-running and expensive: run it only when the user asks, once, after fixing by hand, and apply the prompt it prints.
  • agents-cli eval submit and agents-cli eval results run on the managed Eval Service, for CI or large datasets.
Install

A protocol for measuring whether agents can discover and use your tool without being told about it — WITH/WITHOUT trials, binary scoring, and lift as the only metric. The subject under test is your docs, not the model.

Microsoft's official skill for building, deploying, evaluating, fine-tuning and operating agents and models on Microsoft Foundry with azd and the Foundry MCP tools, from project setup and RBAC to quota, tracing and CI/CD.

Browse all skills →