Agent frameworks for developers are still at an early stage. Vercel's eve and Fred Schott's Flue — both launched this year — are setting the early template.
Schott is the creator of the web framework Astro, which led to his company being acquired by Cloudflare in January. He has now released version 2 of Flue, its first stable release, built on React-style "agent hooks."
An agent as a function that re-renders
In Flue, an agent is represented by a JavaScript function. That function re-renders on every turn — meaning before every model call. Hooks were added after Schott realised React's composability would fit agent development well.
In his words: "I originally tweeted that we were building the Astro for agents or the Next.js for agents. But then I realised: maybe no one has even built the React for agents."
The analogy has been used before by Bret Taylor, CEO of Sierra and chairman of OpenAI: "We're sort of in the jQuery era of agents, not the react era."
What hooks do
Hooks are authored in TypeScript. According to the Flue 2 launch post, they "let you build dynamic agents that can manage their own state, listen to agent lifecycle events, and even attach different resources and capabilities dynamically to enhance themselves at runtime."
The release ships 16 built-in hooks, including useSkill(), useTool() and useSubagent(). Custom hooks can be added.
What this opens up is an agent whose configuration can change as a conversation or workflow progresses. Schott says this is needed to build "real support bots, real triage bots," because they cannot be fully configured in advance. The agent cannot be static; it has to adapt in real time to what the user wants or the situation demands.
A concrete example: a support agent might bring in an account management tool after first verifying a user.
"File-based magic is an antipattern"
Schott's thinking about agent framework design has evolved rapidly since he launched Flue 1 in early May. Initially he wanted to carry existing web framework concepts into the new agent framework, using file-based routing as his example:
"So we kind of naively ported that over to Flue, thinking — great, well, I'll put your five agents in these five files, and that'll be the five routes that they expose. But for a lot of people building with Flue, especially the bigger customers, their whole company is one agent. They don't care about routing. There's one agent."
It is a concrete case of habits from web development failing to transfer directly to agent design: the same concept becomes overhead in a different problem.
In brief
- What: Flue 2, the first stable release of the agent framework
- Who: Astro creator Fred Schott; his company joined Cloudflare in January
- Core idea: an agent is a JavaScript function that re-renders before every model call
- Built-in hooks: 16, including useSkill(), useTool() and useSubagent()
- Dropped: file-based routing — for larger customers the whole company is one agent