Skip to content

Commit 86d7e3a

Browse files
committed
release v0.3.0 at 2026-06-01 17:25:31 UTC
1 parent 787df51 commit 86d7e3a

33 files changed

Lines changed: 1403 additions & 778 deletions

File tree

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "google-agents-cli",
3-
"version": "0.2.1",
3+
"version": "0.3.0",
44
"description": "Scaffold, develop, evaluate, and deploy AI agents with Google ADK. Bundles 7 skills for the agent development lifecycle.",
55
"author": { "name": "Google LLC" },
66
"homepage": "https://github.com/google/agents-cli",

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ See the [full tutorial](https://google.github.io/agents-cli/guide/quickstart-tut
6464
| `google-agents-cli-workflow` | Development lifecycle, code preservation rules, model selection |
6565
| `google-agents-cli-adk-code` | ADK Python API — agents, tools, orchestration, callbacks, state |
6666
| `google-agents-cli-scaffold` | Project scaffolding — `create`, `enhance`, `upgrade` |
67-
| `google-agents-cli-eval` | Evaluation methodology — metrics, evalsets, LLM-as-judge, trajectory scoring |
67+
| `google-agents-cli-eval` | Evaluation methodology — metrics, datasets, LLM-as-judge, adaptive rubrics |
6868
| `google-agents-cli-deploy` | Deployment — [Agent Runtime](https://docs.cloud.google.com/gemini-enterprise-agent-platform/scale), [Cloud Run](https://cloud.google.com/run), [GKE](https://cloud.google.com/kubernetes-engine), CI/CD, secrets |
6969
| `google-agents-cli-publish` | Gemini Enterprise registration |
7070
| `google-agents-cli-observability` | Observability — Cloud Trace, logging, third-party integrations |
@@ -77,7 +77,8 @@ See the [full tutorial](https://google.github.io/agents-cli/guide/quickstart-tut
7777
|---------|-------------|
7878
| `agents-cli setup` | Install CLI + skills to coding agents |
7979
| `agents-cli scaffold <name>` | Create a new agent project |
80-
| `agents-cli eval run` | Run agent evaluations |
80+
| `agents-cli eval generate` | Run agent on eval dataset, produce traces |
81+
| `agents-cli eval grade` | Run agent evaluations on the traces |
8182
| `agents-cli deploy` | Deploy to Google Cloud |
8283
| `agents-cli publish gemini-enterprise` | Register with Gemini Enterprise |
8384

@@ -97,8 +98,13 @@ See the [full tutorial](https://google.github.io/agents-cli/guide/quickstart-tut
9798
| `agents-cli install` | Install project dependencies |
9899
| `agents-cli lint` | Run code quality checks (Ruff) |
99100
| **Evaluate** | |
100-
| `agents-cli eval run` | Run agent evaluations |
101+
| `agents-cli eval generate` | Run agent inference over eval cases |
102+
| `agents-cli eval grade` | Grade generated traces against metrics |
103+
| `agents-cli eval dataset synthesize` | Synthesize multi-turn eval scenarios for your local agent |
101104
| `agents-cli eval compare` | Compare two eval result files |
105+
| `agents-cli eval analyze` | Cluster failure modes from grade results |
106+
| `agents-cli eval metric list` | List available metrics |
107+
| `agents-cli eval optimize` | Auto-tune agent prompts using eval data |
102108
| **Deploy & Publish** | |
103109
| `agents-cli deploy` | Deploy to Google Cloud |
104110
| `agents-cli publish gemini-enterprise` | Register with Gemini Enterprise |

RELEASE_NOTES.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.3.0] - 2026-05-29
6+
### Breaking
7+
- The eval data format changed from ADK `EvalSet` to Vertex AI `EvaluationDataset`. Existing `tests/eval/evalsets/*.evalset.json` files are no longer read by `agents-cli eval generate` and friends. See [Migrating Eval Datasets](docs/src/reference/eval-dataset-migration.md) for the conversion. `scaffold upgrade` now prints a notice when legacy files are detected.
8+
9+
### Eval - Quality Flywheel (preview)
10+
- Added `eval dataset synthesize` for LLM-driven user-simulation dataset generation.
11+
- Added `eval generate` to run agent inference over an `EvaluationDataset` and emit traces.
12+
- Added `eval grade` to score agent traces against built-in or custom metrics.
13+
- Added `eval submit` to submit an end-to-end cloud-side evaluation run on Vertex AI Eval Service.
14+
- Added `eval results` to fetch results from a completed cloud evaluation run.
15+
- Added `eval analyze` for failure-mode analysis over graded results.
16+
- Added `eval metric list` to discover built-in evaluation metrics.
17+
- Rewrote the `eval` skill end-to-end to cover the Quality Flywheel workflow (dataset, generate, grade, analyze, optimize).
18+
19+
### Other
20+
- Minor skills consistency fixes
21+
522
## [0.2.1] - 2026-05-28
623
- Add --dryrun as an alias for --dry-run
724
- Smarter skills installation

docs/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,4 @@ nav:
116116
- Skills: reference/skills.md
117117
- About This Project: reference/about.md
118118
- From Agent Starter Pack: reference/from-agent-starter-pack.md
119+
- Migrating Eval Datasets: reference/eval-dataset-migration.md

docs/src/guide/development.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,16 @@ Add and remove dependencies with [uv](https://docs.astral.sh/uv/):
7676

7777
## Phase 3: Evaluate
7878

79-
Run structured evaluations to validate agent behavior. This uses the [ADK eval CLI](https://google.github.io/adk-docs/evaluate/) under the hood.
79+
Run structured evaluations to validate agent behavior. This uses the [GenAI Eval SDK](https://docs.cloud.google.com/gemini-enterprise-agent-platform/optimize/evaluation/agent-evaluation) under the hood.
8080

8181
```bash
82-
agents-cli eval run
82+
agents-cli eval generate
83+
agents-cli eval grade
8384
```
8485

8586
Expect **5-10+ iterations** of the eval-fix loop before your agent consistently passes. Start with 1-2 core eval cases, fix failures, then expand coverage.
8687

87-
See the [Evaluation Guide](evaluation.md) for metrics, evalset schemas, and the full methodology.
88+
See the [Evaluation Guide](evaluation.md) for metrics, dataset schemas, and the full methodology.
8889

8990
---
9091

docs/src/guide/evaluation.md

Lines changed: 134 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,105 @@
11
# Evaluation Guide
22

3-
Run structured evaluations to confirm your agent calls the right tools, produces quality responses, and handles edge cases. Under the hood, `agents-cli eval run` uses the [ADK eval CLI](https://google.github.io/adk-docs/evaluate/) to run evaluations with LLM-as-judge scoring.
3+
Run structured evaluations to confirm your agent calls the right tools, produces quality responses, and handles edge cases. Under the hood, evaluation uses the [Gemini Enterprise Agent Platform GenAI Eval SDK](https://docs.cloud.google.com/gemini-enterprise-agent-platform/optimize/evaluation/agent-evaluation) to grade evaluations.
4+
5+
!!! note "Upgrading from an older agents-cli?"
6+
If your project still has `tests/eval/evalsets/*.evalset.json` files from a previous version, see [Migrating Eval Datasets](../reference/eval-dataset-migration.md) for the new format.
47

58
---
69

710
## Run Your First Evaluation
811

9-
Your project includes a default eval set at `tests/eval/evalsets/basic.evalset.json` and scoring criteria at `tests/eval/eval_config.json`. Run it:
12+
Your project includes a default dataset at `tests/eval/datasets/basic-dataset.json` and metrics configuration `tests/eval/eval_config.yaml`. Run it:
1013

1114
```bash
12-
agents-cli eval run
15+
agents-cli eval generate
16+
agents-cli eval grade
1317
```
1418

15-
The output shows scores for each eval case against the configured rubrics. A score above the threshold (default: 0.8) passes.
19+
The output shows scores for each eval case against the configured metrics.
1620

1721
```bash
18-
# Run a specific eval set
19-
agents-cli eval run --evalset tests/eval/evalsets/custom.evalset.json
20-
21-
# Run all eval sets in the project
22-
agents-cli eval run --all
22+
# Run for a custom dataset and different metrics
23+
agents-cli eval generate --dataset tests/eval/datasets/custom-dataset.json --output custom_traces/
24+
agents-cli eval grade --metrics general_quality --traces custom_traces/
2325
```
2426

2527
---
2628

2729
## Writing Eval Cases and Choosing Metrics
2830

29-
For full documentation on eval case schemas, available metrics, rubric writing, and multi-turn testing, see the [ADK Evaluation Guide](https://google.github.io/adk-docs/evaluate/).
31+
For full documentation on eval case schemas and available metrics, see the [Gemini Enterprise Agent Platform Evaluation documentation](https://docs.cloud.google.com/gemini-enterprise-agent-platform/optimize/evaluation/agent-evaluation).
32+
33+
### Available Metrics Reference
3034

31-
Quick reference for choosing metrics:
35+
You can choose from a wide range of built-in metrics depending on your agent's capabilities and the task at hand. To see the full list of available metrics, run:
3236

33-
- **Agents with custom function tools** — use `tool_trajectory_avg_score` + `rubric_based_final_response_quality_v1`.
34-
- **Agents with `google_search` or model-internal tools** — use only `rubric_based_final_response_quality_v1` (model-internal tools don't appear in trajectory).
35-
- **RAG agents** — use `rubric_based_final_response_quality_v1` + `hallucinations_v1`.
37+
```bash
38+
agents-cli eval metric list
39+
```
40+
41+
#### Common metrics at a glance
42+
43+
A short reference for the most-used built-in metric IDs. Use `agents-cli eval metric list` for the full set with descriptions.
44+
45+
| Metric ID | What it grades |
46+
|---|---|
47+
| `general_quality` | Overall response quality with auto-generated content-based criteria. Recommended starting point for non-agent eval. |
48+
| `text_quality` | Linguistic aspects: fluency, coherence, grammar. |
49+
| `instruction_following` | How well the response adheres to specific constraints and instructions. |
50+
| `tool_use_quality` | Tool selection, parameter accuracy, and step sequence correctness (single-turn). |
51+
| `multi_turn_tool_use_quality` | Technical and semantic correctness of tool calls across a multi-turn conversation. |
52+
| `multi_turn_trajectory_quality` | Sequential logic, efficiency, and error-recovery robustness across turns. |
53+
| `multi_turn_task_success` | Whether the user's goal was fulfilled across the full multi-turn conversation. |
54+
| `final_response_quality` | Comprehensive evaluation of the final response and intermediate tool usage. |
55+
| `final_response_reference_free` | Final-response quality without a reference answer (requires custom rubrics). |
56+
| `final_response_match` | Compares the agent's final response to a provided golden reference answer. |
57+
| `hallucination` | Segments the response into atomic claims and verifies each against tool-returned context. |
58+
| `grounding` | Factuality and consistency against provided context. |
59+
| `safety` | Compliance against safety policies (PII, hate speech, dangerous content, harassment, sexual). |
60+
61+
### Evaluation Configuration (`eval_config.yaml`)
62+
63+
The `eval_config.yaml` file specifies the metrics to run and defines custom metrics for grading evaluations.
64+
65+
```yaml
66+
metrics_to_run:
67+
- response_under_500_chars
68+
69+
custom_metrics:
70+
- name: response_under_500_chars
71+
custom_function: |
72+
def evaluate(instance: dict) -> dict:
73+
response = instance.get("response") or {}
74+
text = "".join(
75+
p.get("text", "") for p in (response.get("parts") or []) if p.get("text")
76+
)
77+
passed = len(text) <= 500
78+
return {
79+
"score": 1.0 if passed else 0.0,
80+
"explanation": f"Final response is {len(text)} chars (limit 500).",
81+
}
82+
- name: response_quality_rubric
83+
prompt_template: |
84+
Rate the agent's response 1-5 for helpfulness and accuracy.
85+
Prompt: {prompt}
86+
Final response: {response}
87+
Full trace (for tool-call and reasoning context): {agent_data}
88+
Return JSON: {"score": <1|2|3|4|5>, "explanation": "<reason>"}
89+
judge_model: gemini-flash-latest
90+
judge_model_sampling_count: 3
91+
```
92+
93+
Each custom metric must conform to either the **Code Execution Metric** or **LLM-as-a-Judge Metric** (`LLMMetric`) schema:
94+
- **Code Execution Metric**: Used to run custom Python code for evaluation. Must have a `name` and a `custom_function` (containing a `def evaluate(instance):` signature). By default, the function executes **locally in the CLI process** — no GCP project or region is required, but the user-supplied code runs with the CLI's privileges. Add `"execution": "remote"` to opt into Vertex AI's sandboxed `CodeExecutionMetric` (server-side), which requires a configured GCP project + region.
95+
- **LLM-as-a-Judge Metric**: Used to evaluate responses using an LLM judge. Must have a `name` and a `prompt_template`. Optional fields include `rubric_group_name`, `judge_model` (e.g., `gemini-flash-latest`), and `judge_model_sampling_count` (between `1` and `32`).
96+
97+
### Quick Reference for Common Scenarios
98+
99+
- **Agents with custom function tools** — Use `tool_use_quality` (for single-turn) or `multi_turn_tool_use_quality` + `multi_turn_trajectory_quality` (for multi-turn).
100+
- **RAG agents** — Use `grounding` + `hallucination` + `safety`.
101+
- **Conversational assistants** — Use `general_quality` or `multi_turn_general_quality`.
102+
- **Goal-oriented agents** — Use `multi_turn_task_success`.
36103

37104
---
38105

@@ -41,10 +108,60 @@ Quick reference for choosing metrics:
41108
Evaluation is iterative. Expect 5-10+ cycles before your agent consistently passes.
42109

43110
1. **Write 1-2 core eval cases** covering the most important behavior.
44-
2. **Run**: `agents-cli eval run`
111+
2. **Run**: `agents-cli eval generate` followed by `agents-cli eval grade`
45112
3. **Read the results** — which cases failed and why.
46113
4. **Fix** — adjust the agent's instruction, tools, or logic.
47-
5. **Re-run**: `agents-cli eval run`
114+
5. **Re-run**: `agents-cli eval generate` and `agents-cli eval grade`
48115
6. **Expand** — once core cases pass, add edge cases and new scenarios.
49116

50-
For full documentation on eval case schemas, metrics, rubrics, and user simulation, see the [ADK Evaluation Guide](https://google.github.io/adk-docs/evaluate/).
117+
---
118+
119+
## Beyond `generate` and `grade`
120+
121+
`generate` and `grade` form the inner loop, but the eval surface has a few more commands worth knowing about. Each is a separate step you reach for as your eval setup matures.
122+
123+
### `agents-cli eval dataset synthesize`
124+
125+
Bootstraps a dataset by inspecting your local ADK agent and generating multi-turn conversation scenarios for it — no input file required. Useful for cold-starting evaluation on a new agent or expanding coverage without writing every case by hand. Each generated case includes a starting user message, a conversation plan, and the full agent trace produced by playing the scenario out against an LLM-backed user simulator.
126+
127+
```bash
128+
agents-cli eval dataset synthesize --count 10
129+
```
130+
131+
Steer what gets generated with `--instruction` (e.g. `"Scenarios where the user changes their mind"`) and `--environment-context` (e.g. `"Today is Monday. Flights to Paris are available."`). The output is a regular `*-dataset.json` file you can edit, commit, and feed back into `eval grade` directly (the trace is already populated, so you can skip `eval generate`).
132+
133+
### `agents-cli eval compare`
134+
135+
Compares two grade results side by side so you can see whether a change actually improved things.
136+
137+
```bash
138+
agents-cli eval compare baseline_results.json candidate_results.json
139+
```
140+
141+
A typical use is comparing a "before fix" run against an "after fix" run during the eval-fix loop.
142+
143+
### `agents-cli eval analyze`
144+
145+
Clusters failure modes from a grade-results file into themes, so you can see *what kinds of things* are going wrong instead of skimming individual cases.
146+
147+
```bash
148+
agents-cli eval analyze --eval-result grade_results.json
149+
```
150+
151+
### `agents-cli eval metric list`
152+
153+
Prints every built-in metric the SDK supports, with a short description for each. The starting point when you want to know what's available beyond the common metrics table above.
154+
155+
### `agents-cli eval optimize`
156+
157+
Once your evals are in place, `eval optimize` uses them to automatically tune your agent's prompts.
158+
159+
```bash
160+
agents-cli eval optimize
161+
```
162+
163+
A run takes anywhere from a few minutes to several hours depending on dataset size and metric complexity, so it's not something to run over and over. Reach for it after simpler approaches (rewriting the prompt yourself, adjusting metrics, fixing failing cases by hand) have run their course.
164+
165+
---
166+
167+
For full documentation on eval case schemas, metrics, and user simulation, see the [Gemini Enterprise Agent Platform Evaluation documentation](https://docs.cloud.google.com/gemini-enterprise-agent-platform/optimize/evaluation/agent-evaluation).

docs/src/guide/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Agents CLI bundles **7 skills** that give your coding agent deep knowledge acros
1414
| `google-agents-cli-workflow` | Development lifecycle, code preservation, model selection |
1515
| `google-agents-cli-adk-code` | ADK Python API — agents, tools, orchestration, callbacks |
1616
| `google-agents-cli-scaffold` | Project scaffolding — `create`, `enhance`, `upgrade` |
17-
| `google-agents-cli-eval` | Evaluation metrics, evalsets, LLM-as-judge |
17+
| `google-agents-cli-eval` | Evaluation lifecycle — datasets, metrics, generate/grade, compare, analyze, optimize |
1818
| `google-agents-cli-deploy` | Deployment — Agent Runtime, Cloud Run, GKE, CI/CD |
1919
| `google-agents-cli-publish` | Gemini Enterprise registration |
2020
| `google-agents-cli-observability` | Cloud Trace, logging, third-party integrations |

docs/src/guide/hands-on-tutorial.md

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ my-first-agent/
4646
│ └── app_utils/ # Telemetry and utility code
4747
├── tests/
4848
│ ├── eval/
49-
│ │ ├── evalsets/
50-
│ │ │ └── basic.evalset.json # Test cases for evaluation
51-
│ │ └── eval_config.json # LLM-as-judge criteria
49+
│ │ ├── datasets/
50+
│ │ │ └── basic-dataset.json # Test cases for evaluation
51+
│ │ └── eval_config.yaml # Metrics configuration
5252
│ ├── integration/
5353
│ │ └── test_agent.py
5454
│ └── unit/
@@ -166,43 +166,34 @@ For more on adding tools, see the [ADK Tools documentation](https://google.githu
166166

167167
## 7. Run an Evaluation
168168

169-
Evaluations validate that your agent behaves correctly. Your project comes with a default eval set at `tests/eval/evalsets/basic.evalset.json`:
169+
Evaluations validate that your agent behaves correctly. Your project comes with a default dataset at `tests/eval/datasets/basic-dataset.json`:
170170

171-
```json title="tests/eval/evalsets/basic.evalset.json"
171+
```json title="tests/eval/datasets/basic-dataset.json"
172172
{
173-
"eval_set_id": "basic_eval",
174-
"name": "Basic Agent Evaluation",
175173
"eval_cases": [
176174
{
177-
"eval_id": "greeting",
178-
"conversation": [
179-
{
180-
"user_content": {
181-
"parts": [{"text": "Hello, what can you help me with?"}]
182-
}
183-
}
184-
],
185-
"session_input": {
186-
"app_name": "app",
187-
"user_id": "eval_user",
188-
"state": {}
175+
"eval_case_id": "greeting",
176+
"prompt": {
177+
"role": "user",
178+
"parts": [{"text": "Hello, what can you help me with?"}]
189179
}
190180
}
191181
]
192182
}
193183
```
194184

195-
Each eval case defines a user message and session context. The eval system sends the message to your agent and scores the response using LLM-as-judge criteria defined in `eval_config.json`.
185+
Each eval case defines a user message. The evaluation system sends the message to your agent and grades the response using metrics specified in `eval_config.yaml`.
196186

197187
Run it:
198188

199189
```bash
200-
agents-cli eval run
190+
agents-cli eval generate
191+
agents-cli eval grade
201192
```
202193

203-
The output shows scores for each eval case against the configured rubrics (relevance, helpfulness). A score above the threshold (default: 0.8) passes.
194+
The output shows scores for each eval case against the configured metrics.
204195

205-
For the full evaluation workflow — writing test cases, adding metrics, the eval-fix loop — see the [Evaluation Guide](evaluation.md).
196+
For the full evaluation workflow — writing test cases, adding metrics, the eval-fix loop, and the rest of the eval surface (`eval dataset synthesize`, `eval compare`, `eval analyze`, `eval metric list`, and `eval optimize`) — see the [Evaluation Guide](evaluation.md).
206197

207198
---
208199

@@ -258,7 +249,7 @@ See the [Observability Guide](observability/index.md) for verification steps, fu
258249
| `agents-cli playground` | Started the ADK playground for interactive testing |
259250
| `agents-cli run "..."` | Tested the agent from the terminal |
260251
| Edited `agent.py` | Customized the persona and added a tool |
261-
| `agents-cli eval run` | Validated agent behavior with structured evaluations |
252+
| `agents-cli eval generate` followed by `agents-cli eval grade` | Validated agent behavior with structured evaluations |
262253
| `agents-cli deploy` | Deployed the agent to Google Cloud |
263254
| Trace explorer + content logs | Verified tracing and set up prompt-response logging |
264255

0 commit comments

Comments
 (0)