Tools

AI-generated text

Fred Schott releases Flue 2 with React-style Agent Hooks

Fred Schott, creator of Astro and now at Cloudflare, has published Flue 2, a stable release of his agent framework that introduces React-style ‘Agent Hooks’ and a built-in harness model.

Fred Schott releases Flue 2 with React-style Agent Hooks

Fred Schott — creator of the Astro web framework and now at Cloudflare after an acquisition in January — has released Flue 2, the first stable release of his agent framework. Flue, first introduced earlier this year, arrives in version 2 with a foundation built around React-style “Agent Hooks.”

What the Agent Hooks do

In Flue, an agent is represented as a JavaScript function that "re-renders on every turn," meaning it runs before each model call. Schott introduced hooks after concluding that React’s composability fits agent development well. Hooks are authored in TypeScript and, according to the Flue 2 launch notes, let developers build dynamic agents that manage their own state, listen to agent lifecycle events, and attach resources and capabilities at runtime.

Flue 2 ships with 16 built-in hooks, including useSkill(), useTool(), and useSubagent(), and also supports custom hooks. These hooks allow an agent’s configuration to change as a conversation or workflow progresses — a capability Schott says is necessary for building real support or triage bots that cannot be fully configured in advance. For example, a support agent might verify a user first and then dynamically enable an account-management tool.

From file-based patterns to composability

Schott initially tried to apply web framework patterns such as file-based routing to Flue, but early users — especially larger customers — showed that many organizations treat their system as a single agent rather than as many route-like files. Those user patterns pushed Schott toward focusing on composability, and back to React’s model of building systems from composable parts rather than routing-centric abstractions.

As Schott notes in the Flue 2 API, the design now leans more on React’s compositional approach than on Astro or Next.js concepts like routing.

The harness concept and why it matters

A central idea in Flue is that an agent must run inside a harness — an environment that provides the necessary context and capabilities to accomplish tasks. Schott argues that instead of developers directly driving the LLM with scripts, agents placed in a harness can drive themselves and work through problems autonomously.

Flue builds on Pi, an open-source minimal harness; Flue is an opinionated layer on top of Pi that adds developer-focused features. Hosted agents in Flue 2 are built with Vite, the open-source build tool. Schott frames Pi’s role similarly to how Vite underpins Astro: a minimal, appropriate abstraction that other tools can build on.

He emphasizes that the harness is not just an optional feature but fundamental to what an agent is: “there is no agent without a harness,” in his words.

Origins and developer workflows

Flue began earlier this year inside the Astro repository as an issue-triage system. It started as an LLM-driven workflow and then gained the ability to take actions in the repository. Schott described early Flue as “like Claude Code, but 100% headless and programmable.” Many developers build Flue agents with AI coding agents such as Claude Code; Schott says onboarding typically involves passing a prompt to the agent which then guides users through setup, and the project documentation supports Markdown.

Positioning versus other agent frameworks

The closest analog to Flue is Vercel’s eve, which likewise treats a harness as foundational. Schott calls eve the most directly competitive project, noting both emerged around the same time and share the idea of a built-in harness. He also referenced earlier “OG agent frameworks” — Vercel AI SDK, Cloudflare Agents SDK, and Mastra — which predate Flue and are now adding harness-like features; Schott views those as later additions rather than baked-in concepts.

Schott is cautious about a single, cross-harness API (a so-called meta-harness), arguing that one API for all harnesses could blur Flue’s specific model for how skills and subagents are defined. He is nonetheless interested in the meta-harness conversation and has experimented with Exo, while noting it addresses somewhat different scenarios.

Cloudflare, host portability, and roadmap

Throughout the conversation Schott referenced the ability to leverage Cloudflare tooling and infrastructure, but he was explicit that Flue is intended to remain an open-source framework that works on any host. He believes the best tools sit above the host to maximize developer adoption and innovation.

Host portability is a core Flue principle and a point of difference with Vercel’s eve: while eve is self-hostable and optimized for Vercel’s platform, Flue aims to remain host-agnostic. Schott also noted that Flue agents can be deployed to Vercel, so the projects are not mutually exclusive.

Schott said a managed agents product is not on Flue’s roadmap at present; the team is focused on building the best harness first.

Conclusion

Flue 2’s stable release and its React-style Agent Hooks push toward more composable, dynamic agents that can adapt during interactions. Built on Pi and using Vite for hosted agents, Flue 2 aims to be an open-source, host-portable framework that embeds the harness model as a fundamental part of agent architecture.

(Entities mentioned in the article: Fred Schott, Cloudflare, Astro, Flue, Pi, Vite, Vercel, eve, Vercel AI SDK, Cloudflare Agents SDK, Mastra, Claude Code, Databricks Omnigent, Exo.)