This document describes what each node and connection means at runtime.
- Entry point for execution.
- Output value is
node.data.initialInputor empty string. - Must exist exactly once for a runnable graph.
- Invokes configured LLM backend.
- Reads:
systemPromptuserPromptmodelreasoningEfforttools(web_search,subagents)
{{PREVIOUS_OUTPUT}}is replaced with prior node output.- If
userPromptis empty, engine falls back to previous output text.
- Evaluates conditions against previous output (stringified/lowercased).
- Supported operators:
equal,contains. - First matching condition wins.
- Connection handles:
condition-<index>for condition branchesfalsefor fallback branch
- Legacy compatibility: condition index
0also accepts old handletrue.
- Pauses execution with
status = paused,waitingForInput = true,currentNodeId = node.id. - Resume input is normalized to:
{ "decision": "approve" | "reject", "note": "" }- Resume follows outgoing branch where
sourceHandle === decision.
Regular workflow edges that advance execution.
Examples:
start(output) -> agent(input)if(condition-0) -> agent(input)approval(approve) -> agent(input)
Tool-delegation edges only, not execution flow edges.
- Marked by
sourceHandle: "subagent". - Used to build nested agent-tool trees for agent nodes.
A subagent graph is valid only when:
- Source and target are both
agentnodes. - Source has
tools.subagents = true. - Target handle is input (
targetHandleomitted orinput). - No self-reference.
- No cycles.
- A target has at most one subagent parent.
- Subagent targets do not appear in regular execution edges.
Invalid subagent structures are rejected by both UI preflight and runtime validation.
- Multiple outgoing execution branches run concurrently (
Promise.all). - If execution pauses while other branches remain, downstream nodes are queued and resumed later.
- After resume, engine drains deferred queue while status remains
running.
Typical log types include:
step_startstart_promptlogic_checkwait_inputinput_receivedllm_responsellm_errorerror
Subagent runtime events are logged as JSON payloads in content with types:
subagent_call_startsubagent_call_endsubagent_call_error
Engine normalizes legacy data:
- Node type
inputis mapped toapproval. - Legacy
if.data.conditionis mapped toif.data.conditions. - Legacy
trueconnection handle remains supported for first condition branch.