Two patterns for streaming tools in Google's ADK voice agents — live progress narration with partial updates, and quiet background execution — plus the production gotchas: idempotency, stop_streaming, and barge-in semantics.
How far can you push "self-evolving" agents when governance is the actual requirement? This Google Cloud post shows the full loop on a concrete incident — from a flash-sale surge that breaks a checkout pipeline, to an autonomously generated hotpatch, to a structural fix that stops for human approval.
A 5-request warm baseline is hit by a 50-request concurrent flash-sale surge on 15 cold inventory keys. The impact is immediate and measurable: Memorystore hit ratio drops from 100% to 0.0%, the Cloud SQL connection pool hits 100% saturation (2/2 connections locked), P99 latency spikes to 312–520 ms, and HTTP 500 errors jump to 72.7–80% (40 failed checkouts).
Telemetry alerts wake an ADK Supervisor Router Agent powered by Gemini 4 Argon — after Model Armor inspects the alert payload to block prompt injection. Diagnosing pool exhaustion, the APEX Layer 1 Hotpatch Synthesizer generates an in-memory token-bucket rate limiter (10-token capacity, 40.0 req/s replenishment). Before mounting into the API Gateway middleware, the patch passes three automated governance gates:
Across a second 50-request surge, HTTP 500s drop to 0.0%, pool saturation drops to 0%, P99 recovers to 18.2 ms, and excess burst traffic is shed via HTTP 429 (40 throttled, 10 served warm).
The AgentEvolver Credit Attribution Engine audits the incident execution spans — penalizing the database-restart reflex (which spiked latency to 3,800 ms) and rewarding the token-bucket patch (+0.97 credit). The APEX Layer 2 Principle Distiller signs and indexes an immutable operational rule into Gemini Platform Vector Search: "Cache eviction stampede: database restart contraindicated; apply token-bucket load shedding."
Rather than relying on temporary hotpatches, the system then proposes a Tier-2 structural update: commissioning a permanent Traffic Shaping Specialist Agent. Execution pauses and presents a Dual-Custody SRE Approval Modal requiring explicit sign-off from the on-call SRE.
The pattern worth copying: fast autonomous action is allowed, but only inside a guardrail envelope (Model Armor → AST sandbox → OPA policy → signing), and structural changes always escalate to humans. Attribution closes the loop — the system learns which of its own moves helped, and the principle it distills outlives the incident. That's governed self-evolution done carefully: speed at Layer 1, custody at Layer 2.