Cloudflare’s Agents SDK Gets a Framework: Flue Brings Declarative Agent Building to the Edge
Flue, an open-source agent framework from the team behind Astro, is the first to build on Cloudflare's Agents SDK, bringing durable execution, sandboxed code, and a declarative model to production-grade agents.

Cloudflare is pushing its Agents SDK beyond a bare runtime. By partnering with the team behind Astro, they've landed Flue — an open-source agent framework that wraps the Pi harness with a declarative, project-oriented developer experience. The result is a three-layer stack: Flue (framework), Pi/Project Think (harness), and the Cloudflare Agents SDK (runtime).
Flue's 1.0 Beta ships this week. Its core idea: you don't script what your agent does — you describe what it knows. Define the model, skills, sandbox, and instructions, and the agent solves the task autonomously. No orchestration loop to write. A triage agent that intercepts a bug report, reproduces it in a sandbox, and diagnoses the issue fits in under 25 lines.
Flue agents are built to live where users already work. Pre-configured channels for Slack, GitHub, Linear, and Discord handle event verification and dispatch boilerplate. The @flue/react package provides native frontend hooks that stream agent state, tool execution, and live messages into a UI without custom real-time plumbing. And the flue add channel slack command generates a Markdown blueprint that a coding agent can read, modify, and integrate.
Production agents face distributed systems failures: host crashes, LLM provider timeouts, unexpected restarts. Flue solves this with Durable Streams — an append-only log of every event in the execution history. If a process dies, another picks up the log and continues from the exact step it left off.
Flue is multi-cloud. On Node.js, each agent runs as a long-lived process. On Cloudflare, each agent becomes a Durable Object, automatically scaling with isolated storage and compute. No server provisioning, no sticky sessions. Flue uses the Agents SDK's runFiber(), stash(), and onFiberRecovered() for durable execution, plus @cloudflare/codemode and @cloudflare/shell for sandboxed code execution against a durable workspace.
The key insight: agent harnesses need durable execution because an agent turn is not a single request. The model streams tokens, calls tools, waits for results, maybe asks for human approval. That sequence can take seconds or minutes, and at any point the process can crash. Fibers provide native checkpointing inside Durable Objects, recording progress to SQLite storage before work starts and checkpointing as the turn advances. On recovery, onFiberRecovered() delivers the last checkpoint so the agent knows where it left off.
Cloudflare also argues that executing code is better than overloading agents with tools. Give the model one tool that executes TypeScript — the model writes a function that calls the APIs it needs, and the harness runs it. This pattern, introduced as Code Mode, reduces tool selection errors and keeps context windows manageable.
Discussion
0 Comments
Be the first to start the discussion.