Skip to main content
Skip to Content
DocsAPI Reference

This page is the terse reference. For the reasoning and workflows behind each of these, see Cross-Runtime SDKs and Serve & Deploy.

The .flow.json format

Exporting a flow produces a HelioxFlowExport document, format version "1" (HELIOX_FLOW_FORMAT_VERSION).

Top-level fields

FieldTypeNotes
versionstringWire format version — currently "1".
idstringFlow identifier.
namestringHuman-readable flow name.
rootStepIdstringId of the first step (no dependencies).
stepsHelioxFlowStep[]Deterministic topological order — dependency-free first, ties broken by id ascending.
loopsHelioxFlowLoop[] (optional)Bounded loop-back edges. Omitted entirely when the flow has none.
metaobject (optional){ description?, tags?, author?, version? } — human-facing only, omitted entirely when the flow declares none of the four. Distinct from the top-level version (that one’s the wire-format version).

Step fields (HelioxFlowStep)

FieldTypeNotes
idstringUnique step id.
typestringllm_call | tool_call | router.
promptstringThe step’s prompt template.
dependsOnstring[]Upstream step ids.
systemPromptstring (optional)Flattened from the step’s role(s), joined with \n\n. Omitted when the step has no role.
toolsstring[]Tool names available to the step (always present, may be empty).
contextobject (optional)Flattened mental-context map (id → text). Omitted when empty.
contractStepContract (optional)Carried opaquely — this format never interprets it.
modelstring (optional)Per-step model override, e.g. "openai/gpt-4o-mini" or "conn:<connectionId>/<modelId>".
descriptionstring (optional)Human-facing only; never consulted by execution.

Loop fields (HelioxFlowLoop)

FieldTypeNotes
idstringLoop identifier.
sourceStepIdstringStep after which control returns to targetStepId.
targetStepIdstringUpstream step the loop body restarts from.
maxIterationsnumberTotal passes, clamped to [1, 50] at export time.

Example

{ "version": "1", "id": "hello-flow", "name": "Hello Flow", "rootStepId": "step-a", "steps": [ { "id": "step-a", "type": "llm_call", "prompt": "Summarize the input text in one paragraph.", "dependsOn": [], "systemPrompt": "You are a technical writer.", "tools": [] }, { "id": "step-b", "type": "tool_call", "prompt": "Uppercase the summary produced by the previous step.", "dependsOn": ["step-a"], "tools": ["uppercase"], "model": "openai/gpt-4o-mini" } ], "meta": { "description": "A minimal two-step example flow.", "tags": ["example"], "version": "1.0.0" } }

Round-trip fidelity is exact for everything execution-relevant (ids, dependsOn, prompts, flattened systemPrompt, tool names, contract, model, loops); role identity and mod details are intentionally flattened away, since neither the Java nor Python runtime has a concept of roles or mods as distinct entities — only the resulting systemPrompt string matters at execution time.

SDK entry points

RuntimeEntry pointPackage
TypeScriptheliox serve <flow.json> (CLI) — or importFlow + the flow executor programmaticallybuilt into heliox-ide
JavaHelioxRuntime.builder()...build(), then .flow(name).executeAsync(); or FlowExecutor.execute / executeMultiSink / executeAllText directlyio.heliox:heliox-sdk-java (sdk/java)
Pythonheliox_sdk.FlowExecutorexecute_all_text / execute_all_text_traceheliox-sdk (sdk/python)

See Cross-Runtime SDKs for usage examples and the conformance guarantees tying all three together.

Serve HTTP API

RouteMethodAuthResponse
/healthGETnone200 { ok: true }
/flowGETBearer200 { id, name, rootStepId, steps }
/runPOSTBearer200 { completedStepIds, stepOutputs, finalOutput } (or an SSE stream when Accept: text/event-stream)

Auth is Authorization: Bearer <token> on /run and /flow; /health is open. Binds 127.0.0.1 by default — see Serve & Deploy for the full CLI flags, webhook/cron triggers, and the MCP transport (--mcp), which exposes the same flow as a single MCP tool over stdio instead of HTTP.

Next steps

Last updated on