OFICIAL Google Cloud Blog

Building an agentic stack in Envoy: routing models, tokens, and MCP

What happened
Based on Google Cloud Blog · Nov 18, 2026

Google Cloud details how Envoy’s open-source proxy is evolving to route AI agent traffic, addressing token budgets, session state, and tool execution boundaries for autonomous systems.

Building an agentic stack in Envoy: routing models, tokens, and MCP
Google Cloud Blog — Google
Key points
·
Envoy now routes AI agent traffic by reading payloads to identify models and token loads, addressing payload blindness in LLM requests.
·
Dynamic transcoding in Envoy lets applications switch models or providers with only a configuration update, avoiding client-side translation layers.
·
Token-aware features like pre-inference throttling and KV-cache prefix affinity reduce latency and prevent runaway agent loops.

Envoy, an open-source edge and service proxy used by Google Cloud’s Application Load Balancers and Agent Substrate dataplane, is being extended to handle AI agent workloads that differ from traditional microservices. Autonomous agents select their communication partners, embed routing attributes in request bodies, and operate under token budgets rather than simple request rates. Google Cloud has developed Envoy to support these agentic interactions, including protocols like Anthropic’s Model Context Protocol and Google’s Agent2Agent, while maintaining enterprise-grade security and scalability.

Envoy now operates at Layer 8 for agentic interaction protocols and Layer 9 for agent framework interfaces, addressing challenges such as payload blindness and request-rate fallacies. It reads request bodies to distinguish between models and token loads, enforces token-based rate limits, and preserves session state to avoid restarting agent conversations. The proxy also inspects tool calls to prevent prompt injection and data exfiltration, integrating guardrails like Model Armor and ShieldGemma.

Client applications often lock into specific model APIs, requiring translation layers to switch providers. Envoy abstracts this by dynamically transcoding requests into downstream formats at line rate, allowing applications to switch models or providers with only a configuration update. It also parses streaming responses to extract token counts in real time, enabling ultra-low latency token tracking without modifying application code.

Envoy introduces token-aware traffic management features such as pre-inference throttling, runaway loop protection, and KV-cache prefix affinity. These features enforce tokens-per-minute limits, detect recursive reasoning loops, and route prompts to GPU workers holding relevant cache, reducing latency. The proxy also supports automatic model retry and fallback to secondary pools when primary models exceed quotas or fail.

Original source → Deals on Clipraptor.com →