Flue is an open-source framework for building AI agents in TypeScript, published by the Astro team (withastro), the group behind the Astro web framework. The official site calls it “The Open Agent Framework,” and its focus is on writing long-running agents and workflows in a way that does not force you to redo work when something crashes mid-run. Agents themselves are headless (no UI), and channels such as Slack, Discord, and GitHub are connected afterwards. It is licensed under Apache-2.0, so the framework itself is free to use.
Key Features
- TypeScript agents written with hooks: You define an agent by marking a function with
'use agent'and calling hooks such asuseModel(),useTool(),useSkill(), anduseSubagent()inside it. The feel is close to React hooks, and it allows dynamic agents that gain capabilities while running. There are 16 built-in hooks - Durable execution: If a process dies or an error occurs partway through a long task, progress up to that point is preserved and the run can resume. The design assumes work that takes minutes to hours is handed to the agent
- Secure sandboxes: Agents get an isolated workspace where they can read and write files and run real commands. Sessions and persistent state are supported as well, so context can be carried across conversations
- Tools, skills, and subagents: Typed tools (actions), skills that package reusable procedures, and subagents that take on specialized tasks give you three levels for splitting up and delegating work
- MCP and 30+ integrations: You can mount Model Context Protocol servers to connect external tools, and integrations are provided for deployment targets (Cloudflare / AWS / Docker / Vercel), databases (PostgreSQL / MongoDB / Redis), channels (Slack / Teams / Discord / GitHub), and observability (OpenTelemetry / Sentry / Braintrust)
- Works with any LLM: Models are specified as strings, as in
useModel('anthropic/claude-haiku-4-5'), so you are not locked to one vendor. Runtimes can also be chosen from Node.js, Cloudflare Workers, GitHub Actions, GitLab CI/CD, and more
Pricing
| Plan | Price | What it covers |
|---|---|---|
| Open source (Apache-2.0) | $0 | The framework, CLI, and SDK in full. Available from npm and free to use and modify |
| Running costs | Separate | API fees for the LLM provider you use, plus hosting costs for your deployment target (Cloudflare, AWS, and so on) |
Pricing is current as of August 2026. Please check the official site for the latest information.
Flue has no paid plan or license fee of its own. Actual cost comes down to which models you call and how often, and where you run the agent. If you deploy to Cloudflare you can use its built-in AI gateway, so you can get started without preparing separate API keys.
Pros & Cons
✅ Pros
- Durable execution is a built-in assumption, so long-running tasks and overnight batch-style agents are easier to entrust
- The hook-centric API keeps the code short, and TypeScript types carry through, so completion and refactoring work well
- Sandboxes, sessions, and persistent state ship as standard, so there is less surrounding infrastructure to build yourself
- Apache-2.0 open source means no vendor lock-in; both the model and the runtime can be swapped
- Channel connections for Slack, Discord, and GitHub, along with MCP support, are available from the start
⚠️ Cons
- It assumes knowledge of TypeScript and Node.js (22.19.0 or later); this is not a no-code tool
- The project is young ─ 2.0 is its first stable release ─ so third-party examples and community material are still limited
- The API changed substantially from 1.x to 2.0 to become hook-centric, so older posts and samples may not run as written
- Even though the framework is free, model calls and hosting costs grow in proportion to usage
- No UI is included, so if you want to show a chat screen you have to build it yourself with the SDK
Comparison with Similar Services
| Criteria | Flue | Mastra | LangGraph | OpenAI Agents SDK |
|---|---|---|---|---|
| Provider | Astro (withastro) | Mastra | LangChain | OpenAI |
| Language | TypeScript | TypeScript | Python / TypeScript | Python / TypeScript |
| Core idea | Hooks and durable execution | Workflows and agents | State transitions as a graph | Agents and handoffs |
| Sandbox | Built in | Configure separately | Configure separately | Configure separately |
| Model freedom | Any (provider-agnostic) | Any | Any | OpenAI-centric |
| License | Apache-2.0 | Apache-2.0 | MIT | MIT |
All of these overlap as foundations for building agents, but Flue stands out for shipping durable execution that resumes after a crash and a sandbox that covers file operations. If you want to design branching strictly as a graph, LangGraph is a candidate; if you want to move fast on OpenAI models, the OpenAI Agents SDK is.
Who Is It For
- Developers who want agents that run for tens of minutes to hours without redoing work when they crash
- Teams working primarily in TypeScript that would rather not move to a Python-centric agent stack
- People building internal automation agents that connect to Slack or GitHub
- Anyone who wants to avoid being tied to one LLM vendor and keep models and runtimes swappable later
- People who want to run agents in serverless environments such as Cloudflare Workers
Summary
Flue is a framework that takes on, from the outset, the things you actually need in production ─ durable execution, sandboxes, sessions, and MCP integration ─ as a foundation for writing agents in TypeScript. Coming from the Astro team, its hook-centric API and build tooling lean toward developer experience. It is still a young project with limited material available, but for building agents in TypeScript that handle long-running tasks it is a strong option. A good first step is to follow the official getting-started guide and try flue run locally.