GitHub - withastro/flue: The sandbox agent framework.

Open original

Flue is a TypeScript framework that turns large language models into autonomous agents by providing sessions, tools, sandboxed execution, and durable workflows. It adds subagents, observability, fault recovery, and Model Context Protocol integrations so you can run agents locally via CLI or deploy them on hosted runtimes.

  • Flue turns simple TypeScript config (model, sandbox, skills, instructions) into a fully deployable HTTP-exposed agent, no separate infra work needed.
  • Built-in durability tracks agent state across restarts so long-running workflows survive failures.
  • Supports subagent delegation (e.g., one agent triages issues, another verifies fixes) for specialized multi-role workflows.
  • Comes with a full ecosystem out of the box: CLI, runtime, SDK, Postgres/OpenTelemetry adapters, MCP tool auth, and integrations with Slack, Teams, Discord, GitHub, Braintrust, and Sentry.

Flue brings a TypeScript harness to autonomous AI agents, letting you define models, tools, skills, and sandbox environments in code. In the example you import two MARKDOWN-based skills—triage and verify—from your project, pull in GitHub tooling, then wire everything together with defineAgent. You specify model (“anthropic/claude-sonnet-4-6”), a local sandbox, skill modules, and free-form instructions like “Triage a bug report end-to-end.” That single file turns into an HTTP-exposed agent you can run locally or deploy to any hosted runtime. Under the hood, Flue handles sessions, durable recovery, and contextual continuity. It tracks agent state across restarts so a long-running workflow survives failures. You get secure sandboxes—virtual, local or remote—where agents can modify files, call APIs or run code without risking your host. If you need multiple specialized roles, you define subagents and let the main agent delegate tasks: one subagent might triage issues, another verify fixes. The ecosystem includes @flue/cli for build and dev commands, @flue/runtime for the core harness, @flue/sdk for client code, plus adapters for Postgres persistence and OpenTelemetry tracing. Flue also plugs into the Model Context Protocol to authenticate tools. You wire in observability with Braintrust, Sentry or your own system, and you can hook agents to Slack, Teams, Discord or GitHub via event channels. All told, Flue packages the scaffolding you need to move beyond raw LLM calls toward real-world, end-to-end AI workflows.

Ask about this article