Documentation 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.
flue run is a one-shot command that builds your project, starts a temporary server, invokes a named agent once via SSE, streams the event output to stderr, prints the final result JSON to stdout, and shuts down. It is the primary command for CI pipelines, shell scripts, and any automated invocation.
Usage
Flags
Name of the agent to invoke. Corresponds to the filename in
agents/ without its extension (e.g. hello for agents/hello.ts).Agent instance ID. Used to scope session state. Must be unique per logical agent instance (e.g. a customer ID, repo slug, or test run identifier).
Build target. Only
node is supported by flue run. To test a Cloudflare-targeted agent locally, use flue dev --target cloudflare instead.JSON string to pass as the agent’s
payload. Must be valid JSON. Defaults to an empty object.Project root directory. Defaults to the current working directory.
Where build artifacts are written. Defaults to
<root>/dist.Explicit path to a
flue.config.{ts,mts,mjs,js,cjs,cts} file (relative to cwd). Defaults to auto-discovery from the root directory.Port for the temporary server. If not set, an available port is chosen automatically.
Path to a
.env-format file. Repeatable; later files override earlier ones on key collision. Shell-set environment variables win over file values.How it works
flue run performs four steps in sequence:
Invoke agent
POSTs
<payload> to http://localhost:<port>/agents/<agent>/<id> and consumes the SSE event stream. Tool calls, text output, and thinking blocks are streamed to stderr as they arrive.Output
| Stream | Content |
|---|---|
stderr | Event stream: tool calls, text deltas, thinking, log messages, errors |
stdout | Final result JSON from the agent (pretty-printed, one object) |
[flue] Run ID: <id> — use it with flue logs to replay events later.
Cloudflare limitation
If yourflue.config.ts sets target: 'cloudflare', flue run will also refuse to start and print the same hint.