Most writing about AI agents assumes a long-running process: a Python loop on a beefy VM, holding state in memory, talking to a vector store. Almost none of that survives contact with Cloudflare Workers — and that turns out to be a feature.
The constraint is the architecture
A Worker gives you milliseconds of CPU, no resident memory between requests, and a cold start measured in microseconds. You cannot keep an agent 'alive.' What you can do is externalize every piece of state — task queues in D1, working memory in KV, artifacts in R2 — so the agent becomes a pure function: context in, action out. Durable Objects give you the one thing that must be serialized: per-conversation ordering.
Agent systems work best as request-shaped state machines. Each invocation loads exactly the context it needs, takes one step, writes state back, and dies. The orchestration loop lives in the data, not the process. This sounds slower; in practice the always-warm edge runtime beats a sometimes-cold container for every workload we've measured under a few seconds of model time.
What breaks first
Two things break before anything else. First, token streaming through chained Workers needs care — stream through, never buffer, or you'll hit memory limits on long generations. Second, fan-out: an agent that spawns five sub-tasks can multiply request counts fast, and the naive recursive pattern will eat your daily request budget doing bookkeeping. Batch the bookkeeping into the step transitions instead.
The payoff is operational: no fleet to scale, no orchestrator to babysit, and the same code path serving one conversation or ten thousand. The edge didn't make agents harder. It forced the design discipline that agents needed anyway.