Flue Framework: Cloudflare's Agent Push

Cloudflare introduces the Flue framework, enabling developers to build production-grade AI agents with durable execution and secure code capabilities.

Flue Framework: Cloudflare's Agent Push
Cloudflare
Visual TL;DR
AI Agent ChallengesDriver
From the article 9+ mentionsBuilding resilient agents capable of surviving production environments presents significant challenges, particularly around graceful resumption after interruptions, secure untrusted code execution, and effective tool utilization.
Cloudflare's Agents SDKCore
foundation for production-ready AI agents
From the article 9+ mentionsCloudflare's experience hardening Project Think, its first-party agent harness, informed the development of these core primitives now available through the Agents SDK.
Flue FrameworkCore
declarative agent development, shipped 1.0 Beta
From the article 9+ mentionsCloudflare is intensifying its commitment to AI with the introduction of new agent harnesses and frameworks, spearheaded by Flue.
Durable ExecutionContext
graceful resumption after interruptions
From the article 7 mentionsThe company's Agents SDK now provides a robust foundation for building production-ready AI, offering durable execution, dynamic code execution, and a persistent filesystem.
Secure Code ExecutionContext
handling untrusted code safely
From the article 3 mentionsThese isolates start in under 10ms, offering a fast, cost-effective, and secure sandbox for code execution, avoiding the overhead of booting containers for each tool call.
Durable FilesystemContext
persistent storage for agent state
From the article 7 mentionsInstead of expensive container solutions, @cloudflare/shell provides a durable virtual filesystem within a Durable Object, backed by SQLite.
Dynamic WorkflowsContext
flexible agent task sequencing
From the article 5 mentionsThe Agents SDK offers @cloudflare/codemode, which wraps Dynamic Workers to execute LLM-generated code in isolated Worker isolates.
Production-Grade AgentsEffect
enabling load-bearing AI infrastructure
From the article 9+ mentionsThis move signals a shift towards agents as load-bearing infrastructure, moving beyond mere prototypes.
Contents(6)

Cloudflare is intensifying its commitment to AI with the introduction of new agent harnesses and frameworks, spearheaded by Flue. This move signals a shift towards agents as load-bearing infrastructure, moving beyond mere prototypes. The company's Agents SDK now provides a robust foundation for building production-ready AI, offering durable execution, dynamic code execution, and a persistent filesystem.

Building resilient agents capable of surviving production environments presents significant challenges, particularly around graceful resumption after interruptions, secure untrusted code execution, and effective tool utilization. Cloudflare's experience hardening Project Think, its first-party agent harness, informed the development of these core primitives now available through the Agents SDK.

Introducing Flue: A Declarative Agent Framework

Flue, a new open-source framework from the team behind Astro, represents a fresh approach to agent development. Shipped this week in 1.0 Beta, Flue operates on the Pi harness, also used by OpenClaw. Its distinguishing feature is a declarative model: developers define what an agent knows, its model, skills, sandbox, and instructions, rather than scripting its actions. This allows agents to autonomously solve tasks without explicit orchestration loops.

The Flue developer experience prioritizes integration and resilience. Agents can be deployed into platforms like Slack, GitHub, or Discord using pre-configured Channels. While capable of headless operation for background tasks, @flue/react provides native frontend hooks to stream agent state and messages, eliminating the need for custom real-time plumbing. Flue also streamlines ecosystem integration, allowing additions and upgrades with commands like flue add channel slack, which generates a Markdown blueprint for coding agents to modify.

Crucially, Flue is designed for production. It tackles distributed systems failures like host crashes or API timeouts through Durable Streams, an append-only log of execution history. Every prompt, tool response, and model choice is recorded as an unchangeable ledger, ensuring agent state is never volatile. If a process fails, another can seamlessly resume from the exact point of interruption, preserving context and preventing token waste.

Cloudflare's Agentic Platform Primitives

Flue's effectiveness on Cloudflare stems from its direct mapping to the Agents SDK's core primitives. When targeting Cloudflare, each Flue agent becomes a Durable Object, enabling automatic scaling with isolated storage and compute. This eliminates the need for server provisioning or managing sticky sessions.

Durable Execution

Agent turns are complex, multi-step processes vulnerable to interruptions. The Agents SDK addresses this with Fibers, providing native checkpointing within a Durable Object. The runFiber() method records progress to SQLite storage, with stash() checkpointing as the turn advances. Upon interruption, onFiberRecovered() delivers the last checkpoint, allowing the agent to resume intelligently.

Secure Code Execution

Overloading agents with numerous tools can degrade performance. A more efficient pattern is to provide one tool that executes code. The Agents SDK offers @cloudflare/codemode, which wraps Dynamic Workers to execute LLM-generated code in isolated Worker isolates. These isolates start in under 10ms, offering a fast, cost-effective, and secure sandbox for code execution, avoiding the overhead of booting containers for each tool call.

Durable Filesystem

Many agent tasks, particularly for coding agents, require filesystem access. Instead of expensive container solutions, @cloudflare/shell provides a durable virtual filesystem within a Durable Object, backed by SQLite. This offers typed file operations, read, write, edit, search, grep, diff, that agents can use as tools, benefiting from the isolate model's efficiency. For tasks requiring a full OS, Cloudflare Containers remain an option, with @cloudflare/workspace in development to sync virtual filesystems with containers.

Dynamic Workflows

For complex, multi-step pipelines, @cloudflare/dynamic-workflows enables agents to generate workflows at runtime. The Workflows engine persists each step, retries failures, and can manage long-running processes or external events like human approval. Agents can initiate a workflow via runWorkflow(), go to sleep, and be reactivated by the workflow reporting progress or requesting input via RPC.

Beyond compute and storage, the Agent class provides access to the broader Cloudflare ecosystem through bindings. This includes AI Gateway for spend tracking, Browser Run for web automation, Email Service, Agent Memory for persistent recall, AI Search for retrieval, and inference across multiple model providers. These bindings grant capabilities without exposing sensitive credentials within agent-generated code.

This architecture, battle-tested with Cloudflare’s first-party agent harness, Project Think, is now accessible to the broader open-source community through the Agents SDK and frameworks like Flue. Developers building with Flue can deploy to Cloudflare with minimal effort, while those creating their own harnesses or frameworks can leverage Cloudflare's robust platform integration.

© 2026 StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training requires a license. See our terms.
Daniel Singer

Written by

Daniel Singer

Editor, StartupHub.ai

Daniel Singer is the editor of StartupHub.ai, a technology expert and thought leader on AI and its applications across sectors, from fintech and healthcare to developer tooling and consumer software. He writes and tests the tools covered here thoroughly and regularly, and built StartupHub.ai to give founders, operators and buyers a clearer read on what they are actually being sold.