Flue is the Astro team's headless TypeScript agent harness — durable-first,
with a defineAgent surface that looks just like ours. But the whole story is one fact: it's
built on Pi (the harness inside OpenClaw) and Durable Streams, not
the Vercel AI SDK. Where Mastra shares our base and is a viable pass-2 adopt, Flue is a parallel
stack. So: don't adopt it — but borrow its durability design.
By Adolfo Tamayo Briceno · Lawyer Experience (LEX)
built on Pi, not the AI SDKdurable streams, day one1.0 beta · ~1 wk old
OursMastra
Vercel AI SDK v6
same base
Flue
Pi / pi-ai · Durable Streams
a different base
Update · AI SDK v7 (GA 2026-06-25). v7 now ships durable/resumable runs natively
via WorkflowAgent, self-hostable in eu-west-2 through
@workflow/world-postgres (own Postgres, zero US residency). That makes the headline takeaway
here — "borrow Flue's Durable Streams design" — largely redundant: the capability is now in our
own base. The verdict stands (don't adopt Flue), but the reason to study it shrinks to a reference. And v7's
HarnessAgent can run Pi (what Flue is built on) directly. See
the migration doc for the v7 base.
The one fact that frames everything
Flue does not use the Vercel AI SDK. Model calls go through Pi's
pi-ai — its own multi-provider abstraction (Anthropic, OpenAI, Google, OpenRouter,
any OpenAI-compatible endpoint), with its own tool-schema and streaming layer. Pi is Mario Zechner's MIT
harness (the engine inside OpenClaw); Flue is the Astro team's ergonomic + durability + deploy layer on top
of it. So this is the mirror image of the Mastra evaluation: Mastra shares our AI SDK base, so
it drops into our stack for the pass-2 layer. Flue is a parallel base — adopting it means
re-platforming off the AI SDK.
Mastra is "the layer above our loop." Flue is "a different loop." That single difference
decides the verdict.
The irony worth noting: Pi rejected the AI SDK for the same reasons we bypass the Vercel
gateway — direct provider SDKs, no gateway in the path, friendlier to self-hosted models. They reached
our conclusion, just on a different stack. So the philosophy rhymes; the implementation doesn't compose.
What Flue is
Apache-2.0, from the Astro team (Fred Schott), 1.0 Beta shipped 2026-06-16 —
about a week old. Positioned as "Astro/Next, but for agents": a headless harness for autonomous agents
triggered by API/webhook/cron, not a chat app.
The agentic loop + tool calling + state, via pi-ai. Model ids are opaque strings (anthropic/claude-sonnet-4-6); a providers object configures endpoints.
Durable Streams
The transport: every prompt, model response and tool result is appended to a replayable log. The source of truth is the log.
Tools / skills
defineTool (Valibot schemas) + skills as .md files imported with { type: 'skill' }. MCP supported (mechanics unverified).
The one thing genuinely worth taking from Flue — and it's exactly the pass-2 capability we
deferred (sessions, durable streams, resume), self-hostable on our own Postgres.
Durable Streams: an append-only event log is the source of truth, so an interrupted run resumes
from the log and a dropped client reconnects by replaying it. On Node the log persists through a pluggable
store (@flue/postgres) — our Postgres in eu-west-2, no vendor cloud.
This is the shape to borrow for our deferred pass-2 sessions/resume work — built on the AI SDK,
not on Pi.
Residency
Better than you'd fear on state, same old trap on remote code-exec.
State is fine. On Node, Durable Streams persist through a store you provide; @flue/postgres puts the log in your Postgres in eu-west-2, no vendor account. (The Cloudflare path uses Durable Object SQLite, which we wouldn't use.)
Sandboxes split cleanly. The default in-memory and local() sandboxes run on your own host — residency-safe. Only remote() connectors (E2B / Modal / Vercel Sandbox / CF) stage data on the connector's infra — the same US-pinning we rejected Vercel Sandbox for, unless you self-host E2B BYOC (experimental).
Verdict
Against our two locked constraints — the AI SDK bet and eu-west-2 self-host —
Flue loses on the base layer while matching us on residency.
Avoid as a framework
Adopting it replaces the AI SDK with Pi — a re-platform, not a layer. Our registry, streaming surface, v6 tool calls, VFS don't carry.
Embeds into Hono, not Express; remote sandboxes reintroduce US-pinning; 1-week-old beta with unstable APIs — not a base for legal PII today.
Borrow the design
Durable Streams — append-only log as source of truth + pluggable save/load/delete Postgres store — as the reference for our deferred pass-2 sessions/durable-streams/resume, built on the AI SDK.
The skills-as-.md ergonomics, too.
Adopt? still Mastra
For the pass-2 layer, Mastra stays the better adopt: same AI SDK base, embeds as an Express-friendly library, reuses our Postgres + Inngest.
Flue's win (durability) is a design to copy, not a dependency to take.
One line: Flue is a clean, durable-first harness from a strong team, but it's built on Pi
rather than the Vercel AI SDK — so adopting it means leaving our base, embedding into Hono, and
betting legal PII on a one-week-old beta. Don't. Do borrow its Durable Streams architecture
as the blueprint for our deferred durable-sessions work, implemented on the AI SDK; Mastra remains the
pass-2 adoption candidate.
Couldn't verify (flagged)
A turnkey Flue HITL/approval API (Pi's permissionMode exists; Flue's own surface unconfirmed).
Concrete Flue MCP wiring (asserted; no code seen).
Remote-sandbox region/BYOC specifics beyond "delegated to the provider; E2B BYOC experimental."
The durability concept page 404'd; storage facts come from the 1.0 Beta post, Cloudflare's integration post, and the Node-store source, which agree.