Published · 6d agoBuild2 min read
Flue's agent is a function. The material names four hooks, not 16
The withastro/flue README composes an agent from useModel, useSandbox, useSkill and useTool. The number that matters more is the 41-80% cache saving a per-call rebuild can throw away.
Written for builders.See today for builders

What happened
- The withastro/flue README says its built-in TypeScript harness gives any model the context and environment it needs for autonomous work: sessions, tools, skills, instructions, filesystem access, and a secure sandbox to run in; it also says "Not another SDK".
- The README's example file agents/triage.ts begins with 'use agent', imports useModel, useSandbox, useSkill and useTool from @flue/runtime, and exports function Triage() which calls useModel, useSandbox, useSkill twice (triage and verify) and useTool twice (openIssue and searchCode), then returns a template string instructing the agent to triage a bug report end-to-end.
- The README states "The agent IS the function. Compose the complete harness it needs to do real work, complete with virtual, local, or remote container sandbox."
- The hooks named in the README example are useModel, useSandbox, useSkill and useTool.
- The supplied material names four distinct Flue hooks.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
The figure in play is 16 built-in TypeScript hooks. The supplied material does not contain it. What the withastro/flue README does contain is an example agent that uses four distinct hooks by name: useModel, useSandbox, useSkill and useTool [5][6]. No total is given anywhere in the text we have [c6a], so the honest version of this brief is four documented, count unverified.
The four are worth more than the missing sixteen anyway, because of how they are used. The example file is marked 'use agent' and exports a plain function, Triage, which calls useModel with a model string, useSandbox with a local sandbox, useSkill twice and useTool twice, then returns the task as a template string [2][7]. The README's framing is explicit: "The agent IS the function" [3], composing sessions, tools, skills, instructions, filesystem access and a sandbox to run in [1]. That is a harness assembled by executing code rather than declared as config, and the README does not say how often that code is evaluated [c6a].
That is the constraint. On DeepResearch Bench, across more than 500 agent sessions with 10,000-token system prompts, prompt caching cut API cost by 41-80% and improved time to first token by 13-31% across OpenAI, Anthropic and Google [8][9]. Losing the cache entirely therefore costs roughly 1.7x to 5x per call [12]. The same paper reports that naive full-context caching can paradoxically increase latency, and that what works is cache block discipline: dynamic content at the end of the system prompt, no dynamic traditional function calling, tool results excluded [10]. Benefits scale linearly across prompt sizes from 500 to 50,000 tokens and 3 to 50 tool calls, once the provider's caching minimum is met [11].
A framework where the prompt prefix is the return value of a function you rewrite is a framework that needs to guarantee that prefix is byte-stable between turns.
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
The withastro/flue README says its built-in TypeScript harness gives any model the context and environment it needs for autonomous work: sessions, tools, skills, instructions, filesystem access, and a secure sandbox to run in; it also says "Not another SDK".
ReportedView cited source - [2]
The README's example file agents/triage.ts begins with 'use agent', imports useModel, useSandbox, useSkill and useTool from @flue/runtime, and exports function Triage() which calls useModel, useSandbox, useSkill twice (triage and verify) and useTool twice (openIssue and searchCode), then returns a template string instructing the agent to triage a bug report end-to-end.
ReportedView cited source - [3]
The README states "The agent IS the function. Compose the complete harness it needs to do real work, complete with virtual, local, or remote container sandbox."
ReportedView cited source - [5]
The hooks named in the README example are useModel, useSandbox, useSkill and useTool.
ReportedView cited source - [7]
In the example, useModel is called with 'anthropic/claude-sonnet-4-6' and useSandbox with local().
ReportedView cited source - [8]
An arXiv evaluation of prompt caching reports that prompt caching reduces API costs by 41-80% and improves time to first token by 13-31% across three providers, OpenAI, Anthropic and Google.
ReportedSource: "Don't Break the Cache: An Evaluation of Prompt Caching for Long-Horizon Agentic Tasks", arXivView cited source
Sources & coverage · 3 publishers
The reporting this story was synthesized from, earliest first. Every link goes to the original.
- github.com6d agoGitHub - withastro/flue: The sandbox agent framework. · GitHub
- blog.cloudflare.com6d agoAstro is joining Cloudflare

