Cloudflare AI

Build and deploy AI agents and applications on the AI Cloud

Cloudflare provides the infrastructure to scale your AI applications at every step — store training data, run inference — on the same network Cloudflare uses to power its own use of AI.
Run Serverless inference on GPUs
Run Serverless inference on GPUs

Ship models that respond in <100 ms worldwide. No clusters to manage.

Build Agents & MCP Servers
Build Agents & MCP Servers

Cloudflare Agents SDK + MCP let Workers coordinate tools, schedule tasks, and reason toward goals.

Store your training data
Store your training data

Store your training data in R2 for egress-free multi-cloud access to GPUs.

Proven AI infrastructure, powering products at scale

The same end-to-end AI stack behind Cloudflare’s own products — battle-tested across billions of requests and millions of users daily. Build with the same primitives we use in production.

Build AI agents on durable objects with code execution, inference, AI gateway all built-in

"Cloudflare provided everything from OAuth to out-of-the-box remote MCP support so we could quickly build, secure, and scale a fully operational setup."

Architecture inspired by

Atlassian

The full-stack for building Agents

Everything you need to build, deploy, and scale AI Agents from inference to orchestration, all on one global network.

Workers AI model catalog

Access Llama 3, Gemma 3, Whisper, TTS, and LoRA-fine-tuned variants across 190+ locations.

Agents SDK

Build goal-driven agents that call models, APIs, and schedules from a single TypeScript API.

Remote MCP servers

Secure, OAuth-scoped endpoints that expose tools and data to agents without self-hosting.

AI Search

Complete RAG workflows with automatic indexing and fresh data. Ship AI search and chat with one instance in minutes.

Vectorize

Globally-replicated vector database that pairs with Workers AI for RAG in a few lines of code.

R2 object storage

Store terabytes of training data, checkpoints, and user uploads. Move to any cloud for $0 egress.

AI Gateway

Built-in caching, rate-limiting, model fallback, and observability for every inference call.

…And the tools to simplify it

Deploy MCP Servers between meetings with Agents SDK.

Background Pattern
import GitHubHandler from "./github-handler";

export default new OAuthProvider({
  apiRoute: "/sse",
  apiHandler: MyMCP.Router,
  defaultHandler: GitHubHandler,
  authorizeEndpoint: "/authorize",
  tokenEndpoint: "/token",
  clientRegistrationEndpoint: "/register",
});

OAuth integration included

Implements the provider side of the OAuth 2.1 protocol, allowing you to easily add authorization to your MCP server.

MCP playground for testing

Our MCP playground allows you to connect to remote MCP servers, with the authentication check included

MCPAgent

Built on DurableObjects to provide an out of the box transport layer, with memory management included

End-to-end, goal-driven agents with Agents SDK

Build intelligent, goal-driven agents that call models, APIs, and tasks from one unified SDK — designed to run fast, securely, and globally on Workers.

Background Pattern
npm i agents
Read-only

Built-in state management

Agents include built-in state management — sync state with clients, trigger events on changes, and read or write to each Agent’s SQL database automatically.

Multi-modal interfaces

Connect via WebSockets to stream updates in real time — from long-running reasoning tasks, asynchronous workflows, or chat sessions built with the `useAgent` hook. Agents SDK also supports email, and voice modalities.

Multi-model with AI Gateway

Agents are just code. Use any AI model, integrate browsers or APIs, fetch data from external sources, and add custom methods to extend functionality.

Secure Sandboxes

Execute commands, manage files, run services, and expose them via public URLs - all within secure, sandboxed containers with our Sandbox SDK.
SiteGPT

We use Cloudflare for everything – storage, cache, queues, and most importantly for training data and deploying the app on the edge, so I can ensure the product is reliable and fast. It's also been the most affordable option, with competitors costing more for a single day's worth of requests than Cloudflare costs in a month. ”

Bhanu Teja Pachipulusu
Bhanu Teja Pachipulusu Founder

Cloudflare powers
1 in 5 sites on the Internet

Trusted by the teams you trust. And thousands more...

Powerful primitives, seamlessly integrated

Build on the infrastructure powering 20% of the Internet.

Build without boundaries

Join thousands of developers who've eliminated infrastructure complexity and deployed globally with Cloudflare. Start building for free — no credit card required.