skill

Google Agents Cli Eval

google357,721+ تثبيتموثوق

نبذة

# Agent Evaluation Guide

> **Requires:** `agents-cli` (`uv tool install google-agents-cli`) — [install uv](https://docs.astral.sh/uv/getting-started/installation/index.md) first if needed.

> **Scaffolded project?** If you used `/google-agents-cli-scaffold`, dataset and a custom metric are already scaffolded in `tests/eval/` (Python projects) or `eval/` (Go projects). For simplicity, this skill and its references use the Python directory layout; adjust accordingly if you've scaffolded a Go agent. > You already have `agents-cli eval run` (chains `generate` + `grade`), `tests/eval/datasets/`, and `tests/eval/eval_config.yaml`. Start with executing `eval run` and iterate from there.

## Reference Files

| File | Contents | |------|----------| | `references/dataset_schema.md` | Canonical EvaluationDataset schema — all field types, JSON examples for single-turn / multi-turn / multi-agent, common mistakes | | `references/metrics-guide.md` | Complete metrics reference — all built-in metrics, match types, custom metrics, judge model config | | `references/user-simulation.md` | Dynamic conversation testing — `eval dataset synthesize` flags, what scenarios are, compatible metrics | | `references/builtin-tools-eval.md` | google_search and model-internal tools — trajectory behavior, metric compatibility | | `references/advanced-commands.md` | Opt-in commands: `eval analyze`, `eval optimize`, `eval submit` / `eval results` | | `references/multimodal-eval.md` | Multimodal inputs — eval dataset schema, built-in metric limitations, custom evaluator pattern | | `references/live-eval.md` | Live and voice agents — `--mode adk_live`, what gets graded, user-only turn authoring, the Live-model and region traps |

---

## The Quality Flywheel

Improving agent quality is iterative. The 4 stages below describe the loop. Each stage has a Default path (you, the coding agent, do the work directly) and an Opt-in CLI command that delegates to the Agent Platform Eval Service for better quality and scale.

### 1. Prepare Data

**Default:** Use or edit the scaffolded `tests/eval/datasets/basic-dataset.json` to define single-turn eval inputs. Start with 1–2 cases.

**Opt-in (ADK projects):** `agents-cli eval dataset synthesize`: user-simulate multi-turn datasets when you lack data; its output already includes traces, so Stage 2 collapses to `agents-cli eval grade` alone. See *Eval Commands* and `references/user-simulation.md`.

### 2. Run the Eval (always run)

**Default:** `agents-cli eval run` runs the agent over the dataset and grades the traces, writing `results_<ts>.{json,html}` to `artifacts/grade_results/`.

**Decoupled form:** `eval generate` then `eval grade`, for a custom traces location, re-grading without re-running the agent, or traces from `synthesize` (`eval grade` alone).

### 3. Analyze Failures

**Default:** Open the latest `artifacts/grade_results/results_<ts>.html` (or `.json`) and identify failed metrics — see *What to fix when scores fail* below for the fix table.

**Opt-in:** `agents-cli eval analyze`, LLM-based failure clustering; prefer when you have 10+ failing cases and want categorized failure modes. See `references/advanced-commands.md`.

### 4. Optimize & Code Fix

**Default:** Edit the agent — adjust prompts, tool descriptions, instructions, or eval dataset based on the failure analysis. See *What to fix when scores fail* below for the failure → fix mapping.

**Opt-in (ADK projects):** `agents-cli eval optimize` runs ADK GEPA prompt optimization against a target metric (see `references/advanced-commands.md`). Suitable for prompt-only failures. The optimized prompt appears in the command output; capture it and apply it to the agent. For the full per-iteration trace, set `print_detailed_results: true` in your optimization config file.

> **Long-running and expensive.** GEPA optimization makes many LLM calls and can take a long time. Do not run it unless the user explicitly asks for prompt optimization. When you do run it, iterate as far as possible with manual fixes first, then run a **single** final `eval optimize` — never loop on this command.

### Running the loop

Iterate stages 2 → 3 → 4 → 2 (with `synthesize`, re-run Stage 1 each pass, then `eval grade`). After each fix, run `agents-cli eval compare <prev_results>.json <new_results>.json` to confirm the target metric improved without regressing others. Expect 5–10+ iterations per case before it passes, which is normal. Only after a case passes should you expand coverage with more eval cases.

When doing 5+ iterations, maintain a task list of which cases are fixed, which are still failing, and what fixes you've tried. Prevents re-attempting the same fix.

**Hold cases back.** Keep a slice of cases out of the loop and grade them only when you think you're done — otherwise you can't tell a fix that generalizes from one fitted to the cases you iterated against.

### Shortcuts That Waste Time

Recognize these rationalizations and push back — they always cost

التثبيت

شغل هذا الأمر

npx skills add google/agents-cli

يعمل مع

claude appclaude codeclaude apicursorcodexwindsurfclinezed

خطوات التثبيت

Install with `npx skills add google/agents-cli`, or clone the repository and copy the `skills/google-agents-cli-eval` folder into your Claude skills directory.

عرض المصدر

أصول ذات صلة

مختارات أخرى في التطوير والبرمجة.

mcp serverclaude_codecursorcodex
npm install @modelcontextprotocol/server-fetch
خادم جلب الويب (Fetch)
خادم لجلب محتوى الويب وتحويله لاستخدام فعال مع نماذج اللغة. يجلب الروابط ويحولها إلى ماركداون نظيف.★ 4.9 · 5,000+
mcp serverclaude_codecursorcodex
npm install @modelcontextprotocol/server-memory
خادم الذاكرة (Memory)
نظام ذاكرة دائمة قائم على رسم بياني معرفي. يتيح للوكلاء تذكر المعلومات عبر المحادثات.★ 4.9 · 5,000+
mcp serverclaude_codecursorcodex
npm install @modelcontextprotocol/server-filesystem
خادم نظام الملفات (Filesystem)
عمليات ملفات آمنة مع ضوابط وصول قابلة للضبط. قراءة الملفات المحلية وكتابتها وسردها والبحث فيها.★ 4.9 · 5,000+
mcp serverclaude_codecursorcodex
npm install @modelcontextprotocol/server-git
خادم Git
أدوات لقراءة مستودعات Git والبحث فيها والتحكم بها — السجل والفروقات وتتبع المؤلفين والفروع والمزيد.★ 4.9 · 5,000+
mcp serverclaude_codecursorcodex
npm install @modelcontextprotocol/server-everything
خادم الاختبار الشامل (Everything)
خادم مرجعي للاختبار يجرب كل ميزات بروتوكول MCP — الأوامر والموارد والأدوات.★ 4.9 · 5,000+
mcp serverclaude_codecursorcodex
npm install @modelcontextprotocol/server-sequentialthinking
خادم التفكير المتسلسل (Sequential Thinking)
حل ديناميكي للمشكلات عبر تسلسلات تفكير منظمة مع التفرع والمراجعة والتأمل.★ 4.9 · 5,000+

افحص قبل التثبيت

شغل أي مصدر عبر فحوصاتنا - الظهور في الذكاء الاصطناعي والأمان والأداء واكتشاف التقنيات.

المزيد في التطوير والبرمجة