Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">
<title id="title">Workflow Execution Routing</title>
<desc id="desc">A directed execution flow covering direct single-node execution, the WorkflowService routing decision, Temporal, Redis-backed parallel, and sequential orchestration paths, plus the canonical NodeExecutor pipeline and status persistence. Sources: server/services/workflow.py; server/services/node_executor.py; server/services/execution/executor.py; server/services/temporal/executor.py; server/services/temporal/workflow.py; server/services/status_broadcaster.py; server/routers/workflow.py; server/routers/websocket.py</desc>
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>
<style>
.title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }
.subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }
.group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }
.type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }
.node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }
.node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }
.edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }
.edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }
.callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }
.callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }
.legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }
</style>
</defs>
<rect width="1920" height="1080" fill="#0d0f13"/>
<text x="72" y="58" class="title">Workflow Execution Routing</text>
<text x="72" y="91" class="subtitle">Single-node requests and whole-graph runs converge on the same plugin execution pipeline</text>
<g data-group-id="entry-zone"><rect x="45" y="150" width="300" height="790" rx="18" fill="#15171c" stroke="#8be9fd" stroke-width="2"/><text x="65" y="182" class="group-label">ENTRY</text></g><g data-group-id="routing-zone"><rect x="385" y="150" width="775" height="790" rx="18" fill="#15171c" stroke="#ffb86c" stroke-width="2"/><text x="405" y="182" class="group-label">GRAPH ORCHESTRATION</text></g><g data-group-id="node-pipeline-zone"><rect x="1200" y="150" width="675" height="790" rx="18" fill="#15171c" stroke="#ffb86c" stroke-width="2"/><text x="1220" y="182" class="group-label">NODEEXECUTOR PIPELINE</text></g><g data-relationship-id="r-single-pipeline"><title>Executes directly · via WorkflowService.execute_node</title><path d="M 315 312.5 L 360 312 L 360 120 L 1180 120 L 1180 257 L 1240 257.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 780.0 120.0 L 780 148.0" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="646.4" y="124.0" width="267.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="780" y="145.0" class="edge-label" text-anchor="middle">Executes directly</text><text x="780" y="165.0" class="edge-protocol" text-anchor="middle" textLength="249.2" lengthAdjust="spacingAndGlyphs">via WorkflowService.execute_node</text></g><g data-relationship-id="r-whole-routing"><title>Submits nodes, edges and identity · via WorkflowService.execute_workflow</title><path d="M 315 687.5 L 365 687 L 365 322 L 455 322.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="216.20000000000002" y="481.0" width="297.59999999999997" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="365" y="502" class="edge-label" text-anchor="middle" textLength="279.6" lengthAdjust="spacingAndGlyphs">Submits nodes, edges and identity</text><text x="365" y="522" class="edge-protocol" text-anchor="middle" textLength="279.6" lengthAdjust="spacingAndGlyphs">via WorkflowService.execute_workflow</text></g><g data-relationship-id="r-routing-temporal"><title>Chooses when requested and wired · via Temporal</title><path d="M 755 322.5 L 820 267.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 790.0 235.0 L 1060 148.0" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="926.4" y="124.0" width="267.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1060" y="145.0" class="edge-label" text-anchor="middle" textLength="249.2" lengthAdjust="spacingAndGlyphs">Chooses when requested and wired</text><text x="1060" y="165.0" class="edge-protocol" text-anchor="middle">via Temporal</text></g><g data-relationship-id="r-routing-parallel"><title>Else chooses when parallel and Redis enabled · via in-process + Redis</title><path d="M 755 322.5 L 785 322 L 785 492 L 820 492.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 790.0 405.0 L 790 621" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="610.8" y="597.0" width="358.4" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="790" y="618" class="edge-label" text-anchor="middle" textLength="340.4" lengthAdjust="spacingAndGlyphs">Else chooses when parallel and Redis enabled</text><text x="790" y="638" class="edge-protocol" text-anchor="middle">via in-process + Redis</text></g><g data-relationship-id="r-routing-sequential"><title>Otherwise falls back · via in-process</title><path d="M 755 322.5 L 785 322 L 785 742 L 820 742.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 790.0 640.0 L 700 694" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="612.0" y="670.0" width="176.0" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="700" y="691" class="edge-label" text-anchor="middle" textLength="158.0" lengthAdjust="spacingAndGlyphs">Otherwise falls back</text><text x="700" y="711" class="edge-protocol" text-anchor="middle">via in-process</text></g><g data-relationship-id="r-temporal-node"><title>Schedules node activities · via Temporal task queue</title><path d="M 1105 267.5 L 1240 257.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1170.0 225.0 L 1170 387" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1063.0" y="363.0" width="214.0" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1170" y="384" class="edge-label" text-anchor="middle" textLength="196.0" lengthAdjust="spacingAndGlyphs">Schedules node activities</text><text x="1170" y="404" class="edge-protocol" text-anchor="middle" textLength="196.0" lengthAdjust="spacingAndGlyphs">via Temporal task queue</text></g><g data-relationship-id="r-parallel-node"><title>Calls node adapter with retries · via async callback</title><path d="M 1105 492.5 L 1170 492 L 1170 257 L 1240 257.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1170.0 385.0 L 900 385" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="770.2" y="361.0" width="259.6" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="900" y="382" class="edge-label" text-anchor="middle" textLength="241.6" lengthAdjust="spacingAndGlyphs">Calls node adapter with retries</text><text x="900" y="402" class="edge-protocol" text-anchor="middle">via async callback</text></g><g data-relationship-id="r-sequential-node"><title>Calls each ready node · via await</title><path d="M 1105 742.5 L 1170 742 L 1170 257 L 1240 257.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1170.0 650.0 L 1260 650" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1168.2" y="626.0" width="183.6" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1260" y="647" class="edge-label" text-anchor="middle" textLength="165.6" lengthAdjust="spacingAndGlyphs">Calls each ready node</text><text x="1260" y="667" class="edge-protocol" text-anchor="middle">via await</text></g><g data-relationship-id="r-prepare-resolve"><title>Passes validated parameters · via Python dict</title><path d="M 1525 257.5 L 1560 257.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1542.0 347.0 L 1542 401" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1427.4" y="377.0" width="229.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1542" y="398" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">Passes validated parameters</text><text x="1542" y="418" class="edge-protocol" text-anchor="middle">via Python dict</text></g><g data-relationship-id="r-resolve-dispatch"><title>Builds handler context · via NodeContext</title><path d="M 1697.5 320 L 1697 380 L 1382 380 L 1382.5 455" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1540.0 380.0 L 1810 380" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1714.4" y="356.0" width="191.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1810" y="377" class="edge-label" text-anchor="middle" textLength="173.2" lengthAdjust="spacingAndGlyphs">Builds handler context</text><text x="1810" y="397" class="edge-protocol" text-anchor="middle">via NodeContext</text></g><g data-relationship-id="r-dispatch-result"><title>Returns standardized result · via ExecutionResult</title><path d="M 1525 527.5 L 1560 527.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1427.4" y="641.0" width="229.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1542" y="662" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">Returns standardized result</text><text x="1542" y="682" class="edge-protocol" text-anchor="middle">via ExecutionResult</text></g><g data-relationship-id="r-result-store"><title>Persists successful outputs · via database callback</title><path d="M 1697.5 600 L 1697 680 L 1382 680 L 1382.5 745" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1540.0 680.0 L 1793.4 680" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1678.8000000000002" y="656.0" width="229.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1793.4" y="677" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">Persists successful outputs</text><text x="1793.4" y="697" class="edge-protocol" text-anchor="middle">via database callback</text></g><g data-relationship-id="r-store-broadcast"><title>Publishes execution state · via WebSocket broadcast</title><path d="M 1525 807.5 L 1560 807.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1435.0" y="901.0" width="214.0" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1542" y="922" class="edge-label" text-anchor="middle" textLength="196.0" lengthAdjust="spacingAndGlyphs">Publishes execution state</text><text x="1542" y="942" class="edge-protocol" text-anchor="middle" textLength="196.0" lengthAdjust="spacingAndGlyphs">via WebSocket broadcast</text></g><g data-component-id="single-node-request"><title>Single-node request</title><rect x="75" y="250" width="240" height="125" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="75" y="250" width="240" height="7" rx="4" fill="#8be9fd"/><text x="93" y="276" class="type-label">ENTRY POINT</text><text x="93" y="302" class="node-label" textLength="204.0" lengthAdjust="spacingAndGlyphs">Single-node request</text><text x="93" y="328" class="node-detail" textLength="204.0" lengthAdjust="spacingAndGlyphs">WebSocket or internal REST</text></g><g data-component-id="whole-workflow-request"><title>Whole-workflow run</title><rect x="75" y="625" width="240" height="125" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="75" y="625" width="240" height="7" rx="4" fill="#8be9fd"/><text x="93" y="651" class="type-label">ENTRY POINT</text><text x="93" y="677" class="node-label">Whole-workflow run</text><text x="93" y="703" class="node-detail">Interactive or deployed</text></g><g data-component-id="routing-decision"><title>WorkflowService routing</title><rect x="455" y="250" width="300" height="145" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="455" y="250" width="300" height="7" rx="4" fill="#ffb86c"/><text x="473" y="276" class="type-label">DECISION</text><text x="473" y="302" class="node-label">WorkflowService routing</text><text x="473" y="328" class="node-detail" textLength="264.0" lengthAdjust="spacingAndGlyphs">Temporal → parallel → sequential</text></g><g data-component-id="temporal-branch"><title>Temporal branch</title><rect x="820" y="205" width="285" height="125" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="820" y="205" width="285" height="7" rx="4" fill="#ffb86c"/><text x="838" y="231" class="type-label">DURABLE ORCHESTRATOR</text><text x="838" y="257" class="node-label">Temporal branch</text><text x="838" y="283" class="node-detail">Temporal executor is wired</text></g><g data-component-id="redis-parallel-branch"><title>Redis-parallel branch</title><rect x="820" y="420" width="285" height="145" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="820" y="420" width="285" height="7" rx="4" fill="#ffb86c"/><text x="838" y="446" class="type-label">GRAPH ORCHESTRATOR</text><text x="838" y="472" class="node-label">Redis-parallel</text><text x="838" y="494" class="node-label">branch</text><text x="838" y="520" class="node-detail">WorkflowExecutor</text></g><g data-component-id="sequential-branch"><title>Sequential fallback</title><rect x="820" y="680" width="285" height="125" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="820" y="680" width="285" height="7" rx="4" fill="#ffb86c"/><text x="838" y="706" class="type-label">GRAPH ORCHESTRATOR</text><text x="838" y="732" class="node-label">Sequential fallback</text><text x="838" y="758" class="node-detail">Topological loop</text></g><g data-component-id="parameter-preparation"><title>Prepare parameters</title><rect x="1240" y="195" width="285" height="125" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="1240" y="195" width="285" height="7" rx="4" fill="#ffb86c"/><text x="1258" y="221" class="type-label">PIPELINE STAGE</text><text x="1258" y="247" class="node-label">Prepare parameters</text><text x="1258" y="273" class="node-detail" textLength="249.0" lengthAdjust="spacingAndGlyphs">DB defaults + request overrides</text><text x="1258" y="293" class="node-detail" textLength="249.0" lengthAdjust="spacingAndGlyphs">Pydantic Params + credentials</text></g><g data-component-id="template-resolution"><title>Resolve templates</title><rect x="1560" y="195" width="275" height="125" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="1560" y="195" width="275" height="7" rx="4" fill="#ffb86c"/><text x="1578" y="221" class="type-label">PIPELINE STAGE</text><text x="1578" y="247" class="node-label">Resolve templates</text><text x="1578" y="273" class="node-detail">Graph and upstream outputs</text></g><g data-component-id="plugin-dispatch"><title>Dispatch plugin operation</title><rect x="1240" y="455" width="285" height="145" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1240" y="455" width="285" height="7" rx="4" fill="#50fa7b"/><text x="1258" y="481" class="type-label">PIPELINE STAGE</text><text x="1258" y="507" class="node-label">Dispatch plugin</text><text x="1258" y="529" class="node-label">operation</text><text x="1258" y="555" class="node-detail">Node registry handler</text></g><g data-component-id="validated-result"><title>Validated execution result</title><rect x="1560" y="455" width="275" height="145" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1560" y="455" width="275" height="7" rx="4" fill="#50fa7b"/><text x="1578" y="481" class="type-label">PIPELINE STAGE</text><text x="1578" y="507" class="node-label">Validated execution</text><text x="1578" y="529" class="node-label">result</text><text x="1578" y="555" class="node-detail">Success or typed error</text></g><g data-component-id="output-store"><title>Output store</title><rect x="1240" y="745" width="285" height="125" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1240" y="745" width="285" height="7" rx="4" fill="#ff79c6"/><text x="1258" y="771" class="type-label">PERSISTENCE</text><text x="1258" y="797" class="node-label">Output store</text><text x="1258" y="823" class="node-detail">output_main / top / 0</text></g><g data-component-id="status-broadcast"><title>Status broadcasts</title><rect x="1560" y="745" width="275" height="125" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1560" y="745" width="275" height="7" rx="4" fill="#50fa7b"/><text x="1578" y="771" class="type-label">OBSERVABLE RESULT</text><text x="1578" y="797" class="node-label">Status broadcasts</text><text x="1578" y="823" class="node-detail" textLength="239.0" lengthAdjust="spacingAndGlyphs">Per-workflow WebSocket stream</text></g><g data-callout-id="routing-invariant"><rect x="455" y="830" width="650" height="110" rx="10" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2" stroke-dasharray="7 6"/><text x="471" y="860" class="callout-title">Routing invariant</text><text x="471" y="886" class="callout-text">Temporal requested but not wired is logged at INFO, then falls through.</text><text x="471" y="908" class="callout-text">The next eligible path is Redis-parallel or sequential.</text><text x="471" y="930" class="callout-text">Every branch invokes WorkflowService.execute_node → NodeExecutor.</text></g>
<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>
</svg>