# Cloudflare Workers

Cloudflare Workers is a runtime & deploy option for building AI agents. Edge runtime with Durable Objects for long-lived, stateful agent sessions.

## Facts

- Layer: Runtime & deploy (How you run it)
- Vendor: Cloudflare
- Licence: proprietary
- Pricing: freemium
- Self-hostable: no
- SDKs: ts
- Install: `npm i -g wrangler`
- Docs: https://developers.cloudflare.com/agents/
- Last verified: 2026-08-21

## When to reach for it

- You are choosing a runtime & deploy component — how you run it.
- You are happy to depend on a hosted service and would rather not operate this yourself.

## Alternatives in the runtime & deploy layer

| Option | What it does | Licence | Self-host |
| --- | --- | --- | --- |
| Docker Compose | One file, one box, everything local. The honest starting point. | open source | yes |
| Vercel | Streaming-friendly serverless for TypeScript agents with a web front end. | proprietary | no |
| Modal | Python-native serverless with GPUs and sandboxes, scale to zero. | proprietary | no |
| Fly.io | Long-running containers close to users, without owning a Kubernetes cluster. | proprietary | no |
| Temporal | Durable execution — the run survives a crash, a deploy and a week of waiting. | open source | yes |
| Centaur | Paradigm's self-hosted control plane: one shared team agent, an isolated k8s sandbox per Slack thread, and no raw API keys in the agent's environment. | open source | yes |
| Kubernetes | Your existing cluster. Nothing new for the platform team to approve. | open source | yes |

Head to head:

- https://newagent.build/compare/cloudflare-workers-vs-docker-compose
- https://newagent.build/compare/cloudflare-workers-vs-vercel
- https://newagent.build/compare/cloudflare-workers-vs-modal
- https://newagent.build/compare/cloudflare-workers-vs-fly
- https://newagent.build/compare/cloudflare-workers-vs-temporal
- https://newagent.build/compare/cloudflare-workers-vs-centaur
- https://newagent.build/compare/cloudflare-workers-vs-k8s

## Add it to a stack

```bash
curl -fsSL "https://newagent.build/api/stack?runtime=cloudflare-workers&format=sh" | sh
```

## Machine interfaces

- `GET https://newagent.build/api/registry` — every component as JSON
- `GET https://newagent.build/api/vendors` — vendors, with the repo and releases feed to watch
- `GET https://newagent.build/api/advise?q=<plain english>` — recommended stack for a description
- `GET https://newagent.build/api/stack?<layer>=<id>&format=sh|json|md|yml|agents|env` — a stack as files
- `GET https://newagent.build/llms.txt` — the whole registry in one fetch

Any page here also returns markdown if you send `Accept: text/markdown`.