API reference: Server & Gateway lists every server and gateway export, its options, and links to source and tests.
CLI
--host (like 0.0.0.0) requires --auth-token (or --insecure, dangerous). The default 127.0.0.1 needs neither.
The process stays alive after the workflow completes, so final state stays queryable. Ctrl+C stops both server and workflow.
Detached mode:
Programmatic
createServeApp returns a standard Hono app. Mount it with Bun.serve, pass it to another Hono app via app.route(), or use app.fetch in tests.
ServeOptions
Authentication
WhenauthToken is configured, every route except /health requires:
Authorization: Bearer <token>, orx-smithers-key: <token>
401.
Routes
GET /health
Returns200 regardless of auth.
GET /
Run status and node summary.GET /events
SSE stream of lifecycle events, same format as the multi-workflow server.- Polls every 500ms.
- Auto-closes when the run reaches a terminal state.
- Reconnect with
?afterSeq=Nto resume.
GET /frames
Rendered workflow frames.POST /approve/:nodeId
Approve a pending approval gate. All fields optional. Returns{ "runId": "run-1234" }.
select and rank approvals, decision must contain a valid selection or ranking. A stable decision envelope with value is also accepted.
POST /deny/:nodeId
Deny a pending approval gate. Same body as/approve/:nodeId.
POST /cancel
Cancel the running workflow.Note: Runs inwaiting-approvalorwaiting-timerstate are cancelled immediately and return200.
GET /metrics
Prometheus text exposition, same metrics as the multi-workflow server.Error Format
404 with code NOT_FOUND.