# Flue
Flue is an open-source ([[Apache 2.0 License]]) agent development framework from the Astro team (withastro). It is a programmable [[TypeScript]] harness for building durable [[AI Agents|AI agents]] and workflows, "write once, deploy anywhere, use any LLM", and is built on top of Pi, an open agent harness. The pitch: raw LLM API calls work for simple chatbots, but real autonomy (think [[Claude Code]]-style agents) needs sessions, sandboxes, tools, and recovery, which Flue provides.
## Core Building Blocks
- **Agents**: autonomous entities that hold context across conversations and work toward goals
- **Workflows**: bounded, code-guided processes that coordinate agent behavior from input to completion
- **Sandboxes**: secure execution environments (virtual to container-based) for tool use and file modification
- **Tools**: typed API actions for controlled changes
- **Skills**: reusable packages of specialized expertise/guidance
- **Subagents**: task delegation to specialized agents
- **[[Durable Execution]]**: progress persists through server failures via durable streams that resume interrupted work
## Architecture
Layered: an application layer (sessions, tools, skills) atop a foundation (runtime, sandbox, database), all powered by the Pi harness. Concerns are split into development (agents/workflows), execution (sandboxes/targets), and integration (providers/ecosystem).
## Packages
- `@flue/runtime`, harness and sandbox
- `@flue/cli`, CLI tooling
- `@flue/sdk`, client SDK
- `@flue/opentelemetry`, `@flue/postgres`, integrations
## Ecosystem
- **Models/providers**: any LLM, with credential management across providers
- **Targets**: Node.js, [[Cloudflare]] Workers, CI systems
- **Integrations**: [[Model Context Protocol (MCP)|MCP]] server support; observability via OpenTelemetry, Braintrust, Sentry; channels for Slack, Teams, Discord, GitHub
- Written in TypeScript (~90%); ~5.9k GitHub stars at the time of noting
## References
- https://github.com/withastro/flue
- https://www.flueframework.com/
- https://flueframework.com/docs
## Related
- [[AI Agents]]
- [[Agentic Engineering]]
- [[Durable Execution]]
- [[TypeScript]]
- [[Claude Code]]
- [[Model Context Protocol (MCP)]]
- [[Cloudflare]]
- [[Apache 2.0 License]]
- [[Large Language Models (LLMs)]]
- [[Artificial Intelligence (AI)]]