Reference

Flue Capability Cheatsheet

给 agent 增加能力时,用这张表快速判断:Tool、Skill、Action,还是 Sandbox。

Decision table

你想要 agent...优先用原因
查数据库、调用 API、创建 ticket、批准请求ToolTool 执行 application-controlled code。
遵循一套流程、规范、checklist、项目知识SkillSkill 是 reusable instructions 和 supporting resources。
复用一段多步、可靠、带输入/输出 schema 的 agent-backed 任务ActionAction 可被 workflow 或 agent 复用。
在工作区读写文件、运行命令SandboxSandbox 提供 workspace/file/command 环境。

Minimal shapes

Tool

export const lookupOrderStatus = defineTool({
  name: 'lookup_order_status',
  description: 'Look up one order status.',
  input: v.object({ orderId: v.string() }),
  output: v.object({ status: v.nullable(v.string()) }),
  async run({ input, signal }) {
    return { status: await orders.getStatus(input.orderId, { signal }) };
  },
});

Skill import

import review from '../skills/review/SKILL.md' with { type: 'skill' };

export default defineAgent(() => ({
  model: 'anthropic/claude-sonnet-4-6',
  skills: [review],
}));

Action

export const summarize = defineAction({
  name: 'summarize_document',
  description: 'Summarize a document.',
  input: v.object({ text: v.string() }),
  output: v.object({ summary: v.string() }),
  async run({ harness, input, log }) {
    const session = await harness.session();
    const response = await session.prompt(input.text);
    return { summary: response.text };
  },
});

Safety reminders

  • Tool:模型选择参数;应用负责授权边界。
  • Skill:不要把 credentials、private keys、runtime secrets 放进 imported skill directory。
  • Action:加入 agent 的 actions 不会自动创建 workflow/public endpoint;要可检查运行需绑定 workflow。
  • Sandbox:local sandbox 接触宿主机文件和命令,必须只用于可信 agent/环境。

Sources: Tools, Skills, Actions, Sandboxes.