Research

Ambient Quality Agent (AQuA): Continuous Quality Assurance for Production AI Agents

AQuA is a background quality agent that audits real production conversations, groups repeatable failures, and helps engineers trace them to code without blocking live requests.

Google ADK Recipes contributorsOpen-source agent recipe24 min readGoogle ADK Recipes
IMPORTANTAgent EvaluationAdvanced

Key takeaway

AQuA runs beside the production agent rather than inside its request path. It samples sessions, scores tool use and answers, groups similar failures, validates clusters against transcripts, stores recurring insights, and investigates selected failures against the deployment’s code snapshot. The result is a feedback loop connecting production behavior to offline evaluations and human-reviewed fixes.

Updated on Oct 20, 2026

01

Abstract

A practical guide to the Ambient Quality Agent (AQuA) pattern: continuously sampling production agent traces, detecting quality failures, grouping evidence-backed root causes, tracking recurring insights, and connecting failures to the exact code snapshot for human-reviewed fixes. The article separates repository-specific reported results from general ADK capabilities and production design recommendations.

02

Architecture

AQuA Architecture: From Trace to Tracked Insight

The repository recipe is more than a prompt that asks an LLM to judge transcripts. It wires together telemetry ingestion, review, clustering, verification, persistent insight tracking, source snapshots, and a dashboard/CLI investigation workflow.

The project README describes these operational paths:

  • Local synthetic demo: clone google/adk-recipes, change into core/python/ambient-quality-agent, then run make demo. This serves a dashboard using synthetic runs and insights without a cloud project, credentials, or model calls.
  • Google Cloud attachment: add the recipe through agents-cli extension, apply the single-project infrastructure, and deploy. The documented setup provisions the runner, BigQuery-backed state, dashboard, and deployment-time source snapshots; the dashboard is protected by Identity-Aware Proxy when configured.
  • Telemetry inputs: Cloud Trace, Cloud Logging, and BigQuery-based agent telemetry. The recipe keeps trace data, source snapshots, and insight tables inside the customer project boundary.
  • Investigation: dashboard Chat or agents-cli aqua run starts root-cause analysis against the snapshot that corresponds to the failing deployment.

This separation matters: the sweeper should read telemetry and write its own findings, not instrument itself into every user request or mutate the production agent. Verify prerequisites and exact flags against the current README before running commands because recipe versions and CLI interfaces can change.

Figure 1

Two Connected Loops: Offline Improvement and Production Learning

The AQuA continuous quality assurance architecture: the Inner Loop (Build & Test in local / CI) with eval set, offline evals, coding agent/optimizer, and compare + deploy; connected to the Outer Loop (Ship, Monitor & Learn 24/7 in production) with live traffic, online evals, AQuA sweep, and AQuA root cause analysis feeding raw traces, evidence, and failing transcripts back into evaluation sets.

Source: Google ADK Recipes, Ambient Quality Agent (AQuA).

03

Training

Build the Evaluation Pipeline in Stages

The source walkthrough describes a bounded five-stage sweep. Sample pulls a random sample of up to 1,000 recent sessions from Cloud Trace, Cloud Logging, or BigQuery. Review scores each trajectory against a nine-point checklist covering procedure, tool selection and arguments, grounding, task completion, and related breakdowns; it can include the observed agent instructions, tool definitions, and optional goal.md. A failed session produces a structured actual/expected finding tied to evidence spans.

Cluster groups findings that appear to share a failure mechanism. Verify then checks each candidate against up to three full transcripts and rejects clusters unsupported by the evidence. Track matches surviving clusters against open BigQuery insights, marking them NEW, RECURRING, or automatically RESOLVED after 14 days unseen. Verification is bounded to 50 clusters per run, an explicit cost-control trade-off rather than proof that every trace in a cluster was manually checked.

The default session_review judge uses one model call per session. The recipe can also opt into managed trajectory AutoRaters such as task_success, tool_use_quality, and trajectory_quality. Deterministic Python custom metrics can be configured in eval_config.yaml and published with agents-cli aqua metrics publish. This hybrid design is important: LLM judges handle semantic cases, while deterministic metrics provide repeatable measurements for domain-specific invariants.

04

Limitations

Failure Modes and Mitigations

Judge hallucination: require evidence spans and validate precision against human labels. False clustering: group by causal mechanism and inspect complete transcripts. Sampling blind spots: combine random sampling with targeted coverage of new releases, critical tools, and high-risk segments. Evaluation leakage: keep a held-out regression set and periodically add confirmed production failures. Version mismatch: investigate against the immutable revision that actually ran. Metric gaming: report per-dimension and severity-aware metrics, not only averages. Sensitive data exposure: redact, minimize, restrict, and expire data. Automatic patching: require tests, human review, and controlled rollout. The system should be allowed to say that evidence is insufficient rather than inventing a confident root cause.

05

Conclusion

Final Takeaways

AQuA illustrates a shift from evaluating agents only during development to learning continuously from production behavior. The strongest design choices are bounded sampling, explicit quality dimensions, evidence-backed judgments, independent cluster validation, durable issue tracking, exact deployment provenance, and human-reviewed remediation. Start with one workflow and a labelled baseline. Prove evaluator precision before paging people. Turn confirmed failures into regression cases. Preserve trace and deployment provenance so conclusions are reproducible. Bottom line: an agent is not reliable merely because it returns HTTP 200. Reliability means it follows constraints, uses tools correctly, grounds its claims, and keeps doing so across releases—and that the team can detect, explain, and prevent failures when it does not.

Browse all research
Machinoai Logo
Machinoai

Your edge in the AI era. Deep dives into machine learning concepts, paper explainers, verified industry jobs, and developer tools.

© 2026 Machinoai. All rights reserved.