Base URL: same origin as the web app (/api/*).
{
"nodes": [{ "id": "node_1", "type": "start", "x": 100, "y": 100, "data": {} }],
"connections": [{ "source": "node_1", "target": "node_2", "sourceHandle": "output", "targetHandle": "input" }]
}{
"runId": "1772129193363",
"status": "completed",
"logs": [],
"state": {},
"waitingForInput": false,
"currentNodeId": null,
"workflow": { "nodes": [], "connections": [] }
}status values: pending | running | paused | completed | failed.
Runs a workflow and returns one JSON result.
Request body:
{ "graph": { "nodes": [], "connections": [] } }Responses:
200:WorkflowRunResult(+workflow)400: invalid graph payload503: workflow containsagentnode butOPENAI_API_KEYunavailable500: execution failure
Runs a workflow and streams progress as SSE.
Request body:
{ "graph": { "nodes": [], "connections": [] } }SSE event payloads (data: <json>):
{"type":"start","runId":"..."}{"type":"log","entry": WorkflowLogEntry}{"type":"done","result": WorkflowRunResult}{"type":"error","message":"..."}
Errors:
400: invalid graph payload503: missing LLM backend for agent nodes
Resumes a paused workflow and returns one JSON result.
Request body:
{ "runId": "1772024622098", "input": { "decision": "approve", "note": "optional" } }Responses:
200: updatedWorkflowRunResult400: missingrunId404: run not found in active in-memory workflows409: run already being resumed through another resume endpoint500: resume failure
Resumes a paused workflow and streams progress as SSE.
Request body is same as /api/resume.
SSE payloads are same shape as /api/run-stream.
Responses:
400: missingrunId404: run not found409: concurrent resume lock conflict
Returns current state for a run.
Behavior:
- Validates
runIdis numeric-only. - Checks in-memory active runs first (running or paused).
- Falls back to persisted
data/runs/run_<runId>.json.
Responses:
200:WorkflowRunResult400: invalidrunId404: run not found in memory or disk500: read/parse failure
Returns .config/default-workflow.json if present and valid.
Responses:
200:WorkflowGraph404: file missing400: file exists but invalid graph shape500: read/parse failure
Returns provider/model config from .config/config.json.
Responses:
200: app config JSON404: config missing500: read/parse failure
- All run and resume endpoints persist run records via
saveRunRecord. - Non-paused runs are removed from in-memory active map after completion/failure.
- Paused runs remain active and resumable until completed/failed.