flue README

The project's README from github.com/withastro/flue. As one markdown file: README.md.

Flue — The Agent Harness Framework

Not another SDK. Build autonomous agents with Flue's programmable TypeScript harness.

// agents/triage.ts
'use agent';
import { useModel, useSandbox, useSkill, useTool } from '@flue/runtime';
import { local } from '@flue/runtime/node';
import triage from '../skills/triage/SKILL.md';
import verify from '../skills/verify/SKILL.md';
import { openIssue, searchCode } from '../tools/github.ts';

// The agent IS the function. Compose the complete harness it needs to do
// real work, complete with virtual, local, or remote container sandbox.
export function Triage() {
  useModel('anthropic/claude-sonnet-4-6');
  useSandbox(local());
  useSkill(triage);
  useSkill(verify);
  useTool(openIssue);
  useTool(searchCode);

  // Give agents the context and autonomy to solve complex tasks:
  return `
Triage a bug report end-to-end: reproduce the bug,
diagnose the root cause, verify whether the behavior is
intentional, and attempt a fix.

...`;
}

The framework for building the next generation of agents.

The first agents were built with raw LLM API calls. This worked for simple chatbots and scripted tasks, but not much else.

Agents like Claude Code and Codex broke the mold. These were real agents. Autonomous. You give them a task — not a pre-defined series of steps — and trust them to complete it using the context and tools that you provide.

Flue unlocks this new architecture for agents. Its built-in TypeScript harness gives any model the context and environment it needs for truly autonomous work: sessions, tools, skills, instructions, filesystem access, and a secure sandbox to run in. Run your agents locally via CLI or deploy them to your hosted runtime of choice.

Features

Build agents that can safely take action, maintain continuity, and connect to the systems where work already happens.

Deploy Anywhere

Packages

Package Description
@flue/runtime Runtime: harness, sessions, tools, sandbox
@flue/vite Vite plugin: vite dev / vite build for Node and Cloudflare
@flue/cli CLI (flue binary): local runs, blueprints, offline docs
@flue/sdk Client SDK for consuming deployed agent conversations
@flue/opentelemetry OpenTelemetry tracing adapter
@flue/postgres Postgres persistence adapter

flue (withastro/flue)

Searching Database…

8.5K ·GitHub
这是什么?Flue 是一个用于构建自主 AI 智能体的 TypeScript 框架。智能体可以获得安全沙箱、会话、工具、技能和文件系统访问能力,而不只是直接调用大语言模型的 API。
这是框架还是 SDK?Flue 自称是一个智能体运行框架,而不是 SDK。它自带运行时、工具、沙箱和会话管理,而不只是对大语言模型调用做一层封装。
我该如何开始用 Flue 构建智能体?引入 @flue/cli 包,即可获得用于本地运行、蓝图和离线文档的 'flue' 可执行文件;另外引入 @flue/vite,即可在 Node 或 Cloudflare 上支持 'vite dev' 和 'vite build'。
要使用 Flue 单体仓库,需要安装哪些东西?需要 Node.js 22+ 和 pnpm 11.x;核心运行时本身依赖 'just-bash' 和 'valibot'。
智能体要在重启后继续工作,还需要额外设置吗?要在故障和重启后保留进度,需要借助持久化适配器(如 @flue/postgres)提供的持久性功能;没有它,就无法自动恢复。
Flue 智能体到底可以部署在哪里?智能体可以通过命令行在本地运行,也可以部署到 Node.js、Cloudflare Workers、GitHub Actions、GitLab CI/CD、Daytona 或 Render。
什么是 Flue 中的技能?技能是可复用的专业知识和工作流程包,智能体在任务需要专业指导时可以随时加载,与 Claude Code 的技能机制类似。
工具和子智能体有什么区别?工具是有明确类型的操作,用于调用 API 或进行受控的修改;子智能体则是专门的角色,主智能体可以把整个任务委派给它们。
我能把智能体连接到 Slack 或 GitHub 吗?可以。Flue 的 Channels 功能让智能体能够接收来自 Slack、Microsoft Teams、Discord、GitHub 等平台的已验证事件。
在生产环境中,我如何监控智能体的运行情况?Flue 可以导出 OpenTelemetry 追踪数据,并内置了与 Braintrust 和 Sentry 的集成;你也可以接入自己的观测器。
Creator
withastro
Size
18.6 MB
Stars
8.5K
Age
8mo
Commits · 90 Days