Agents

Fred Schott Launches Flue 2 With React-Style Agent Hooks

Astro creator Fred Schott has launched Flue 2, introducing React-style hooks to the open-source agent framework to help developers build highly dynamic, self-configuring AI agents.

Latent Space3 days agoAgents
Image: Latent Space

Fred Schott, the creator of the Astro web framework, has released Flue 2, marking the first stable release of his open-source agent framework. The update introduces React-style Agent Hooks written in TypeScript, allowing developers to build highly composable AI agents. In Flue 2, an agent is represented as a JavaScript function that re-renders before every model call. This release builds on the initial Flue 1 launch from early May, shifting the framework's focus away from file-based routing and toward deep composability.

Flue 2 comes equipped with 16 built-in hooks, including useSkill(), useTool(), and useSubagent(), while also supporting custom hooks. These hooks enable agents to dynamically alter their configuration, manage their own state, and attach new capabilities at runtime as a conversation progresses. For example, a support bot can dynamically load an account management tool only after verifying a user's identity. Hosted agents in Flue 2 are now built using the open-source build tool Vite.

A core architectural decision in Flue 2 is its reliance on a built-in agent harness, which Schott argues is fundamental to defining an agent. Flue is built as an opinionated layer on top of Pi, a minimal open-source harness. This design places Flue alongside Vercel's eve as a harness-first framework, contrasting with older tools like Vercel's AI SDK, Cloudflare's Agents SDK, or Mastra, which are only now retrofitting harnesses. Unlike eve, which is optimized for Vercel's ecosystem, Flue is designed to remain host-portable across different cloud providers, including Cloudflare, which acquired Schott's company in January.

For developers, this shift to a React-like model simplifies the creation of complex, real-world applications like triage and customer support bots. Instead of writing rigid scripts to drive a large language model, developers place the agent into a harness where it can drive itself. By using familiar frontend paradigms like hooks, web developers can easily transition into AI engineering, building headless, hostable agents that adapt in real-time to user demands.

This is our own summary of reporting by Latent Space

More in Agents