This article details Cloudflare's platform for running AI agents, focusing on the infrastructure that supports scalable, secure, and observable agent execution. It highlights the use of microVMs and V8 isolates for sandboxing, secure connectivity to private services, and integrated tooling for browser automation and email, enabling developers to build and deploy complex AI agent workflows efficiently.
Read original on Cloudflare BlogCloudflare has partnered with Anthropic to offer a managed environment for Claude AI agents, allowing developers to decouple the agent's 'brain' (core logic on Anthropic) from its 'hands' (execution infrastructure on Cloudflare). This architecture provides greater control over agent sandboxes, enhances security, and improves observability, addressing key challenges in deploying AI agents at scale.
A core aspect of Cloudflare's agent platform is its flexible sandboxing capabilities. Developers can choose between two primary execution environments:
Architectural Choice: MicroVMs vs. Isolates
The choice between microVMs and V8 isolates for sandboxing an AI agent's execution environment is a critical system design decision. MicroVMs provide full OS flexibility and strong isolation suitable for complex, stateful tasks, but incur higher latency and cost. V8 isolates offer superior performance and cost-efficiency for stateless or short-lived executions, making them ideal for high-scale, event-driven agent workflows. Understanding the agent's workload characteristics is crucial for selecting the appropriate sandbox technology to optimize for performance, cost, and security.
Cloudflare emphasizes security for agent workloads, particularly when agents need to interact with private services. Key security features include:
The platform extends agent capabilities with various integrated tools, allowing agents to perform complex interactions:
defineTool({
name: "r2_host_file",
description: "Upload from sandbox to R2 and get a public URL.",
inputSchema: z.object({
key: z.string().describe("Object key"),
content: z.string().describe("UTF-8 file body"),
contentType: z.string().describe("MIME type")
}),
run: async ({ key, content, contentType }, { env }) => {
await env.PUBLIC_BUCKET.put(
key, content, { httpMetadata: { contentType }}
);
return `${env.PUB_R2_URL.replace(/\/$/, "")}/${encodeURI(key)}`;
}
})