{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "google-agents-cli--evaluate-and-tune-an-agent-with-agents-cli",
 "repo": "google/agents-cli",
 "repo_url": "https://github.com/google/agents-cli",
 "repo_slug": "google-agents-cli",
 "title": "Evaluate an agent and auto-tune its prompts",
 "page_title": "How to evaluate an agent and auto-tune its prompts with Agents CLI",
 "summary": "Run the eval dataset, grade traces, cluster failure modes and let the CLI optimize prompts from the results.",
 "who": "A developer who needs evidence that an agent change made it better, not worse.",
 "problem": "Prompt tweaks without evals regress quietly.",
 "outcome": "Graded eval results, a comparison between two runs, and tuned prompts.",
 "steps": [
  "Synthesize multi-turn scenarios with `agents-cli eval dataset synthesize`",
  "Run inference and grading with `agents-cli eval run`",
  "Cluster failures with `agents-cli eval analyze` and compare two result files with `agents-cli eval compare`",
  "Auto-tune prompts using eval data with `agents-cli eval optimize`"
 ],
 "agent_prompt": "In my google/agents-cli project, run `agents-cli eval run`, then `agents-cli eval analyze`, summarize the top failure modes, and try `agents-cli eval optimize` before rerunning and comparing.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "List the available metrics first with `agents-cli eval metric list`.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Python 3.11+, uv and Node.js",
  "A coding agent such as Claude Code, Codex or Antigravity CLI",
  "A Google Cloud or AI Studio account for login and deployment"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "cost",
   "notice": "Eval runs call the model for every case and for grading, so large datasets add up on your Google Cloud or AI Studio bill."
  }
 ],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/google-agents-cli/evaluate-and-tune-an-agent-with-agents-cli/",
 "md": "https://dedupedai.com/use-cases/google-agents-cli/evaluate-and-tune-an-agent-with-agents-cli/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/google-agents-cli--evaluate-and-tune-an-agent-with-agents-cli.json",
 "api_version": "v1"
}
