Introducing Agent Lee - a new interface to the Cloudflare stack

2 min read
cloudflareagentsmcpcodemodedurable-objectselicitationdashboard-ux
Originally from blog.cloudflare.com
View source

My notes

Summary

Cloudflare launched Agent Lee, an in-dashboard AI assistant that talks to your actual account (Workers, DNS, R2, Access, etc.) via natural language, already serving 18k daily users and 250k tool calls/day in beta. The interesting part isn’t the chat UI - it’s the architecture: Agent Lee uses “Codemode” to convert MCP tools into a TypeScript API the model writes code against, runs that code in a sandbox fronted by a Durable Object proxy that classifies read vs. write and gates writes behind explicit user approval (elicitation). Every primitive (Agents SDK, Workers AI, Durable Objects, MCP) is the same one customers get.

Key Insight

  • LLMs write TypeScript better than they call tools. Instead of handing raw MCP tool definitions to the model, Cloudflare converts them into a TypeScript SDK and asks the model to write code. Rationale: training data contains massive amounts of real TS, but few tool-call examples - accuracy goes up.
  • Multi-step tasks collapse into one script. Code generation lets the model chain calls in a single generated script and return only the final result - eliminates LLM round-trips that would otherwise bottleneck latency and cost.
  • Permission is architectural, not UX. A Durable Object acts as credentialed proxy. It inspects generated code (method + body) and classifies it read-or-write. Reads proxy through. Writes are blocked until the user approves via elicitation. API keys never leave the DO - injected server-side. The “are you sure?” prompt is the enforcement layer, not a courtesy dialog.
  • Scale stats as product validation. ~18k daily users, ~250k tool calls/day across DNS, Workers, SSL/TLS, R2, Registrar, Cache, Tunnel, API Shield. Cloudflare frames internal metrics as platform evidence: “limitations we hit are limitations we fix in the platform.”
  • Dynamic generative UI, not chat. Agent Lee renders inline charts, tables, architecture maps as you ask. Users can drag an “adaptive grid” to carve out UI blocks and ask the agent to fill them - chat history becomes a living dashboard.
  • Dogfooding on shipped primitives. Everything is built on Agents SDK + Workers AI + Durable Objects + MCP - the same stack customers have. Signal: these primitives are probably production-ready enough to bet a flagship product on.
  • Roadmap signals the real play. Proactive monitoring (“reaches out when something warrants attention”), CLI + mobile surface, accumulated context (“what you were debugging last week”). The dashboard is step one; the destination is platform-as-collaborator.