Reference
Flue Quickstart Cheatsheet
把 Flue quickstart 压缩成一张可打印速查表:命令、产物、检查点。
Prerequisites
| Node.js | 官方 quickstart 要求 >=22.19.0。 |
|---|---|
| LLM model | 至少一个模型 specifier,例如 anthropic/claude-sonnet-4-6 或 cloudflare/@cf/...。 |
| Provider credentials | 按 provider 配置 API key;不要提交 .env。 |
Minimal command path
npm install @flue/runtime
npm install --save-dev @flue/cli
printf 'ANTHROPIC_API_KEY=***\n' > .env
printf '.env\n' >> .gitignore
npx flue init --target node
mkdir -p agents
$EDITOR agents/hello-world.ts
npx flue run hello-world --input '{"message":"Tell me a joke."}'Minimal agent module
import { defineAgent } from '@flue/runtime';
export default defineAgent(() => ({
model: 'anthropic/claude-sonnet-4-6',
instructions: 'Tell a funny "hello world" engineering joke.',
}));Debug checklist
- Node version error:先确认
node --version是否满足官方最低版本。 - agent not found:确认文件在 agent discovery 目录中,文件名与
flue run名称一致。 - provider auth error:确认
.env存在、key 名称正确、没有提交或泄露。 - target/runtime error:确认已运行
npx flue init --target node或 Cloudflare target 的相应配置。
Source: Flue Getting Started.