● LIVE   Breaking News & Analysis
Gbuck12
2026-05-03
Science & Space

How Cloudflare Built an Internal AI Engineering Stack on Its Own Platform

Cloudflare's internal AI engineering stack, built on its own platform, saw 93% R&D adoption, 47.95M monthly AI requests, and doubled merge requests, with all components (except Backstage) being shipping products.

Introduction

In the past month, 93% of Cloudflare's R&D organization has been using AI coding tools that run on the same infrastructure the company ships to customers. This shift didn't happen overnight: eleven months ago, a cross-functional team called iMARS (Internal MCP Agent/Server Rollout Squad) was formed to weave AI deeply into Cloudflare's engineering workflows. What started as a focused project quickly evolved into a comprehensive internal stack, now maintained by the Dev Productivity team. This article breaks down the architecture, adoption numbers, and key components that made this transformation possible.

How Cloudflare Built an Internal AI Engineering Stack on Its Own Platform
Source: blog.cloudflare.com

The Numbers Behind the Adoption

Cloudflare's adoption of AI-assisted development has been nothing short of remarkable. Over the past 30 days, the platform has served 47.95 million AI requests and processed 241.37 billion tokens through AI Gateway, while 51.83 billion tokens were handled by Workers AI. Nearly 3,700 internal users (60% of the company, 93% of R&D) actively leverage these tools, spread across 295 teams. The impact on developer velocity is clear: merge requests have seen an unprecedented quarter-over-quarter increase, with the four-week rolling average climbing from ~5,600 per week in Q4 to over 8,700, peaking at 10,952 in late March.

The Architecture at a Glance

Cloudflare's internal AI engineering stack is built on a layered architecture, each layer corresponding to a shipping product. The engineer-facing tools include OpenCode, Windsurf, and other MCP-compatible clients, both open-source and third-party. Here's how each layer maps to Cloudflare products:

  • Zero Trust authentication – Cloudflare Access
  • Centralized LLM routing, cost tracking, BYOK, and Zero Data Retention controls – AI Gateway
  • On-platform inference with open-weight models – Workers AI
  • MCP Server Portal with single OAuth – Workers + Access
  • AI Code Reviewer CI integration – Workers + AI Gateway
  • Sandboxed execution for agent-generated code (Code Mode) – Dynamic Workers
  • Stateful, long-running agent sessions – Agents SDK (McpAgent, Durable Objects)
  • Isolated environments for cloning, building, and testing – Sandbox SDK (GA during Agents Week)
  • Durable multi-step workflows – Workflows (scaled 10x during Agents Week)
  • 16K+ entity knowledge graph – Backstage (OSS)

The Building Blocks

The iMARS team quickly realized that MCP servers alone were insufficient. They needed to rethink how standards are codified, how code gets reviewed, how engineers onboard, and how changes propagate across thousands of repositories. This led to the creation of several key components:

How Cloudflare Built an Internal AI Engineering Stack on Its Own Platform
Source: blog.cloudflare.com
  • MCP Server Portal – A unified interface for managing MCP servers, using Workers and Access for authentication and single OAuth.
  • AI Code Reviewer – A CI integration built on Workers and AI Gateway that automatically reviews pull requests, catching issues early and accelerating code quality.
  • Code Mode – Sandboxed execution environments powered by Dynamic Workers, allowing agents to safely generate and test code without affecting production.
  • Agents SDK – A toolkit for building stateful, long-running agent sessions using McpAgent and Durable Objects.
  • Sandbox SDK – Provides isolated environments for cloning, building, and testing, now generally available after Agents Week.
  • Workflows – Enables durable multi-step workflows, scaling dramatically during the launch.

Impact on Developer Velocity

The most striking outcome is the acceleration of developer productivity. The sheer volume of AI requests and tokens indicates deep integration into daily workflows. The jump in merge requests – nearly doubling from Q4 baseline – suggests that AI-assisted tooling is not just a novelty but a fundamental driver of engineering output. Cloudflare's approach demonstrates that building AI infrastructure on your own platform can create a powerful feedback loop: internal usage validates and improves the products that are shipped to customers.

Conclusion

What started as a tiger team project has become a core part of Cloudflare's engineering culture. The AI stack is not internal-only; every component (except Backstage) is a shipping product. By using its own platform, Cloudflare ensures that its internal AI tools are battle-tested, continuously improved, and aligned with customer needs. The results speak for themselves – widespread adoption, significant velocity gains, and a blueprint for other organizations looking to integrate AI into their development lifecycle.