# Flue

> Flue is a TypeScript agent harness framework for building headless, programmable AI agents that deploy anywhere — Node.js, Cloudflare, GitHub Actions, and more.

Flue is a TypeScript framework for building the next generation of AI agents, designed around a built-in agent harness. It is runtime-agnostic — think Astro or Next.js, but for agents — letting you write once and deploy to Node.js, Cloudflare Workers, GitHub Actions, GitLab CI/CD, and more. Agents are fully headless and programmable with no TUI, no GUI, and no assumption of a human operator. Most agent logic lives in Markdown (skills, context, and `AGENTS.md`), keeping TypeScript code minimal.

- **Agent Harness Framework**: *Build agents that act autonomously to solve problems and complete tasks, modeled after the familiar Claude Code / OpenCode / Codex developer experience but 100% headless.*
- **Virtual Sandbox by Default**: *Powered by just-bash, the built-in virtual sandbox is faster, cheaper, and more scalable than full containers — ideal for high-traffic agents.*
- **Container Sandbox Support**: *Opt into real Linux environments via connectors (e.g., Daytona) for full coding agents with git, Node.js, a browser, and a cloned repo.*
- **Skills & Roles**: *Define reusable agent skills in Markdown and assign roles at the agent, session, or per-call level for fine-grained orchestration.*
- **Session & Task Management**: *Persist message history and sandbox state across requests; use `session.task()` for focused one-shot child agents with their own message history.*
- **MCP Tool Integration**: *Connect to remote MCP servers at runtime via `connectMcpServer()`, keeping secrets in `env` rather than prompts or filesystem context.*
- **Typed Results**: *Pass a Valibot schema to `session.prompt()` or `session.skill()` to get schema-validated, typed data back from any agent call.*
- **CLI Tooling**: *Use `flue dev` for a watch-mode dev server, `flue run` for one-shot CI invocations, and `flue build` to produce deployable artifacts for Node.js or Cloudflare.*
- **Multi-Model Support**: *Works with Anthropic Claude, OpenAI, Google Gemini, Moonshot Kimi, and any model available via OpenRouter.*
- **Open Source**: *Licensed under Apache 2.0 — free to use, modify, and distribute.*

## Features
- Agent harness framework
- Virtual sandbox (just-bash powered)
- Container sandbox support via connectors
- Skills defined in Markdown
- Roles and subagents
- Session persistence and task delegation
- Remote MCP server integration
- Typed schema-validated results (Valibot)
- CLI: flue dev, flue run, flue build
- Multi-model support (Anthropic, OpenAI, Gemini, OpenRouter)
- Deploy to Node.js, Cloudflare Workers, GitHub Actions, GitLab CI/CD
- Durable Objects-backed session state on Cloudflare
- Custom virtual sandbox support
- Environment variable loading via --env flag

## Integrations
Anthropic Claude, OpenAI, Google Gemini, Moonshot Kimi, OpenRouter, Daytona, Cloudflare Workers, Cloudflare Durable Objects, GitHub Actions, GitLab CI/CD, MCP (Model Context Protocol), just-bash, Wrangler, R2 (Cloudflare)

## Platforms
LINUX, API, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Links
- Website: https://www.flueframework.com
- Documentation: https://github.com/withastro/flue
- Repository: https://github.com/withastro/flue
- EveryDev.ai: https://www.everydev.ai/tools/flue
