DEV Community

Jangwook Kim
Jangwook Kim

Posted on • Originally published at jangwook.net

Cloudflare Agents Week 2026 — When AI Agents Become Cloud Customers

This time last year, every AI agent infrastructure conversation started with Kubernetes + LangGraph. Cloudflare's April Agents Week presented a different picture. Agents don't just call APIs — they create Cloudflare accounts, register domains, and deploy code on their own. The phrase "agents as cloud customers" sounds like marketing fluff, but this time they actually built it.

Here's my read on what matters, what doesn't, and where I'm skeptical.

What Agents Week Was

Cloudflare declared April 2026 "agents week" and shipped announcements every day — 20+ new features and GA transitions by the end of it. The overall impression is a company-wide bet that agents will be the primary actors on the internet, and they rebuilt infrastructure accordingly across compute, storage, networking, and security.

I'm focusing on the items that actually affect how you write and deploy agent code.

The Most Provocative Announcement — Agents That Create Their Own Accounts

My honest reaction when I first read this: "is this real?" The mechanics: once a user accepts Cloudflare's terms of service once, agents can autonomously create a Cloudflare account, start a paid subscription, register a domain, get an API token, and deploy code. Stripe partnership handles payment tokenization; OAuth + OIDC authenticate the agent as a trusted actor.

The implication is significant. Until now, agents worked within infrastructure that humans provisioned. Now agents can be the entity that provisions the infrastructure itself. If you're building a SaaS product, "agent handles new customer onboarding end-to-end" becomes a real architectural option.

That said, I have two concerns I can't shake. First, an agent connected to live billing requires airtight cost controls. Cloudflare's new task_budget concept seems designed for exactly this, but real-world examples of the two working together are scarce. Second, the legal accountability picture is murky. If an agent registers the wrong domain or incurs unexpected charges, who owns that? User consent to ToS exists, but the specific liability hasn't been tested.

Three Announcements Worth Your Attention

Past the headline, here are the things I'd actually build with.

Sandboxes GA: Nine months from beta (June 2025) to general availability. Each sandbox is an isolated Linux environment — real shell, real filesystem, background processes — that spins up on demand and, critically, picks up exactly where it left off after interruption. Sub-millisecond start times mean a code-generation agent can write, execute, observe output, and iterate in tight loops.

Compared to setting up a separate code execution environment alongside LangGraph or CrewAI, Sandboxes shifts the question from "how do I configure the execution environment" to "which infrastructure layer do I trust to manage it." Those are meaningfully different decisions.

Artifacts: Git-compatible versioned storage for agents. Create tens of millions of repos, fork from any remote, access with standard Git clients. Moved from private beta to public beta in early May. The practical use case: agents that produce code outputs now have a permanent home for those outputs, survives context resets, accessible from outside Cloudflare's stack.

Dynamic Workers: Isolated runtime for AI-generated code. Millisecond spin-up, scales to millions of concurrent executions. Enables the generate-execute-observe loop agents need without managing container infrastructure. Still feels early but the concept is right.

I Actually Installed the SDK

Theory aside, I ran through the setup myself.

mkdir cloudflare-agent-demo && cd cloudflare-agent-demo
npm init -y
npm install @cloudflare/agents
Enter fullscreen mode Exit fullscreen mode

Clean install. @cloudflare/agents@0.0.16 exports Agent, AIChatAgent, and routeAgentRequest as the main surfaces.

Here's a minimal but representative agent:

// src/index.ts
import { Agent, routeAgentRequest } from "@cloudflare/agents";

interface TaskState {
  processedCount: number;
  lastHeartbeat: string;
}

interface Env {
  TASK_AGENT: DurableObjectNamespace<TaskAgent>;
}

export class TaskAgent extends Agent<Env, TaskState> {
  async onStart() {
    this.setState({ processedCount: 0, lastHeartbeat: new Date().toISOString() });
    // Built-in cron scheduling — no external scheduler needed
    await this.schedule("0 * * * *", "heartbeat", {});
  }

  async heartbeat() {
    const count = this.sql<{ n: number }>`SELECT COUNT(*) as n FROM tasks`;
    this.setState({
      processedCount: count[0]?.n ?? 0,
      lastHeartbeat: new Date().toISOString()
    });
  }

  async onRequest(request: Request): Promise<Response> {
    return Response.json({ state: this.state });
  }

  // Agents receive email directly
  async onEmail(email: ForwardableEmailMessage) {
    this.sql`
      INSERT INTO tasks (id, content, created_at)
      VALUES (${crypto.randomUUID()}, ${email.from}, ${Date.now()})
    `;
  }
}

export default {
  fetch: async (req: Request, env: Env): Promise<Response> => {
    const routed = await routeAgentRequest(req, env);
    return routed ?? new Response("OK", { status: 200 });
  }
};
Enter fullscreen mode Exit fullscreen mode

wrangler dev starts immediately, no Cloudflare account needed for local work:

⛅️ wrangler 4.91.0
Your Worker has access to the following bindings:
  env.TASK_AGENT (TaskAgent)   Durable Object   local

⎔ Starting local server...
[wrangler:info] Ready on http://localhost:9998
[wrangler:info] GET / 200 OK (7ms)
Enter fullscreen mode Exit fullscreen mode

One important caveat: @cloudflare/agents is Workers runtime-only. Trying to run it with standard Node.js throws ERR_UNSUPPORTED_ESM_URL_SCHEME because of the cloudflare: protocol imports. You need Wrangler. If you're used to SDKs like the Claude Agent SDK that run anywhere in Python or Node, this is an adjustment.

Architecture Choices Worth Understanding

A few design decisions in the SDK that reflect Cloudflare's broader approach:

Embedded SQLite: Declare new_sqlite_classes in wrangler.toml and every Agent instance gets its own SQLite. No external database configuration. Query with this.sql. The Durable Object isolation model gives you natural multi-tenancy — each agent instance has independent data. Sounds wasteful but it's actually clean for state isolation.

In-process scheduling: Register cron jobs directly from agent code. No external cron service. Wraps the Durable Object alarm API, which keeps scheduling and state management co-located. High cohesion, lower operational surface.

Email handler: onEmail lets agents receive email directly via Workers Email Routing. An agent that turns email into tasks is straightforward to write.

The way Dapr Agents handles state and messaging through Kubernetes sidecar patterns contrasts interestingly here. Cloudflare's model is more code-centric; Dapr is more infrastructure-centric. Both have legitimate use cases.

Where I'm Skeptical

I'll be direct about the rough edges.

Vendor lock-in is significant. The cloudflare:workers runtime dependency means your agent code doesn't run outside Cloudflare's stack. Migrating to a different platform later means substantial rewrites. Containerized approaches like running MCP servers on Kubernetes don't have this problem — you trade operational simplicity now for portability.

Multi-agent orchestration is thin. The single-agent story is compelling. But the SDK-level support for complex multi-agent coordination — handoffs, shared memory, hierarchical orchestration — is limited. Project Think is meant to address this but it's early. If your use case involves agents coordinating at scale, you'll need to build significant structure yourself.

SDK maturity. @cloudflare/agents@0.0.16 is pre-1.0. The API surface will change. For production use, you're accepting that risk.

My Take on When to Use This

Cloudflare is the right infrastructure choice when: response latency at the edge matters for your agents, your team already operates Cloudflare Workers, you want to minimize infrastructure management and focus on agent logic, or your architecture involves many independent agents each owning their own state.

It's not the right choice when: you need complex multi-agent orchestration and you're already invested in LangGraph, you're locked to AWS or GCP infrastructure, or your agents need to run in Python or standard Node.js environments.

The overall direction from Agents Week is coherent. Cloudflare is positioning itself as the infrastructure layer for the agent era — what Kubernetes became for containers. The SDK being at v0 means production adoption should be cautious, but the design thinking is consistent. Worth running through the setup and forming your own opinion.

Signed Agents: Cryptographic Identity for Agent Traffic

One announcement that got less coverage but caught my attention: Signed Agents. The idea is that HTTP requests made by agents carry a cryptographic signature proving their origin — "this was sent by an agent, not a human."

Right now there's no standard way to distinguish agent traffic from human traffic on the internet. User-Agent strings and IP patterns are guesses at best. Signed Agents gives servers a verifiable signal: they can check the signature and apply agent-specific rate limits, billing, or access controls. It's an early-stage primitive but it's the right one to build. Once agents are common enough to treat as distinct traffic types, having cryptographic identity for them becomes infrastructure rather than a feature.

Email Service Public Beta

Workers Email Service graduated to public beta during Agents Week. Any agent can now send email without integrating a third-party service like SendGrid or AWS SES.

Combined with the onEmail handler already in the SDK, agents can now handle both inbound and outbound email entirely within Cloudflare's stack. An agent that receives a customer email, processes it, creates a task, and sends a reply — with no external email service in the loop. For customer support agents, notification pipelines, or email-based task management, this is a meaningful simplification.

The Bigger Picture

Looking at Agents Week as a whole, it reads less like a feature release and more like a positioning statement. Twenty-plus announcements, all pointing the same direction: Cloudflare intends to be the infrastructure layer for the agent era the way AWS became the infrastructure layer for the web era.

The single thing I'd actually go build with first from this week: Sandboxes. Not the headline "agents create accounts" story — the persistent isolated Linux environment for agent code execution. That's immediately useful for any code-generation or code-testing agent, and it works today without novel legal or financial risk.

@cloudflare/agents@0.0.16 tells you what you need to know about production readiness. But if you're serious about evaluating agent infrastructure options, run through the local setup and form your own opinion. Twenty minutes, no account required.


Test environment: @cloudflare/agents@0.0.16, wrangler@4.91.0, Node.js v22.22.0, macOS 14

Note: The autonomous agent account creation feature requires a real Cloudflare account and Stripe integration — out of scope for local testing.

Source: Cloudflare Agents Week 2026

Top comments (0)