Skip to main content

Build

Google Agents CLI Eval

Google Agents CLIOfficialCertified

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.

  • New
  • v1.0.11
  • No reviews yet

Capabilities

  • Find the eval files

    A scaffolded project already has a dataset…

  • The loop

    Check every dataset case is in the results: a case whose inference…

  • Before each deploy

    Redeploys included, rerun agents-cli eval run after your last code…

  • Choose metrics

    Only the three multi_turn_* metrics below accept multi-turn traces…

Getting started

Full instructions

Install the skill, then ask your AI tool for the task in plain words. The full SKILL.md below shows what it covers.

Instructions: SKILL.mdv1.0.11

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

File Read when
references/dataset_schema.md Writing or fixing cases: single-turn, multi-turn, multi-agent, per-case rubrics
references/metrics-guide.md Writing eval_config.yaml or a custom metric, picking a built-in beyond the table below, or grading outside the global region
references/user-simulation.md Running eval dataset synthesize to generate multi-turn cases
references/builtin-tools-eval.md The agent uses Google Search, retrieval, URL context or code execution
references/multimodal-eval.md Cases carry images, audio or video, in the input or the output
references/build-eval.md Asked for an eval suite, or growing past the core cases
references/hillclimb.md Climbing 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.
  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.

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).

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.

Goal Metric
Did the agent achieve the user's goal (recommended first built-in) multi_turn_task_success
Was the path logical and efficient multi_turn_trajectory_quality
Were tool calls right multi_turn_tool_use_quality
Final response quality, no reference needed (single-turn) final_response_quality
Claims grounded in tool output hallucination, or grounding when the case has context
Policy compliance safety
Match a golden answer final_response_match (needs reference on the case)
Different criteria per case rubric_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 covers A 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

Failure Change
multi_turn_task_success low Orchestration: missing tool calls, early stops, wrong tool choice
multi_turn_trajectory_quality low Planning prompts, instruction order, redundant tool calls
multi_turn_tool_use_quality low Tool descriptions, parameter docs, tool-selection instructions
final_response_quality low The instruction behind the worst-scoring rubric verdict
hallucination low Instructions to stay grounded in tool output; check the tool returned what the agent claimed
Agent skips tools Fix the tool descriptions and the instruction; to force one call, see the framework's skill (ADK: adk-eval.md)
Judge ignores images or audio A 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.

Explore more skills

Browse all
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

More from Google Agents CLI

View source →
google-agents-cli-publishRegisters deployed agents in Gemini Enterprise and Agent Registry. Use when the user wants to publish the agent to Gemini Enterprise (the Console's Gemini app), register it over A2A from its agent card, or list, update or remove agents and…0 installsgoogle-agents-cli-adk-codeWrites and fixes ADK agent code in Python, Go, Java, Kotlin and TypeScript: tools, callbacks, state, sub-agents, graph workflows, MCP, Live voice and the ADK recipe catalog. Use when the project uses ADK or the user names it, and they want…0 installsgoogle-agents-cli-deployDeploys agents with agents-cli to Agent Runtime, Cloud Run or GKE. Use when the user wants to deploy or go to production, add a deployment target or CI/CD, set up Terraform, secrets or IAM, test or roll back a deployed agent, put it behind…0 installsgoogle-agents-cli-observabilityTraces and monitors agents, ADK or any OpenTelemetry app, locally or on Google Cloud. Use when the user wants traces or logs, token and cost tracking, alerts or dashboards, to store conversation transcripts or set their retention, to debug…0 installsgoogle-agents-cli-scaffoldCreates, enhances and upgrades agents-cli projects from a framework template. Use when the user wants to scaffold the project for an agent they designed, bring an existing agent under agents-cli, or upgrade a project to the latest…0 installsgoogle-agents-cli-workflowPlans and builds new agents with agents-cli, in ADK or a framework with an agents-cli extension. Use when the user wants to build a new agent, even with no framework named; add memory, document search, OAuth, human approval, moderation or…0 installs

Frequently asked questions about google-agents-cli-eval

What does the google-agents-cli-eval skill do?

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. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the google-agents-cli-eval skill?

Run `npx @skills-hub-ai/cli install google-agents-cli-eval` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/google-agents-cli-eval/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does google-agents-cli-eval work with?

google-agents-cli-eval runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the google-agents-cli-eval skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use google-agents-cli-eval after installing it?

In Claude Code, type `/google-agents-cli-eval` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the google-agents-cli-eval skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/google-agents-cli-eval)](https://skills-hub.ai/skills/google-agents-cli-eval)
HTML
<a href="https://skills-hub.ai/skills/google-agents-cli-eval"><img src="https://skills-hub.ai/api/badges/skill/google-agents-cli-eval" alt="Install on Skills Hub"></a>

More options in the badge docs.