# Flue 是一个用于构建新一代代理的 TypeScript 框架

- 来源：Hacker News 热门（buzzing.cc 中文翻译）
- 作者：momentmaker
- 发布时间：2026-05-04 00:31
- AIHOT 分数：66
- AIHOT 链接：https://aihot.virxact.com/items/cmoq0ashp10p0sll9l32laew8
- 原文链接：https://flueframework.com/

## AI 摘要

Flue 是一个用于构建新一代智能代理的 TypeScript 框架。该框架旨在简化下一代代理的开发流程，其官网为 flueframework.com。相关资讯在 Hacker News 平台上获得了 100 点热度。

## 正文

The Agent Harness Framework

Not another SDK. Build autonomous agents and powerful AI workflows with Flue's programmable TypeScript harness.

import { createAgent, type AgentRouteHandler, type AgentWebSocketHandler } from '@flue/runtime'; import { local } from '@flue/runtime/node'; import triage from '../skills/triage/SKILL.md' with { type: 'skill' }; import verify from '../skills/verify/SKILL.md' with { type: 'skill' }; import * as githubTools from '../tools/github.ts'; // Give agents the context and autonomy to solve complex tasks: const instructions = ` Triage a bug report end-to-end: reproduce the bug, diagnose the root cause, verify whether the behavior is intentional, and attempt a fix. ...`; // Expose (and protect) your agents over HTTP and WebSockets: export const route: AgentRouteHandler = async (_c, next) => next(); export const websocket: AgentWebSocketHandler = async (_c, next) => next(); // Compose the complete harness your agent needs to do real work, // complete with virtual, local, or remote container sandbox. export default createAgent(() => ({ model: 'anthropic/claude-sonnet-4-6', tools: [...githubTools], skills: [triage, verify], sandbox: local(), instructions, }));

import { createAgent, type AgentRouteHandler, type AgentWebSocketHandler } from '@flue/runtime'; import { local } from '@flue/runtime/node'; import triage from '../skills/triage/SKILL.md' with { type: 'skill' }; import verify from '../skills/verify/SKILL.md' with { type: 'skill' }; import * as githubTools from '../tools/github.ts'; // Give agents the context and autonomy to solve complex tasks: const instructions = ` Triage a bug report end-to-end: reproduce the bug, diagnose the root cause, verify whether the behavior is intentional, and attempt a fix. ...`; // Expose (and protect) your agents over HTTP and WebSockets: export const route: AgentRouteHandler = async (_c, next) => next(); export const websocket: AgentWebSocketHandler = async (_c, next) => next(); // Compose the complete harness your agent needs to do real work, // complete with virtual, local, or remote container sandbox. export default createAgent(() => ({ model: 'anthropic/claude-sonnet-4-6', tools: [...githubTools], skills: [triage, verify], sandbox: local(), instructions, }));

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.

Universal Agent Architecture

Features

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

Agents

Build agents that can keep context across conversations and events as they autonomously work toward a goal.

Workflows

Run structured automations where your code guides agent reasoning from a clear input to a finished result.

Sandboxes

Give agents a secure environment where they can use tools, modify files, and autonomously complete real work.

Durable Execution

Learn how agents preserve progress through failures and restarts with durable recovery for accepted work.

Subagents

Define specialized roles for different tasks, then let your agent delegate work to the right expert.

Tools

Give agents typed actions for calling APIs, querying data, and making controlled changes through your application.

Skills

Package reusable expertise and workflows that agents can load whenever a task needs specialized guidance.

MCP Servers

Connect agents to authenticated tools and services through the open Model Context Protocol ecosystem.

Observability

Monitor your agents and export traces to OpenTelemetry, Braintrust, Sentry, or your own telemetry stack.

Chat

Connect agents to where your work happens across Slack, Teams, Discord, GitHub, and more.

Explore the docs

Learn how to build, run, and deploy production-ready agents with Flue.

Deploy Anywhere
