shiichan

Running Ourselves on Our Own Platform: Inside Cloudflare's Internal AI Engineering Stack!

Hey there, it's Shiichan! Today I've got a fun behind-the-scenes story: a company running its whole engineering workflow on the exact products it sells to customers.

Cloudflare Blog blog.cloudflare.com

What was announced?

Cloudflare's Blog published a look under the hood at how they built their internal AI engineering platform entirely on the same products they ship to customers. And this isn't a demo: 93% of R&D and 60% of the whole company use this AI coding setup every day. Over the last 30 days, 3,683 people used it and pushed about 241 billion tokens through AI Gateway. That's some serious dogfooding.

Why it matters

Left alone, AI coding tools tend to sprawl: every engineer holds their own API keys and wires straight into a grab-bag of models. Costs get invisible, you lose track of where sensitive data flows, and governance goes out the window. Cloudflare solved this by putting the whole thing on their own platform. As a bonus, it doubles as a real-world test for new products, so they get to hammer on them hard before customers ever see them.

What changes

All an engineer does is run opencode auth login and authenticate with company SSO (Cloudflare Access). From there a proxy Worker injects the API keys server-side, swaps the user's email for an anonymous UUID, and enforces Zero Data Retention on every model. So no raw API keys ever sit on a laptop, and admins get a single place to see who used which model and how much. Getting developer experience and governance at the same time is the big win here.

Dive Deep

The smartest part to me is how they split cost. They run the open Kimi K2.5 on Workers AI, processing 7 billion security-related tokens a day — for 77% less than the roughly $2.4M a year a comparable proprietary model would cost. For work that's light but high-volume, like doc review and AGENTS.md generation, this is the right place to send it.

The MCP setup is clever too. Their internal MCP Server Portals bundle 13 servers and 182+ tools, but the GitLab server alone had 34 tool definitions, eating about 15,000 tokens (7.5% of a 200K context window) on every request. So they used Code Mode to collapse what the client sees down to just two tools: search and execute. No matter how many servers get added, the client still sees only two tools — pretty tidy, right?

Code review is on AI too. Their AI code review flow classifies each MR's risk as trivial, lite, or full, then assigns specialist agents for code quality, security, Codex compliance, documentation, and performance. It hits 100% coverage across the standard CI pipeline, with heavy architectural reviews going to frontier models like Opus 4.6 and GPT 5.4, and lighter documentation review (~15%) handled by Workers AI.

The foundation is a self-hosted, open-source Backstage holding a huge knowledge graph — 2,055 services, 544 systems, and more. From that, they auto-generate AGENTS.md files across roughly 3,900 repositories. Long-running sessions ride on the Agents SDK, and isolated build environments on the Sandbox SDK — it really is a full-course meal of their own products.

Wrap-up

  • Cloudflare built its internal AI engineering platform entirely on the products it sells (93% of R&D, 60% company-wide use it daily)
  • AI Gateway handles auth, anonymization, API-key injection, and Zero Data Retention in one place, giving governance and cost visibility
  • Kimi K2.5 on Workers AI runs light, high-volume work for 77% less, while heavy work goes to frontier models
  • The MCP Portal uses Code Mode to fold 34 tools down to 2, saving context
  • AI code review hits 100% coverage in standard CI, and Backstage metadata drives AGENTS.md across ~3,900 repos

If you want a front-row look at how far a company that owns its own platform can push it into their own development, this one's for you!