Ai Agents 3 min read

Flue Integration Opens Cloudflare Agents SDK to Custom Harnesses

Cloudflare has decoupled its Agents SDK into foundational platform primitives, allowing external frameworks like Flue to orchestrate stateful AI workflows.

Cloudflare unbundled its Agents SDK into an open runtime, shifting away from a closed first-party ecosystem. The June 17 release introduces Flue as the first external agent framework designed specifically for these newly exposed infrastructure primitives. This transition allows developers to build stateful, persistent AI applications using familiar external tooling backed by Cloudflare’s global network.

Platform Primitives and Execution

The update restructures agent development into three distinct layers: the framework, the harness, and platform primitives. The Agents SDK now serves purely as the primitive layer, exposing capabilities previously locked inside Cloudflare’s internal harness, Project Think.

Architecture LayerComponent ExamplesPrimary Function
FrameworkFlueProject structure, conventions, and CLI tooling
HarnessProject Think, Pi, CodexOrchestrates tool calling and evaluates LLM outputs
Platform PrimitivesAgents SDKHandles durable execution, file systems, and sandboxing

Developers can manage durable execution natively using the new runFiber() and stash() APIs. These Fibers allow execution to pause for network latency or human-in-the-loop approvals and resume seamlessly without losing state or wasting context window tokens.

The primitives layer integrates @cloudflare/codemode via Dynamic Workers, executing LLM-generated JavaScript in under 10 milliseconds without container cold starts. Agents also gain access to a lightweight virtual filesystem via @cloudflare/shell, which provides SQLite-backed storage for native file operations like search and pattern matching.

Flue and Infrastructure Integration

Flue, an open-source TypeScript framework developed by the creators of Astro, acts as the primary external integration for this runtime. Built for headless autonomy, Flue requires agents@^0.14.1 to access the fiber execution APIs. It routes agent sessions through Cloudflare’s Durable Objects and full Linux microVM Sandboxes to maintain persistent state across complex workflows.

A dedicated dashboard now provides granular visibility into these persistent sessions, tracking lifecycle events and token consumption directly in the Cloudflare console. For developers managing enterprise infrastructure, the concurrent release of the Cloudflare One stack provides a standard library of zero-trust agent skills to handle deployment, planning, and environment administration.

The platform routes intelligence requests through Cloudflare’s unified inference layer. The gateway currently supports 14 inference providers, granting external harnesses direct routing to frontier models including GPT-5.4 and Claude Managed Agents.

Decoupling the harness from the underlying runtime shifts the architectural burden of persistent multi-agent systems directly to edge infrastructure. If your autonomous systems require multi-step execution, persistent storage, or long-running tasks that survive interruptions, configure your harness to target the runFiber primitive rather than maintaining custom state management logic in your application layer.

Get Insanely Good at AI

Get Insanely Good at AI

The book for developers who want to understand how AI actually works. LLMs, prompt engineering, RAG, AI agents, and production systems.

Keep Reading