This guide walks you through installing Flue, creating a minimal agent, running the dev server, and invoking your agent viaDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/withastro/flue/llms.txt
Use this file to discover all available pages before exploring further.
curl. By the end you’ll have a working agent and a mental model for how Flue’s build and deploy cycle works.
Flue requires Node.js ≥ 22.18. Check your version with
node --version.Install packages
Install the Flue runtime and CLI, plus Valibot for schema-validated results:
@flue/runtime is your agent’s production dependency. @flue/cli provides the flue binary for development, builds, and deployment. Valibot is used to define typed result schemas for prompt(), skill(), and task() calls.Initialize the project
Run This writes the following config file:The
flue init to create a flue.config.ts at the project root:target field sets the default build and dev target. You can override it with --target on any CLI command. CLI flags always take precedence over the config file.Set your API key
Flue routes model calls through the provider identified in the
model string. For Anthropic models, set ANTHROPIC_API_KEY in a .env file:Create your first agent
Create the directory The filename determines the agent’s name:
.flue/agents/ and add a file named hello.ts:hello.ts → agent hello. The triggers export tells Flue how to invoke this agent; webhook: true exposes it as an HTTP endpoint.Start the dev server
The dev server listens on port 3583 by default — that’s “FLUE” on a phone keypad. Override with
--port.Invoke your agent via HTTP
With the dev server running, invoke the The URL pattern is
hello agent in a separate terminal:POST /agents/<agent-name>/<id>. The <id> segment (session-1 here) identifies the agent instance — reuse the same id to continue a conversation, or use a new id to start fresh.Run in CI with flue run
For one-shot, scripted invocations (CI pipelines, cron jobs, local testing without a running server), use flue run. It builds the project, starts a temporary server, invokes the agent, streams output to stderr, prints the result to stdout, then shuts down:
--payload for agents that read from ctx.payload:
Next steps
Core concepts
Learn the full agent → harness → session → operation hierarchy.
Writing agents
Triggers, handler patterns, payload types, and the
FlueContext API.Skills and roles
Shape agent behavior with reusable Markdown instruction files.
Deploy to Node.js
Build a production artifact and deploy your agents to any Node.js host.