Comparisons / Flue

Flue vs Building from Scratch

Flue is a declarative TypeScript agent framework from Fred K. Schott and the Astro team, now at Cloudflare. Announced May 1 2026, 1.0 Beta on June 16 2026. It's built on the Pi harness (the same runtime that powers OpenClaw) and Cloudflare's Agents SDK, deploys to Cloudflare Durable Objects out of the box, and also runs on Node, GitHub Actions, and GitLab CI. Agents are defined with `createAgent()` + valibot tool schemas; state is a Durable Stream you can replay.

The verdict

Flue is the natural choice when the deploy target is Cloudflare and you want a TypeScript-first, declarative agent framework tuned for Durable Objects. Its cross-runtime story (Cloudflare + Node + CI) is genuinely useful if agents run in more than one place. For a single-agent loop that doesn't need persistence, plain TypeScript is simpler.

ConceptFluePlain Python
AgentcreateAgent({ model, instructions, tools }) — declarative config, framework runs the loopA function that POSTs to /messages and dispatches tools from a dict
ToolsRegistered with valibot schemas: { name, description, schema, execute }A dict of callables with a JSON schema built by hand or generated from types
StateDurable Streams — replayable, checkpointed event log stored in Cloudflare Durable ObjectsAppend every step to an array or a database table; replay by re-reading in order
DeploymentOne config controls deploys to Cloudflare, Node, GitHub Actions, or GitLab CIA container or a serverless function you deploy per environment
RuntimeThe Pi harness — same runtime as OpenClaw, so agents share tooling with that ecosystemWhatever process manager and error handling you assemble yourself
Cloudflare-nativeDurable Objects give per-agent persistence and locking without an external DBRedis, Postgres, or a file-based lock — pick one, wire it, maintain it

What Flue does

Flue is declarative-first: you describe the agent (createAgent({ model, instructions, tools })) and the framework owns the loop. Tools register with valibot schemas — a smaller, faster-typed alternative to Zod — and state is stored as a Durable Stream: a replayable event log persisted in Cloudflare Durable Objects, so an agent can crash and pick back up.

What makes it distinct from other TypeScript agent frameworks is the cross-runtime deployment story. The same agent config deploys to Cloudflare Durable Objects (its home turf), plain Node, GitHub Actions, or GitLab CI — useful when the same logic runs both in production and inside a CI pipeline. It's built on the Pi harness, the same runtime powering OpenClaw, so agents in that ecosystem share tooling and observability.

The plain TypeScript equivalent

A declarative agent is just a config object plus a dispatcher. Read the config, register the tools in a dict, run the loop. Valibot schemas are Zod-shaped and interchangeable — pick either.

Durable Streams are a checkpointed event log. Naive version: append { step, state, timestamp } to Postgres or a file after each iteration; on restart, replay in order. Cloudflare Durable Objects give you the same replayability with per-agent locking and no external DB, which is real value if you're already on Cloudflare Workers.

Cross-runtime deployment is a build script that targets wrangler vs node vs a GitHub Action YAML. The declarative agent + event-log state + multi-target build fits in about 80 lines of TypeScript if you're not paying for Durable Object locking.

When to use Flue

Flue is the pick when the deploy target is Cloudflare Workers + Durable Objects, and you want an agent framework that treats that as the primary runtime rather than a bolt-on. Durable Objects give per-agent persistence and locking for free — that's a real primitive to build on, and Flue exposes it directly.

It's also the right call when the same agent needs to run in both production and CI — e.g., a research agent that runs on user demand in a Worker and also nightly in a GitHub Action. The cross-runtime config saves you from maintaining two builds. Teams building on the Pi/OpenClaw stack get tooling reuse across their agent workloads.

When plain TypeScript is enough

If your agent runs in one place, doesn't need replayable state, and doesn't touch Cloudflare, Flue's runtime story doesn't pay off. You're paying for conventions and a valibot dependency without using the Durable Object piece.

A 60-line fetch-based agent with a JSON file for state handles the majority of production workloads without another framework in the tree. Reach for Flue when Durable Objects, Pi tooling, or cross-runtime deploy is the actual constraint — not before.

Frequently asked questions

What is Flue and who made it?

Flue is a declarative TypeScript agent framework announced May 1 2026, 1.0 Beta on June 16 2026. It was built by Fred K. Schott and the Astro core team after they joined Cloudflare in January 2026. It runs on the Pi harness and Cloudflare's Agents SDK, and deploys to Cloudflare Durable Objects, Node, GitHub Actions, or GitLab CI.

How does Flue compare to Mastra?

Both are TypeScript-first agent frameworks. Mastra is deploy-agnostic and ships its own Studio debugger + RAG pipeline + workflow engine; it's positioned as a full toolkit. Flue is thinner and Cloudflare-native — its main leverage is Durable Objects for per-agent state and locking, plus a cross-runtime deploy story that includes CI environments. Choose Mastra for batteries-included TypeScript agents; choose Flue when Cloudflare is the target.

Do I need Cloudflare to use Flue?

No — Flue also runs on Node, GitHub Actions, and GitLab CI. But its most distinctive value is the Durable Objects integration, which only works on Cloudflare. Without Cloudflare, you get a competent declarative TypeScript agent framework, but you're leaving the biggest lever on the table.

Worth reading

  • Flue vs Eve — Firecrawl blog

    Independent side-by-side of the two 2026 TypeScript agent frameworks that launched within weeks of each other.

  • Astro joins Cloudflare

    Cloudflare's announcement that Fred K. Schott and the Astro core team joined the company (Jan 2026), the move that led to Flue.

More on this topic