Skip to content

Self-improving AI Employees for everyone

docs(diagrams): regenerate all six architecture SVGs from code-verified specs

trohitgaae35d4fb384
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 21015b73..2db660c8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -36,7 +36,7 @@ Deep dives: [DESIGN.md](docs-internal/DESIGN.md) - [TEMPORAL_ARCHITECTURE.md](do
[![AI Agent Routing](docs/diagrams/ai-agent-routing.svg)](https://raw.githubusercontent.com/zeenie-ai/OpenCompany/main/docs/diagrams/ai-agent-routing.svg)
-AI execution splits into two paths. `execute_chat()` for direct chat completions prefers the native SDK layer in [services/llm/](server/services/llm/) (12 providers, lazy imports, normalized `LLMResponse`), falling back to LangChain for Groq and Cerebras. `execute_agent()` and `execute_chat_agent()` build a LangChain chat model (`ChatOpenAI` / `ChatAnthropic` / etc.) and drive it through `_run_agent_loop` — a plain async `for iteration in range(max):` that calls `chat_model.ainvoke`, dispatches any `tool_calls`, appends `ToolMessage` results, and loops. Team leads (`orchestrator_agent`, `ai_employee`) auto-inject `delegate_to_<type>` tools for every agent connected to their `input-teammates` handle. The RLM Agent uses a REPL-based recursive language model pattern. Long-running activities (browser automation, claude_code_agent) stay alive across Temporal's 2-minute heartbeat window via per-message `activity.heartbeat()` calls in the WebSocket read loop.
+AI execution splits into two paths. `execute_chat()` for direct chat completions delegates every provider to the native SDK layer in [services/llm/](server/services/llm/) via `ChatUnifier` (12 providers, lazy imports, normalized `LLMResponse`; Groq, Cerebras, and the local servers ride the OpenAI-compatible client with a custom `base_url` — the old chat-path LangChain fallback is retired). `execute_agent()` and `execute_chat_agent()` build a LangChain chat model (`ChatOpenAI` / `ChatAnthropic` / etc.) and drive it through `_run_agent_loop` — a plain async `for iteration in range(max):` that calls `chat_model.ainvoke`, dispatches any `tool_calls`, appends `ToolMessage` results, and loops. Team leads (`orchestrator_agent`, `ai_employee`) auto-inject `delegate_to_<type>` tools for every agent connected to their `input-teammates` handle. The RLM Agent uses a REPL-based recursive language model pattern. Long-running activities (browser automation, claude_code_agent) stay alive across Temporal's 2-minute heartbeat window via per-message `activity.heartbeat()` calls in the WebSocket read loop.
Deep dives: [agent_architecture.md](docs-internal/agent_architecture.md) - [native_llm_sdk.md](docs-internal/native_llm_sdk.md) - [agent_teams.md](docs-internal/agent_teams.md) - [memory_compaction.md](docs-internal/memory_compaction.md)
@@ -61,7 +61,7 @@ Deep dives: [agent_architecture.md](docs-internal/agent_architecture.md) - [nati
[![Node Anatomy](docs/diagrams/node-anatomy.svg)](https://raw.githubusercontent.com/zeenie-ai/OpenCompany/main/docs/diagrams/node-anatomy.svg)
-The diagram above shows the full lifecycle of a workflow node from TypeScript definition to Python handler. Use these recipes as a starting point:
+The diagram above shows the full lifecycle of a workflow node: one self-contained Python plugin folder that auto-registers on import and renders itself on the frontend with zero TypeScript edits. Use these recipes as a starting point:
**Add a workflow node**
- Author a plugin folder: `server/nodes/<category>/<node>/__init__.py` — subclasses `BaseNode` (or `ActionNode` / `TriggerNode` / `ToolNode`), declares Pydantic `Params`/`Output` + `@Operation` methods; auto-registers on import
@@ -70,7 +70,7 @@ The diagram above shows the full lifecycle of a workflow node from TypeScript de
**Add an LLM provider**
- OpenAI-compatible (DeepSeek, Kimi, Mistral pattern): config-only in `server/config/llm_defaults.json`
-- Custom-SDK provider: new file in `server/services/llm/providers/`, branch in `factory.py`
+- Custom-SDK provider: new file in `server/services/llm/providers/` that calls `register_provider(ProviderSpec(...))` at module bottom (lazy factory + `sdk_exception_refs`)
- Backend plugin: `server/nodes/model/<provider>_chat_model/__init__.py`
- Guide: [native_llm_sdk.md](docs-internal/native_llm_sdk.md)
diff --git a/docs-internal/design-system/assets/diagrams/ai-agent-routing.svg b/docs-internal/design-system/assets/diagrams/ai-agent-routing.svg
index 9f97ea35..6364583a 100644
--- a/docs-internal/design-system/assets/diagrams/ai-agent-routing.svg
+++ b/docs-internal/design-system/assets/diagrams/ai-agent-routing.svg
@@ -1,119 +1,121 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1400 900" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, &#39;SFMono-Regular&#39;, Menlo, Consolas, monospace">
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1165 985" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
- <path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"></path>
+ <path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"/>
</marker>
-
+ <style>
+ .bg { fill: #282a36; }
+ .panel { fill: #44475a; stroke-width: 2; }
+ .p-cyan { stroke: #8be9fd; } .p-purple { stroke: #bd93f9; } .p-orange { stroke: #ffb86c; } .p-green { stroke: #50fa7b; } .p-pink { stroke: #ff79c6; }
+ .title { fill: #f8f8f2; font-size: 20px; font-weight: 700; }
+ .h1 { fill: #f8f8f2; font-size: 18px; font-weight: 700; }
+ .h2 { fill: #f8f8f2; font-size: 14px; font-weight: 700; }
+ .sub { fill: #f8f8f2; font-size: 12px; }
+ .small { fill: #f8f8f2; font-size: 10px; }
+ .label { fill: #f1fa8c; font-size: 11px; font-style: italic; }
+ .conn { stroke: #f8f8f2; stroke-width: 1.8; fill: none; }
+ .conn-dot { stroke: #6272a4; stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
+ .box { fill: #282a36; stroke-width: 1.5; }
+ .tier-label { fill: #6272a4; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
+ .accent-cyan { fill: #8be9fd; } .accent-purple { fill: #bd93f9; } .accent-green { fill: #50fa7b; } .accent-orange { fill: #ffb86c; } .accent-pink { fill: #ff79c6; }
+ </style>
</defs>
-
- <rect class="bg" width="1400" height="900"></rect>
-
-
- <text x="700" y="35" class="title" text-anchor="middle" font-size="20">AI Service: Native SDK vs LangChain Routing</text>
- <text x="700" y="58" class="caption" text-anchor="middle">server/services/ai.py + server/services/llm/</text>
-
-
- <rect class="entry" x="540" y="85" width="320" height="70" rx="8"></rect>
- <text x="700" y="115" class="big" text-anchor="middle">AIService</text>
- <text x="700" y="138" class="sub" text-anchor="middle">server/services/ai.py (~4500 lines)</text>
-
-
- <path class="conn" d="M 700 155 L 700 185 L 300 185 L 300 215" marker-end="url(#arrow)"></path>
- <path class="conn" d="M 700 155 L 700 185 L 1100 185 L 1100 215" marker-end="url(#arrow)"></path>
-
-
- <text x="300" y="205" class="col-header" text-anchor="middle">Method 1: Direct Chat</text>
- <text x="1100" y="205" class="col-header" text-anchor="middle">Method 2: Agent Tool-Calling</text>
-
-
- <rect class="method" x="120" y="215" width="360" height="75" rx="8"></rect>
- <text x="300" y="243" class="big" text-anchor="middle">execute_chat(parameters)</text>
- <text x="300" y="265" class="sub" text-anchor="middle">Used by chat model nodes</text>
- <text x="300" y="283" class="caption" text-anchor="middle">openaiChatModel, anthropicChatModel, ...</text>
-
-
- <polygon class="decision" points="300,310 470,385 300,460 130,385"></polygon>
- <text x="300" y="375" class="big" text-anchor="middle">is_native_provider</text>
- <text x="300" y="400" class="big" text-anchor="middle">(provider)?</text>
-
-
- <path class="conn" d="M 300 290 L 300 310" marker-end="url(#arrow)"></path>
-
-
- <path class="conn-native" d="M 470 385 L 530 385 L 530 495" marker-end="url(#arrow)"></path>
- <text x="505" y="375" class="branch-label">yes</text>
-
-
- <path class="conn-lc" d="M 130 385 L 70 385 L 70 495" marker-end="url(#arrow)"></path>
- <text x="95" y="375" class="branch-label">no</text>
-
-
- <rect class="native" x="340" y="495" width="380" height="150" rx="8"></rect>
- <text x="530" y="522" class="title" text-anchor="middle" fill="#8be9fd">Native SDK Path</text>
- <text x="530" y="545" class="sub" text-anchor="middle">create_provider(name, api_key)</text>
- <text x="530" y="563" class="sub" text-anchor="middle">lazy-imports one of:</text>
- <text x="530" y="582" class="path" text-anchor="middle">AnthropicProvider / OpenAIProvider</text>
- <text x="530" y="600" class="path" text-anchor="middle">GeminiProvider / OpenRouterProvider</text>
- <text x="530" y="622" class="sub" text-anchor="middle">OpenAI-compatible (xAI, DeepSeek,</text>
- <text x="530" y="638" class="sub" text-anchor="middle">Kimi, Mistral): shared OpenAIProvider + base_url</text>
-
-
- <rect class="langchain" x="10" y="495" width="260" height="150" rx="8"></rect>
- <text x="140" y="522" class="title" text-anchor="middle" fill="#bd93f9">LangChain Fallback</text>
- <text x="140" y="545" class="sub" text-anchor="middle">create_model()</text>
- <text x="140" y="565" class="path-lc" text-anchor="middle">ChatGroq</text>
- <text x="140" y="583" class="path-lc" text-anchor="middle">ChatCerebras</text>
- <text x="140" y="608" class="sub" text-anchor="middle">(providers without native</text>
- <text x="140" y="624" class="sub" text-anchor="middle">SDK implementation yet)</text>
-
-
- <path class="conn-native" d="M 530 645 L 530 690" marker-end="url(#arrow)"></path>
- <path class="conn-lc" d="M 140 645 L 140 680 L 340 680 L 340 690" marker-end="url(#arrow)"></path>
-
-
- <rect class="method" x="920" y="215" width="360" height="75" rx="8"></rect>
- <text x="1100" y="243" class="big" text-anchor="middle">execute_agent(parameters)</text>
- <text x="1100" y="263" class="sub" text-anchor="middle">execute_chat_agent(parameters)</text>
- <text x="1100" y="283" class="caption" text-anchor="middle">aiAgent, chatAgent, 11 specialized + 2 team leads</text>
-
-
- <path class="conn-lc" d="M 1100 290 L 1100 330" marker-end="url(#arrow)"></path>
-
-
- <rect class="langchain" x="920" y="330" width="360" height="130" rx="8"></rect>
- <text x="1100" y="358" class="title" text-anchor="middle" fill="#bd93f9">LangChain chat model</text>
- <text x="1100" y="382" class="sub" text-anchor="middle">create_model() -&gt; LangChain class</text>
- <text x="1100" y="402" class="path-lc" text-anchor="middle">ChatOpenAI / ChatAnthropic</text>
- <text x="1100" y="420" class="path-lc" text-anchor="middle">ChatGoogleGenerativeAI / ChatGroq / ...</text>
- <text x="1100" y="442" class="sub" text-anchor="middle">.bind_tools([StructuredTool, ...])</text>
-
-
- <path class="conn-lc" d="M 1100 460 L 1100 500" marker-end="url(#arrow)"></path>
-
-
- <rect class="langchain" x="900" y="500" width="400" height="155" rx="8"></rect>
- <text x="1100" y="528" class="title" text-anchor="middle" fill="#bd93f9">_run_agent_loop (plain async)</text>
- <text x="1100" y="552" class="sub" text-anchor="middle">for iteration in range(max): ainvoke -&gt; tool_calls?</text>
- <text x="1100" y="572" class="sub" text-anchor="middle">if tools: dispatch each, append ToolMessage, loop</text>
- <text x="1100" y="592" class="sub" text-anchor="middle">else: return final response</text>
- <text x="1100" y="615" class="caption" text-anchor="middle">Max iterations guard against tool loops</text>
- <text x="1100" y="635" class="caption" text-anchor="middle">Agent Teams: delegate_to_&lt;type&gt; tools auto-injected</text>
-
-
- <rect class="shared" x="340" y="690" width="720" height="85" rx="8"></rect>
- <text x="700" y="718" class="title" text-anchor="middle" fill="#50fa7b">Normalized LLMResponse</text>
- <text x="700" y="740" class="sub" text-anchor="middle">content, thinking, tool_calls, usage (tokens), model, finish_reason</text>
- <text x="700" y="758" class="caption" text-anchor="middle">services/llm/protocol.py -- dataclass shared across all providers</text>
-
-
- <path class="conn-lc" d="M 1100 655 L 1100 685 L 720 685 L 720 690" marker-end="url(#arrow)"></path>
-
-
- <rect class="shared" x="200" y="800" width="1000" height="80" rx="8"></rect>
- <text x="700" y="828" class="title" text-anchor="middle" fill="#50fa7b">Shared Infrastructure</text>
- <text x="700" y="850" class="sub" text-anchor="middle">compaction.py: token tracking, cost calculation, model-aware compaction (50% of context window)</text>
- <text x="700" y="868" class="sub" text-anchor="middle">pricing.py: USD cost per provider from config/pricing.json  |  model_registry.py: context length lookup</text>
-
-
- <path class="conn" d="M 700 775 L 700 800" marker-end="url(#arrow)"></path>
-</svg>
\ No newline at end of file
+ <rect class="bg" width="1165" height="985"/>
+
+ <!-- Title -->
+ <text class="title" x="582" y="42" text-anchor="middle">AI Service - Chat (native SDKs) vs Agent (LangChain loop)</text>
+ <text class="sub" x="582" y="66" text-anchor="middle">server/services/ai.py + server/services/llm/</text>
+
+ <!-- Entry -->
+ <rect class="panel p-pink" x="452" y="85" width="260" height="60" rx="8"/>
+ <text class="h1" x="582" y="112" text-anchor="middle">AIService</text>
+ <text class="sub" x="582" y="133" text-anchor="middle">server/services/ai.py</text>
+
+ <!-- Entry arrows -->
+ <path class="conn" d="M 512 145 V 156 H 340 V 200" marker-end="url(#arrow)"/>
+ <text class="label" x="400" y="152" text-anchor="middle">chat completion</text>
+ <path class="conn" d="M 652 145 V 156 H 900 V 200" marker-end="url(#arrow)"/>
+ <text class="label" x="795" y="152" text-anchor="middle">agent with tools</text>
+
+ <!-- Chat panel (cyan) -->
+ <text class="h2 accent-cyan" x="44" y="172">Chat path - native SDKs, unified</text>
+ <rect class="panel p-cyan" x="40" y="180" width="510" height="470" rx="10"/>
+
+ <rect class="box p-cyan" x="60" y="200" width="470" height="58" rx="6"/>
+ <text class="h2" x="295" y="224" text-anchor="middle">execute_chat(...)</text>
+ <text class="sub" x="295" y="244" text-anchor="middle">chat-model nodes: openaiChatModel, anthropicChatModel, ...</text>
+
+ <path class="conn" d="M 295 258 L 295 306" marker-end="url(#arrow)"/>
+ <text class="label" x="305" y="286">delegates (every provider)</text>
+
+ <rect class="box p-cyan" x="60" y="306" width="470" height="76" rx="6"/>
+ <text class="h2" x="295" y="330" text-anchor="middle">ChatUnifier.chat(provider=...)</text>
+ <text class="sub" x="295" y="350" text-anchor="middle">single facade - no per-provider branch</text>
+ <text class="sub" x="295" y="368" text-anchor="middle">typed SDK errors -&gt; NodeUserError</text>
+
+ <path class="conn" d="M 295 382 L 295 430" marker-end="url(#arrow)"/>
+ <text class="label" x="305" y="410">lookup</text>
+
+ <rect class="box p-cyan" x="60" y="430" width="470" height="58" rx="6"/>
+ <text class="h2" x="295" y="454" text-anchor="middle">ProviderRegistry</text>
+ <text class="sub" x="295" y="474" text-anchor="middle">get_provider(name) -&gt; ProviderSpec.factory(...)</text>
+
+ <path class="conn" d="M 295 488 L 295 536" marker-end="url(#arrow)"/>
+ <text class="label" x="305" y="516">spec.factory()</text>
+
+ <rect class="box p-cyan" x="60" y="536" width="470" height="94" rx="6"/>
+ <text class="h2" x="295" y="560" text-anchor="middle">Native provider clients (12)</text>
+ <text class="sub" x="295" y="580" text-anchor="middle">Anthropic &#183; OpenAI &#183; Gemini &#183; OpenRouter</text>
+ <text class="sub" x="295" y="598" text-anchor="middle">OpenAI-compat via base_url: xAI, DeepSeek, Kimi,</text>
+ <text class="sub" x="295" y="616" text-anchor="middle">Mistral, Groq, Cerebras, Ollama, LM Studio</text>
+
+ <!-- Agent panel (purple) -->
+ <text class="h2 accent-purple" x="589" y="172">Agent path - LangChain tool loop</text>
+ <rect class="panel p-purple" x="585" y="180" width="540" height="382" rx="10"/>
+
+ <rect class="box p-purple" x="605" y="200" width="500" height="76" rx="6"/>
+ <text class="h2" x="855" y="224" text-anchor="middle">execute_agent / execute_chat_agent</text>
+ <text class="sub" x="855" y="244" text-anchor="middle">aiAgent, chatAgent + specialized agents + team leads</text>
+ <text class="sub" x="855" y="262" text-anchor="middle">(CLI agents rlm / claude_code / codex bypass this loop)</text>
+
+ <path class="conn" d="M 855 276 L 855 324" marker-end="url(#arrow)"/>
+ <text class="label" x="865" y="304">builds model</text>
+
+ <rect class="box p-purple" x="605" y="324" width="500" height="76" rx="6"/>
+ <text class="h2" x="855" y="348" text-anchor="middle">create_model() -&gt; LangChain chat model</text>
+ <text class="sub" x="855" y="368" text-anchor="middle">ChatOpenAI / ChatAnthropic / ChatGoogleGenerativeAI / ...</text>
+ <text class="sub" x="855" y="386" text-anchor="middle">.bind_tools([StructuredTool, ...])</text>
+
+ <path class="conn" d="M 855 400 L 855 448" marker-end="url(#arrow)"/>
+ <text class="label" x="865" y="428">bind_tools</text>
+
+ <rect class="box p-purple" x="605" y="448" width="500" height="94" rx="6"/>
+ <text class="h2" x="855" y="472" text-anchor="middle">_run_agent_loop (plain async)</text>
+ <text class="sub" x="855" y="492" text-anchor="middle">loop: ainvoke -&gt; tool_calls? dispatch -&gt; ToolMessage</text>
+ <text class="sub" x="855" y="510" text-anchor="middle">max-iterations guard &#183; delegate_to_&lt;type&gt; auto-injected</text>
+ <text class="sub" x="855" y="528" text-anchor="middle">hot-rebind of tools after canvas mutations</text>
+
+ <!-- Convergence arrows -->
+ <path class="conn" d="M 295 630 V 662 H 462 V 706" marker-end="url(#arrow)"/>
+ <text class="label" x="307" y="680">LLMResponse</text>
+ <path class="conn" d="M 855 542 V 662 H 702 V 706" marker-end="url(#arrow)"/>
+ <text class="label" x="867" y="575">final message</text>
+
+ <!-- Shared panel (green) -->
+ <text class="h2 accent-green" x="582" y="682" text-anchor="middle">Shared convergence</text>
+ <rect class="panel p-green" x="282" y="690" width="600" height="254" rx="10"/>
+
+ <rect class="box p-green" x="302" y="706" width="560" height="76" rx="6"/>
+ <text class="h2" x="582" y="730" text-anchor="middle">Normalized response</text>
+ <text class="sub" x="582" y="750" text-anchor="middle">content &#183; thinking &#183; tool_calls &#183; usage &#183; model &#183; finish_reason</text>
+ <text class="sub" x="582" y="768" text-anchor="middle">services/llm/protocol.py (agent path: same fields in a result dict)</text>
+
+ <path class="conn" d="M 582 782 L 582 830" marker-end="url(#arrow)"/>
+ <text class="label" x="594" y="810">token/cost tracking after each turn</text>
+
+ <rect class="box p-green" x="302" y="830" width="560" height="94" rx="6"/>
+ <text class="h2" x="582" y="854" text-anchor="middle">Shared infrastructure</text>
+ <text class="sub" x="582" y="874" text-anchor="middle">compaction.py: post-turn token tracking + model-aware compaction</text>
+ <text class="sub" x="582" y="892" text-anchor="middle">pricing.py: USD cost from config/pricing.json</text>
+ <text class="sub" x="582" y="910" text-anchor="middle">model_registry.py: context-length lookup</text>
+</svg>
diff --git a/docs-internal/design-system/assets/diagrams/default-workflows.svg b/docs-internal/design-system/assets/diagrams/default-workflows.svg
index 380fce4b..1ff5cdbd 100644
--- a/docs-internal/design-system/assets/diagrams/default-workflows.svg
+++ b/docs-internal/design-system/assets/diagrams/default-workflows.svg
@@ -1,274 +1,186 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1100 1020" width="100%" preserveAspectRatio="xMidYMid meet" font-family="-apple-system, BlinkMacSystemFont, &#39;Segoe UI&#39;, Roboto, sans-serif">
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1240 1320" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
<defs>
- <marker id="arr" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
- <path d="M0,0 L10,5 L0,10 z" fill="#6b7280"></path>
+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
+ <path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"/>
</marker>
- <marker id="arr-purple" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
- <path d="M0,0 L10,5 L0,10 z" fill="#8b5cf6"></path>
- </marker>
- <marker id="arr-cyan" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
- <path d="M0,0 L10,5 L0,10 z" fill="#06b6d4"></path>
- </marker>
- <marker id="arr-green" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
- <path d="M0,0 L10,5 L0,10 z" fill="#10b981"></path>
- </marker>
-
+ <style>
+ .bg { fill: #282a36; }
+ .panel { fill: #44475a; stroke-width: 2; }
+ .p-cyan { stroke: #8be9fd; } .p-purple { stroke: #bd93f9; } .p-orange { stroke: #ffb86c; } .p-green { stroke: #50fa7b; } .p-pink { stroke: #ff79c6; }
+ .title { fill: #f8f8f2; font-size: 20px; font-weight: 700; }
+ .h1 { fill: #f8f8f2; font-size: 18px; font-weight: 700; }
+ .h2 { fill: #f8f8f2; font-size: 14px; font-weight: 700; }
+ .sub { fill: #f8f8f2; font-size: 12px; }
+ .small { fill: #f8f8f2; font-size: 10px; }
+ .label { fill: #f1fa8c; font-size: 11px; font-style: italic; }
+ .conn { stroke: #f8f8f2; stroke-width: 1.8; fill: none; }
+ .conn-dot { stroke: #6272a4; stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
+ .box { fill: #282a36; stroke-width: 1.5; }
+ .tier-label { fill: #6272a4; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
+ .accent-cyan { fill: #8be9fd; } .accent-purple { fill: #bd93f9; } .accent-green { fill: #50fa7b; } .accent-orange { fill: #ffb86c; } .accent-pink { fill: #ff79c6; }
+ </style>
</defs>
-
- <rect width="1100" height="1020" class="bg"></rect>
-
-
- <text x="550" y="40" text-anchor="middle" class="header-text">Three Workflows You Get on Day One</text>
- <text x="550" y="62" text-anchor="middle" class="header-sub">Open OpenCompany for the first time and these are already loaded. Each shows a different pattern you can copy.</text>
-
-
-
-
- <rect x="30" y="90" width="1040" height="240" class="row-card row-1"></rect>
- <circle cx="58" cy="118" r="14" class="num-bg-1"></circle>
- <text x="58" y="123" text-anchor="middle" class="num-txt">1</text>
- <text x="84" y="118" class="row-title">AI Assistant</text>
- <text x="84" y="135" class="row-tag">16 nodes · one smart agent with a full toolbox</text>
-
-
- <rect x="50" y="180" width="120" height="38" class="node-box node-trigger" rx="8"></rect>
- <text x="110" y="198" text-anchor="middle" class="node-txt">💬 Chat</text>
- <text x="110" y="212" text-anchor="middle" class="node-sub">in-app panel</text>
-
- <rect x="50" y="232" width="120" height="38" class="node-box node-trigger" rx="8"></rect>
- <text x="110" y="250" text-anchor="middle" class="node-txt">📱 Telegram</text>
- <text x="110" y="264" text-anchor="middle" class="node-sub">incoming message</text>
-
-
- <rect x="280" y="195" width="160" height="60" class="node-box node-agent-1" rx="10"></rect>
- <text x="360" y="220" text-anchor="middle" class="node-txt" style="font-size: 14px;">🤖 AI Agent</text>
- <text x="360" y="240" text-anchor="middle" class="node-sub">thinks, decides, acts</text>
-
-
- <path d="M 175 199 L 280 215" class="conn-flow-1" marker-end="url(#arr-purple)"></path>
- <path d="M 175 251 L 280 235" class="conn-flow-1" marker-end="url(#arr-purple)"></path>
-
-
- <rect x="220" y="280" width="100" height="32" class="node-box node-helper" rx="6"></rect>
- <text x="270" y="299" text-anchor="middle" class="node-txt">🧠 Memory</text>
-
- <rect x="330" y="280" width="100" height="32" class="node-box node-helper" rx="6"></rect>
- <text x="380" y="299" text-anchor="middle" class="node-txt">📚 Skills</text>
-
- <path d="M 320 255 L 270 280" class="conn-dotted"></path>
- <path d="M 400 255 L 380 280" class="conn-dotted"></path>
-
-
- <rect x="490" y="170" width="280" height="120" class="node-box" rx="10" style="fill: #fafafa; stroke: #d1d5db;"></rect>
- <text x="630" y="190" text-anchor="middle" class="node-txt" style="fill: #6b7280;">🔧 Toolbox</text>
-
- <rect x="500" y="200" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="542" y="215" text-anchor="middle" class="node-sub">🔍 Web search</text>
-
- <rect x="592" y="200" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="634" y="215" text-anchor="middle" class="node-sub">🌐 Browser</text>
-
- <rect x="684" y="200" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="726" y="215" text-anchor="middle" class="node-sub">📄 Files</text>
-
- <rect x="500" y="228" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="542" y="243" text-anchor="middle" class="node-sub">💻 Shell</text>
-
- <rect x="592" y="228" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="634" y="243" text-anchor="middle" class="node-sub">🐍 Python</text>
-
- <rect x="684" y="228" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="726" y="243" text-anchor="middle" class="node-sub">⚙ Processes</text>
-
- <rect x="546" y="256" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="588" y="271" text-anchor="middle" class="node-sub">📋 Todos</text>
-
- <rect x="638" y="256" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="680" y="271" text-anchor="middle" class="node-sub">+ more</text>
-
- <path d="M 440 225 L 490 225" class="conn-flow-1" marker-end="url(#arr-purple)"></path>
-
-
- <rect x="830" y="180" width="180" height="38" class="node-box node-output" rx="8"></rect>
- <text x="920" y="198" text-anchor="middle" class="node-txt">📤 Telegram Send</text>
- <text x="920" y="212" text-anchor="middle" class="node-sub">reply to user</text>
-
- <rect x="830" y="232" width="180" height="38" class="node-box node-output" rx="8"></rect>
- <text x="920" y="250" text-anchor="middle" class="node-txt">📝 Console</text>
- <text x="920" y="264" text-anchor="middle" class="node-sub">live log in UI</text>
-
- <path d="M 770 199 L 830 199" class="conn-flow-1" marker-end="url(#arr-purple)"></path>
- <path d="M 770 251 L 830 251" class="conn-flow-1" marker-end="url(#arr-purple)"></path>
-
-
- <text x="58" y="313" class="row-use">USE WHEN:</text>
- <text x="155" y="313" class="row-desc">You want one AI that can browse the web, run code on your machine, and chat over Telegram.</text>
-
-
-
-
- <rect x="30" y="355" width="1040" height="340" class="row-card row-2"></rect>
- <circle cx="58" cy="383" r="14" class="num-bg-2"></circle>
- <text x="58" y="388" text-anchor="middle" class="num-txt">2</text>
- <text x="84" y="383" class="row-title">AI Employee</text>
- <text x="84" y="400" class="row-tag">58 nodes · a team lead that delegates to 5 specialists</text>
-
-
- <rect x="50" y="450" width="120" height="38" class="node-box node-trigger" rx="8"></rect>
- <text x="110" y="468" text-anchor="middle" class="node-txt">💬 Chat</text>
- <text x="110" y="482" text-anchor="middle" class="node-sub">in-app panel</text>
-
- <rect x="50" y="500" width="120" height="38" class="node-box node-trigger" rx="8"></rect>
- <text x="110" y="518" text-anchor="middle" class="node-txt">📱 Telegram</text>
- <text x="110" y="532" text-anchor="middle" class="node-sub">incoming message</text>
-
-
- <rect x="240" y="465" width="170" height="62" class="node-box node-agent-2" rx="10"></rect>
- <text x="325" y="490" text-anchor="middle" class="node-txt" style="font-size: 14px;">👔 Zeenie</text>
- <text x="325" y="510" text-anchor="middle" class="node-sub">team lead — decides</text>
- <text x="325" y="522" text-anchor="middle" class="node-sub">who handles what</text>
-
- <path d="M 175 469 L 240 487" class="conn-flow-2" marker-end="url(#arr-cyan)"></path>
- <path d="M 175 519 L 240 505" class="conn-flow-2" marker-end="url(#arr-cyan)"></path>
-
-
- <rect x="245" y="545" width="78" height="26" class="node-box node-helper" rx="5"></rect>
- <text x="284" y="562" text-anchor="middle" class="node-sub">🧠 Memory</text>
-
- <rect x="327" y="545" width="78" height="26" class="node-box node-helper" rx="5"></rect>
- <text x="366" y="562" text-anchor="middle" class="node-sub">📚 Skills</text>
-
- <path d="M 290 527 L 284 545" class="conn-dotted"></path>
- <path d="M 360 527 L 366 545" class="conn-dotted"></path>
-
-
- <text x="465" y="497" class="label-italic">delegates to →</text>
-
-
- <rect x="555" y="395" width="220" height="48" class="node-box node-agent-2" rx="8"></rect>
- <text x="665" y="414" text-anchor="middle" class="node-txt">💻 Coding Agent</text>
- <text x="665" y="430" text-anchor="middle" class="node-sub">files · shell · Python · processes</text>
-
- <rect x="555" y="450" width="220" height="48" class="node-box node-agent-2" rx="8"></rect>
- <text x="665" y="469" text-anchor="middle" class="node-txt">📧 Productivity Agent</text>
- <text x="665" y="485" text-anchor="middle" class="node-sub">Gmail · Calendar · Drive · Sheets</text>
-
- <rect x="555" y="505" width="220" height="48" class="node-box node-agent-2" rx="8"></rect>
- <text x="665" y="524" text-anchor="middle" class="node-txt">🗺 Travel Agent</text>
- <text x="665" y="540" text-anchor="middle" class="node-sub">Maps · geocoding · nearby places</text>
-
- <rect x="555" y="560" width="220" height="48" class="node-box node-agent-2" rx="8"></rect>
- <text x="665" y="579" text-anchor="middle" class="node-txt">🌐 Web Agent</text>
- <text x="665" y="595" text-anchor="middle" class="node-sub">browser · HTTP · web search</text>
-
- <rect x="555" y="615" width="220" height="48" class="node-box node-agent-2" rx="8"></rect>
- <text x="665" y="634" text-anchor="middle" class="node-txt">💬 Social Agent</text>
- <text x="665" y="650" text-anchor="middle" class="node-sub">Twitter · WhatsApp</text>
-
-
- <path d="M 410 480 Q 480 480 480 419 L 555 419" class="conn-delegate" marker-end="url(#arr-cyan)"></path>
- <path d="M 410 490 Q 490 490 490 474 L 555 474" class="conn-delegate" marker-end="url(#arr-cyan)"></path>
- <path d="M 410 500 L 555 529" class="conn-delegate" marker-end="url(#arr-cyan)"></path>
- <path d="M 410 510 Q 490 510 490 584 L 555 584" class="conn-delegate" marker-end="url(#arr-cyan)"></path>
- <path d="M 410 520 Q 480 520 480 639 L 555 639" class="conn-delegate" marker-end="url(#arr-cyan)"></path>
-
-
- <text x="785" y="430" class="label-italic">each has its own</text>
- <text x="785" y="445" class="label-italic">memory · skills · tools</text>
-
-
- <rect x="830" y="540" width="180" height="38" class="node-box node-output" rx="8"></rect>
- <text x="920" y="558" text-anchor="middle" class="node-txt">📤 Telegram</text>
- <text x="920" y="572" text-anchor="middle" class="node-sub">reply to user</text>
-
- <rect x="830" y="585" width="180" height="38" class="node-box node-output" rx="8"></rect>
- <text x="920" y="603" text-anchor="middle" class="node-txt">📝 Console</text>
- <text x="920" y="617" text-anchor="middle" class="node-sub">per-agent logs</text>
-
-
- <text x="58" y="678" class="row-use">USE WHEN:</text>
- <text x="155" y="678" class="row-desc">You want one chat that handles everything — and each domain has a specialist that&#39;s actually good at it.</text>
-
-
-
-
- <rect x="30" y="720" width="1040" height="240" class="row-card row-3"></rect>
- <circle cx="58" cy="748" r="14" class="num-bg-3"></circle>
- <text x="58" y="753" text-anchor="middle" class="num-txt">3</text>
- <text x="84" y="748" class="row-title">Claude Assistant</text>
- <text x="84" y="765" class="row-tag">15 nodes · Anthropic&#39;s Claude Code in a workflow, sessions persist across days</text>
-
-
- <rect x="50" y="810" width="120" height="38" class="node-box node-trigger" rx="8"></rect>
- <text x="110" y="828" text-anchor="middle" class="node-txt">💬 Chat</text>
- <text x="110" y="842" text-anchor="middle" class="node-sub">in-app panel</text>
-
- <rect x="50" y="862" width="120" height="38" class="node-box node-trigger" rx="8"></rect>
- <text x="110" y="880" text-anchor="middle" class="node-txt">📱 Telegram</text>
- <text x="110" y="894" text-anchor="middle" class="node-sub">incoming message</text>
-
-
- <rect x="280" y="825" width="160" height="60" class="node-box node-agent-3" rx="10"></rect>
- <text x="360" y="850" text-anchor="middle" class="node-txt" style="font-size: 14px;">🧠 Claude Code</text>
- <text x="360" y="870" text-anchor="middle" class="node-sub">session-persistent CLI</text>
-
- <path d="M 175 829 L 280 845" class="conn-flow-3" marker-end="url(#arr-green)"></path>
- <path d="M 175 881 L 280 865" class="conn-flow-3" marker-end="url(#arr-green)"></path>
-
-
- <rect x="270" y="908" width="80" height="28" class="node-box node-helper" rx="5"></rect>
- <text x="310" y="926" text-anchor="middle" class="node-sub">🧠 Memory</text>
-
- <rect x="365" y="908" width="80" height="28" class="node-box node-helper" rx="5"></rect>
- <text x="405" y="926" text-anchor="middle" class="node-sub">📚 Skills</text>
-
- <path d="M 320 885 L 310 908" class="conn-dotted"></path>
- <path d="M 400 885 L 405 908" class="conn-dotted"></path>
-
-
- <rect x="490" y="800" width="280" height="120" class="node-box" rx="10" style="fill: #fafafa; stroke: #d1d5db;"></rect>
- <text x="630" y="820" text-anchor="middle" class="node-txt" style="fill: #6b7280;">🔧 Coding Toolbox</text>
-
- <rect x="500" y="830" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="542" y="845" text-anchor="middle" class="node-sub">📄 Files</text>
-
- <rect x="592" y="830" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="634" y="845" text-anchor="middle" class="node-sub">🔎 FS Search</text>
-
- <rect x="684" y="830" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="726" y="845" text-anchor="middle" class="node-sub">💻 Shell</text>
-
- <rect x="500" y="858" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="542" y="873" text-anchor="middle" class="node-sub">⚙ Processes</text>
-
- <rect x="592" y="858" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="634" y="873" text-anchor="middle" class="node-sub">🌐 Browser</text>
-
- <rect x="684" y="858" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="726" y="873" text-anchor="middle" class="node-sub">🔍 Search</text>
-
- <rect x="592" y="886" width="84" height="22" class="node-tool" rx="5"></rect>
- <text x="634" y="901" text-anchor="middle" class="node-sub">📋 Todos</text>
-
- <path d="M 440 855 L 490 855" class="conn-flow-3" marker-end="url(#arr-green)"></path>
-
-
- <rect x="830" y="810" width="180" height="38" class="node-box node-output" rx="8"></rect>
- <text x="920" y="828" text-anchor="middle" class="node-txt">📤 Telegram Send</text>
- <text x="920" y="842" text-anchor="middle" class="node-sub">reply to user</text>
-
- <rect x="830" y="862" width="180" height="38" class="node-box node-output" rx="8"></rect>
- <text x="920" y="880" text-anchor="middle" class="node-txt">📝 Console</text>
- <text x="920" y="894" text-anchor="middle" class="node-sub">live log in UI</text>
-
- <path d="M 770 829 L 830 829" class="conn-flow-3" marker-end="url(#arr-green)"></path>
- <path d="M 770 881 L 830 881" class="conn-flow-3" marker-end="url(#arr-green)"></path>
-
-
- <text x="58" y="945" class="row-use">USE WHEN:</text>
- <text x="155" y="945" class="row-desc">Your AI needs to actually ship code — refactor, build features, debug — across sessions that persist.</text>
-
-
- <text x="550" y="995" text-anchor="middle" class="label-italic" style="font-size: 12px;">All three are real .json files in the /workflows folder. Open them in the canvas, edit anything, save as your own.</text>
-
-</svg>
\ No newline at end of file
+ <rect class="bg" width="1240" height="1320"/>
+
+ <!-- Header -->
+ <text x="620" y="42" text-anchor="middle" class="title">Three Workflows You Get on Day One</text>
+ <text x="620" y="68" text-anchor="middle" class="sub">Loaded automatically on first launch. Each shows a different pattern you can copy.</text>
+
+ <!-- ================= ROW 1: AI ASSISTANT (purple) ================= -->
+ <rect class="panel p-purple" x="30" y="95" width="1180" height="340" rx="10"/>
+ <text x="50" y="129" class="h1 accent-purple">AI Assistant</text>
+ <text x="50" y="151" class="sub">16 nodes &#183; one smart agent with a full toolbox</text>
+
+ <!-- triggers -->
+ <rect class="box p-orange" x="50" y="175" width="180" height="40" rx="6"/>
+ <text x="140" y="200" text-anchor="middle" class="h2">Chat Trigger</text>
+ <rect class="box p-orange" x="50" y="235" width="180" height="40" rx="6"/>
+ <text x="140" y="260" text-anchor="middle" class="h2">Telegram Receive</text>
+
+ <!-- agent -->
+ <rect class="box p-purple" x="380" y="195" width="200" height="60" rx="8"/>
+ <text x="480" y="230" text-anchor="middle" class="h2">AI Agent</text>
+
+ <path class="conn" d="M 230 195 L 380 213" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 230 255 L 380 237" marker-end="url(#arrow)"/>
+
+ <!-- outputs -->
+ <rect class="box p-pink" x="700" y="175" width="180" height="40" rx="6"/>
+ <text x="790" y="200" text-anchor="middle" class="h2">Console</text>
+ <rect class="box p-pink" x="700" y="235" width="180" height="40" rx="6"/>
+ <text x="790" y="260" text-anchor="middle" class="h2">Telegram Send</text>
+
+ <path class="conn" d="M 580 213 L 700 195" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 580 237 L 700 255" marker-end="url(#arrow)"/>
+
+ <!-- dotted attachment note -->
+ <path class="conn-dot" d="M 560 195 L 560 160 L 1020 160 L 1020 175"/>
+ <rect class="box p-cyan" x="930" y="175" width="250" height="44" rx="6"/>
+ <text x="1055" y="193" text-anchor="middle" class="sub">Memory + Skills</text>
+ <text x="1055" y="209" text-anchor="middle" class="sub">attached to the agent</text>
+
+ <!-- toolbox cluster -->
+ <path class="conn-dot" d="M 480 255 L 480 305"/>
+ <rect class="box p-purple" x="380" y="305" width="560" height="80" rx="8"/>
+ <text x="660" y="329" text-anchor="middle" class="h2 accent-purple">Toolbox (9 tools)</text>
+ <text x="660" y="351" text-anchor="middle" class="small">web search &#183; browser &#183; file read/write &#183; fs search</text>
+ <text x="660" y="369" text-anchor="middle" class="small">shell &#183; Python &#183; processes &#183; todos</text>
+
+ <text x="50" y="415" class="sub"><tspan class="accent-purple">Use when:</tspan> one AI that browses, runs code, and chats over Telegram.</text>
+
+ <!-- ================= ROW 2: AI EMPLOYEE (cyan) ================= -->
+ <rect class="panel p-cyan" x="30" y="465" width="1180" height="410" rx="10"/>
+ <text x="50" y="499" class="h1 accent-cyan">AI Employee</text>
+ <text x="50" y="521" class="sub">58 nodes &#183; a team lead that delegates to 5 specialists</text>
+
+ <!-- triggers -->
+ <rect class="box p-orange" x="50" y="541" width="180" height="40" rx="6"/>
+ <text x="140" y="566" text-anchor="middle" class="h2">Chat Trigger</text>
+ <rect class="box p-orange" x="50" y="599" width="180" height="40" rx="6"/>
+ <text x="140" y="624" text-anchor="middle" class="h2">Telegram Receive</text>
+ <rect class="box p-orange" x="50" y="657" width="180" height="40" rx="6"/>
+ <text x="140" y="682" text-anchor="middle" class="h2">Task Completed</text>
+
+ <!-- team lead -->
+ <rect class="box p-cyan" x="380" y="589" width="200" height="60" rx="8"/>
+ <text x="480" y="613" text-anchor="middle" class="h2">Zeenie</text>
+ <text x="480" y="633" text-anchor="middle" class="small">team lead</text>
+
+ <path class="conn" d="M 230 561 L 380 604" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 230 619 L 380 619" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 230 677 L 380 634" marker-end="url(#arrow)"/>
+
+ <!-- outputs -->
+ <rect class="box p-pink" x="700" y="570" width="180" height="40" rx="6"/>
+ <text x="790" y="595" text-anchor="middle" class="h2">Console</text>
+ <rect class="box p-pink" x="700" y="628" width="180" height="40" rx="6"/>
+ <text x="790" y="653" text-anchor="middle" class="h2">Telegram Send</text>
+
+ <path class="conn" d="M 580 609 L 700 590" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 580 629 L 700 648" marker-end="url(#arrow)"/>
+
+ <!-- dotted attachment note -->
+ <path class="conn-dot" d="M 560 589 L 560 553 L 1020 553 L 1020 599"/>
+ <rect class="box p-purple" x="930" y="599" width="250" height="44" rx="6"/>
+ <text x="1055" y="617" text-anchor="middle" class="sub">own Memory + Skills</text>
+ <text x="1055" y="633" text-anchor="middle" class="sub">+ todos + processes</text>
+
+ <!-- delegation trunk + bus -->
+ <path class="conn" d="M 480 649 L 480 715"/>
+ <text x="495" y="690" class="label">delegates to</text>
+ <path class="conn" d="M 210 715 L 1050 715"/>
+ <path class="conn" d="M 210 715 L 210 746" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 450 715 L 450 746" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 670 715 L 670 746" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 860 715 L 860 746" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 1050 715 L 1050 746" marker-end="url(#arrow)"/>
+
+ <!-- specialists -->
+ <rect class="box p-cyan" x="110" y="747" width="200" height="56" rx="6"/>
+ <text x="210" y="770" text-anchor="middle" class="h2">Coding Agent</text>
+ <text x="210" y="790" text-anchor="middle" class="small">files &#183; shell &#183; Python</text>
+
+ <rect class="box p-cyan" x="335" y="747" width="230" height="56" rx="6"/>
+ <text x="450" y="770" text-anchor="middle" class="h2">Productivity Agent</text>
+ <text x="450" y="790" text-anchor="middle" class="small">Gmail &#183; Calendar &#183; Drive &#183; Sheets</text>
+
+ <rect class="box p-cyan" x="590" y="747" width="160" height="56" rx="6"/>
+ <text x="670" y="770" text-anchor="middle" class="h2">Travel Agent</text>
+ <text x="670" y="790" text-anchor="middle" class="small">Maps &#183; places</text>
+
+ <rect class="box p-cyan" x="775" y="747" width="170" height="56" rx="6"/>
+ <text x="860" y="770" text-anchor="middle" class="h2">Web Agent</text>
+ <text x="860" y="790" text-anchor="middle" class="small">browser &#183; HTTP &#183; search</text>
+
+ <rect class="box p-cyan" x="970" y="747" width="160" height="56" rx="6"/>
+ <text x="1050" y="770" text-anchor="middle" class="h2">Social Agent</text>
+ <text x="1050" y="790" text-anchor="middle" class="small">Twitter &#183; WhatsApp</text>
+
+ <text x="620" y="828" text-anchor="middle" class="small">each specialist has its own memory &#183; skills &#183; tools &#183; console</text>
+
+ <text x="50" y="856" class="sub"><tspan class="accent-cyan">Use when:</tspan> one chat handles everything, each domain gets a real specialist.</text>
+
+ <!-- ================= ROW 3: CLAUDE ASSISTANT (green) ================= -->
+ <rect class="panel p-green" x="30" y="905" width="1180" height="340" rx="10"/>
+ <text x="50" y="939" class="h1 accent-green">Claude Assistant</text>
+ <text x="50" y="961" class="sub">15 nodes &#183; Claude Code in a workflow, sessions persist across days</text>
+
+ <!-- triggers -->
+ <rect class="box p-orange" x="50" y="985" width="180" height="40" rx="6"/>
+ <text x="140" y="1010" text-anchor="middle" class="h2">Chat Trigger</text>
+ <rect class="box p-orange" x="50" y="1045" width="180" height="40" rx="6"/>
+ <text x="140" y="1070" text-anchor="middle" class="h2">Telegram Receive</text>
+
+ <!-- agent -->
+ <rect class="box p-green" x="380" y="1005" width="200" height="60" rx="8"/>
+ <text x="480" y="1040" text-anchor="middle" class="h2">Claude Code</text>
+
+ <path class="conn" d="M 230 1005 L 380 1023" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 230 1065 L 380 1047" marker-end="url(#arrow)"/>
+
+ <!-- outputs -->
+ <rect class="box p-pink" x="700" y="985" width="180" height="40" rx="6"/>
+ <text x="790" y="1010" text-anchor="middle" class="h2">Console</text>
+ <rect class="box p-pink" x="700" y="1045" width="180" height="40" rx="6"/>
+ <text x="790" y="1070" text-anchor="middle" class="h2">Telegram Send</text>
+
+ <path class="conn" d="M 580 1023 L 700 1005" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 580 1047 L 700 1065" marker-end="url(#arrow)"/>
+
+ <!-- dotted attachment note -->
+ <path class="conn-dot" d="M 560 1005 L 560 970 L 1020 970 L 1020 985"/>
+ <rect class="box p-cyan" x="930" y="985" width="250" height="44" rx="6"/>
+ <text x="1055" y="1011" text-anchor="middle" class="sub">Memory + Skills attached</text>
+
+ <!-- toolbox cluster -->
+ <path class="conn-dot" d="M 480 1065 L 480 1115"/>
+ <rect class="box p-green" x="380" y="1115" width="560" height="80" rx="8"/>
+ <text x="660" y="1139" text-anchor="middle" class="h2 accent-green">Coding toolbox (8 tools)</text>
+ <text x="660" y="1161" text-anchor="middle" class="small">files &#183; fs search &#183; shell &#183; processes</text>
+ <text x="660" y="1179" text-anchor="middle" class="small">browser &#183; web search &#183; todos</text>
+
+ <text x="50" y="1225" class="sub"><tspan class="accent-green">Use when:</tspan> your AI needs to actually ship code - refactor, build, debug.</text>
+
+ <!-- Footer -->
+ <text x="620" y="1285" text-anchor="middle" class="sub">All three are real .json files in the .opencompany/workflows folder. Open them on the canvas, edit anything, save your own version.</text>
+</svg>
diff --git a/docs-internal/design-system/assets/diagrams/execution-flow.svg b/docs-internal/design-system/assets/diagrams/execution-flow.svg
index ae883a26..d3ee53bb 100644
--- a/docs-internal/design-system/assets/diagrams/execution-flow.svg
+++ b/docs-internal/design-system/assets/diagrams/execution-flow.svg
@@ -1,90 +1,145 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, &#39;SFMono-Regular&#39;, Menlo, Consolas, monospace">
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1460 1300" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
- <path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"></path>
+ <path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"/>
</marker>
-
+ <style>
+ .bg { fill: #282a36; }
+ .panel { fill: #44475a; stroke-width: 2; }
+ .p-cyan { stroke: #8be9fd; } .p-purple { stroke: #bd93f9; } .p-orange { stroke: #ffb86c; } .p-green { stroke: #50fa7b; } .p-pink { stroke: #ff79c6; }
+ .title { fill: #f8f8f2; font-size: 20px; font-weight: 700; }
+ .h1 { fill: #f8f8f2; font-size: 18px; font-weight: 700; }
+ .h2 { fill: #f8f8f2; font-size: 14px; font-weight: 700; }
+ .sub { fill: #f8f8f2; font-size: 12px; }
+ .small { fill: #f8f8f2; font-size: 10px; }
+ .label { fill: #f1fa8c; font-size: 11px; font-style: italic; }
+ .conn { stroke: #f8f8f2; stroke-width: 1.8; fill: none; }
+ .conn-dot { stroke: #6272a4; stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
+ .box { fill: #282a36; stroke-width: 1.5; }
+ .tier-label { fill: #6272a4; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
+ .accent-cyan { fill: #8be9fd; } .accent-purple { fill: #bd93f9; } .accent-green { fill: #50fa7b; } .accent-orange { fill: #ffb86c; } .accent-pink { fill: #ff79c6; }
+ </style>
</defs>
-
- <rect class="bg" width="1200" height="800"></rect>
-
-
- <rect class="entry" x="460" y="30" width="280" height="60" rx="8"></rect>
- <text x="600" y="58" class="title" text-anchor="middle">workflow.execute()</text>
- <text x="600" y="78" class="sub" text-anchor="middle">(WorkflowService facade)</text>
-
-
- <path class="conn" d="M 600 90 L 600 135" marker-end="url(#arrow)"></path>
-
-
- <polygon class="decision" points="600,140 780,210 600,280 420,210"></polygon>
- <text x="600" y="200" class="big" text-anchor="middle">TEMPORAL_ENABLED</text>
- <text x="600" y="225" class="big" text-anchor="middle">and reachable?</text>
-
-
- <path class="conn-yes" d="M 780 210 L 950 210 L 950 320" marker-end="url(#arrow)"></path>
- <text x="830" y="200" class="branch-label">yes</text>
-
-
- <path class="conn-no" d="M 420 210 L 260 210 L 260 280" marker-end="url(#arrow)"></path>
- <text x="325" y="200" class="branch-label">no</text>
-
-
- <polygon class="decision" points="260,285 430,350 260,415 90,350"></polygon>
- <text x="260" y="345" class="big" text-anchor="middle">Redis</text>
- <text x="260" y="370" class="big" text-anchor="middle">available?</text>
-
-
- <path class="conn-yes" d="M 430 350 L 600 350 L 600 320" marker-end="url(#arrow)"></path>
- <text x="475" y="340" class="branch-label">yes</text>
-
-
- <path class="conn-no" d="M 260 415 L 260 445" marker-end="url(#arrow)"></path>
- <text x="200" y="440" class="branch-label">no</text>
-
-
-
- <rect class="path-temporal" x="820" y="320" width="260" height="150" rx="8"></rect>
- <text x="950" y="348" class="mode-label" text-anchor="middle">Temporal Distributed</text>
- <text x="950" y="372" class="sub" text-anchor="middle">per-node activities</text>
- <text x="950" y="392" class="sub" text-anchor="middle">3 retries, 10 min timeout</text>
- <text x="950" y="412" class="sub" text-anchor="middle">horizontal scaling</text>
- <text x="950" y="432" class="sub" text-anchor="middle">FIRST_COMPLETED scheduling</text>
- <text x="950" y="458" class="caption" text-anchor="middle">services/temporal/</text>
-
-
- <rect class="path-redis" x="470" y="320" width="260" height="150" rx="8"></rect>
- <text x="600" y="348" class="mode-label" text-anchor="middle">Parallel Local (Redis)</text>
- <text x="600" y="372" class="sub" text-anchor="middle">decide loop + Kahn layers</text>
- <text x="600" y="392" class="sub" text-anchor="middle">asyncio.gather() fork/join</text>
- <text x="600" y="412" class="sub" text-anchor="middle">Prefect-style input hash cache</text>
- <text x="600" y="432" class="sub" text-anchor="middle">DLQ + heartbeat recovery</text>
- <text x="600" y="458" class="caption" text-anchor="middle">services/execution/</text>
-
-
- <rect class="path-seq" x="120" y="445" width="280" height="120" rx="8"></rect>
- <text x="260" y="473" class="mode-label" text-anchor="middle">Sequential Fallback</text>
- <text x="260" y="497" class="sub" text-anchor="middle">simple topological walk</text>
- <text x="260" y="517" class="sub" text-anchor="middle">no cache, no retry, no DLQ</text>
- <text x="260" y="537" class="sub" text-anchor="middle">minimal environments only</text>
- <text x="260" y="558" class="caption" text-anchor="middle">_execute_sequential()</text>
-
-
- <path class="conn" d="M 950 470 L 950 590 L 600 590" marker-end="url(#arrow)"></path>
- <path class="conn" d="M 600 470 L 600 590" marker-end="url(#arrow)"></path>
- <path class="conn" d="M 260 565 L 260 590 L 600 590" marker-end="url(#arrow)"></path>
-
-
- <rect class="shared" x="330" y="595" width="540" height="90" rx="8"></rect>
- <text x="600" y="625" class="title" text-anchor="middle">NodeExecutor.execute()</text>
- <text x="600" y="648" class="sub" text-anchor="middle">registry dispatch: {node_type: handler via functools.partial}</text>
- <text x="600" y="668" class="sub" text-anchor="middle">handlers/*.py -&gt; result dict -&gt; ExecutionContext</text>
-
-
- <path class="conn" d="M 600 685 L 600 715" marker-end="url(#arrow)"></path>
-
-
- <rect class="output" x="380" y="720" width="440" height="60" rx="8"></rect>
- <text x="600" y="745" class="title" text-anchor="middle">Status broadcast via StatusBroadcaster</text>
- <text x="600" y="765" class="sub" text-anchor="middle">node_status + node_output -&gt; Frontend WebSocket</text>
-</svg>
\ No newline at end of file
+ <rect class="bg" width="1460" height="1300"/>
+
+ <!-- Title -->
+ <text x="40" y="45" class="title">How Workflows Execute</text>
+ <text x="40" y="68" class="sub">Two entry points -&gt; WorkflowService routing -&gt; shared node dispatch</text>
+
+ <!-- Lane labels -->
+ <text x="250" y="92" class="tier-label" text-anchor="middle">CANVAS RUN PATH</text>
+ <text x="990" y="92" class="tier-label" text-anchor="middle">DEPLOYED PATH</text>
+
+ <!-- Entry box 1: Per-node Run (cyan) -->
+ <rect class="panel p-cyan" x="40" y="100" width="420" height="96" rx="8"/>
+ <text x="250" y="130" class="h1" text-anchor="middle">Per-node "Run"</text>
+ <text x="250" y="156" class="sub" text-anchor="middle">execute_node WS msg -&gt; WorkflowService.execute_node</text>
+ <text x="250" y="178" class="sub" text-anchor="middle">runs ONE node &#183; no mode routing</text>
+
+ <!-- Entry box 2: Toolbar Start (purple) -->
+ <rect class="panel p-purple" x="780" y="100" width="420" height="96" rx="8"/>
+ <text x="990" y="130" class="h1" text-anchor="middle">Toolbar "Start"</text>
+ <text x="990" y="156" class="sub" text-anchor="middle">deploy_workflow WS msg -&gt; DeploymentManager.deploy</text>
+ <text x="990" y="178" class="sub" text-anchor="middle">(button label is Start, toggles to Stop)</text>
+
+ <!-- Canvas lane: straight down to convergence -->
+ <path class="conn" d="M 250 196 L 250 1038" marker-end="url(#arrow)"/>
+ <text x="262" y="250" class="label">direct dispatch</text>
+ <text x="270" y="500" class="small" style="fill:#6272a4">canvas trigger waits use in-memory</text>
+ <text x="270" y="518" class="small" style="fill:#6272a4">event_waiter (asyncio.Future)</text>
+
+ <!-- Deployed lane -->
+ <path class="conn" d="M 990 196 L 990 238" marker-end="url(#arrow)"/>
+
+ <rect class="panel p-purple" x="775" y="240" width="430" height="90" rx="8"/>
+ <text x="990" y="266" class="h2" text-anchor="middle">Durable trigger listeners</text>
+ <text x="990" y="288" class="small" text-anchor="middle">TriggerListenerWorkflow (push) &#183; PollingTriggerWorkflow (poll)</text>
+ <text x="990" y="308" class="small" text-anchor="middle">Temporal Schedule (cron, 24h catch-up)</text>
+
+ <path class="conn" d="M 990 330 L 990 370" marker-end="url(#arrow)"/>
+ <text x="1002" y="356" class="label">on event</text>
+
+ <rect class="panel p-purple" x="775" y="372" width="430" height="90" rx="8"/>
+ <text x="990" y="398" class="h2" text-anchor="middle">dispatch.emit(event)</text>
+ <text x="990" y="420" class="small" text-anchor="middle">Temporal Visibility query: EventType=... AND Running</text>
+ <text x="990" y="440" class="small" text-anchor="middle">-&gt; Signal each matching listener</text>
+
+ <path class="conn" d="M 990 462 L 990 502" marker-end="url(#arrow)"/>
+ <text x="1002" y="488" class="label">Signal</text>
+
+ <rect class="panel p-purple" x="775" y="504" width="430" height="72" rx="8"/>
+ <text x="990" y="530" class="h2" text-anchor="middle">Per-firing child run</text>
+ <text x="990" y="552" class="small" text-anchor="middle">child MachinaWorkflow per event &#183; trigger node _pre_executed</text>
+
+ <!-- Deployed lane into router -->
+ <path class="conn" d="M 990 576 L 990 608 L 620 608 L 620 636" marker-end="url(#arrow)"/>
+
+ <!-- Router diamond 1 -->
+ <polygon class="box p-orange" points="620,638 795,700 620,762 445,700"/>
+ <text x="620" y="696" class="h2" text-anchor="middle">TEMPORAL_ENABLED</text>
+ <text x="620" y="716" class="h2" text-anchor="middle">and worker wired?</text>
+
+ <!-- D1 no -> D2 -->
+ <path class="conn" d="M 795 700 L 856 700" marker-end="url(#arrow)"/>
+ <text x="812" y="692" class="label">no</text>
+
+ <!-- D1 yes -> Temporal box -->
+ <path class="conn" d="M 620 762 L 620 788 L 520 788 L 520 828" marker-end="url(#arrow)"/>
+ <text x="630" y="782" class="label">yes</text>
+
+ <!-- Router diamond 2 -->
+ <polygon class="box p-orange" points="990,645 1120,700 990,755 860,700"/>
+ <text x="990" y="696" class="h2" text-anchor="middle">Redis</text>
+ <text x="990" y="716" class="h2" text-anchor="middle">available?</text>
+
+ <!-- D2 yes -> Parallel box -->
+ <path class="conn" d="M 990 755 L 990 788 L 935 788 L 935 828" marker-end="url(#arrow)"/>
+ <text x="1000" y="780" class="label">yes</text>
+
+ <!-- D2 no -> Sequential box -->
+ <path class="conn" d="M 1120 700 L 1290 700 L 1290 828" marker-end="url(#arrow)"/>
+ <text x="1140" y="692" class="label">no</text>
+
+ <!-- Mode box: Temporal Distributed -->
+ <rect class="panel p-orange" x="330" y="830" width="380" height="152" rx="8"/>
+ <text x="520" y="856" class="h2" text-anchor="middle">Temporal Distributed</text>
+ <text x="520" y="880" class="sub" text-anchor="middle">MachinaWorkflow orchestrator (FIRST_COMPLETED)</text>
+ <text x="520" y="900" class="sub" text-anchor="middle">per-type activities node.{type}.v{ver}</text>
+ <text x="520" y="920" class="sub" text-anchor="middle">3 retries &#183; 10 min timeout &#183; heartbeats</text>
+ <text x="520" y="940" class="sub" text-anchor="middle">per-queue TemporalWorkerPool (default on)</text>
+ <text x="520" y="964" class="small" style="fill:#6272a4" text-anchor="middle">services/temporal/</text>
+
+ <!-- Mode box: Parallel Local (Redis) -->
+ <rect class="panel p-orange" x="760" y="830" width="350" height="132" rx="8"/>
+ <text x="935" y="856" class="h2" text-anchor="middle">Parallel Local (Redis)</text>
+ <text x="935" y="880" class="sub" text-anchor="middle">decide loop + Kahn layers</text>
+ <text x="935" y="900" class="sub" text-anchor="middle">asyncio.gather() fork/join</text>
+ <text x="935" y="920" class="sub" text-anchor="middle">input-hash cache &#183; DLQ + heartbeat recovery</text>
+ <text x="935" y="944" class="small" style="fill:#6272a4" text-anchor="middle">services/execution/</text>
+
+ <!-- Mode box: Sequential Fallback -->
+ <rect class="panel p-orange" x="1160" y="830" width="260" height="112" rx="8"/>
+ <text x="1290" y="856" class="h2" text-anchor="middle">Sequential Fallback</text>
+ <text x="1290" y="880" class="sub" text-anchor="middle">topological walk</text>
+ <text x="1290" y="900" class="sub" text-anchor="middle">no cache, no retry, no DLQ</text>
+ <text x="1290" y="924" class="small" style="fill:#6272a4" text-anchor="middle">_execute_sequential()</text>
+
+ <!-- Mode boxes -> convergence -->
+ <path class="conn" d="M 520 982 L 520 1038" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 935 962 L 935 1038" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 1290 942 L 1290 1087 L 1004 1087" marker-end="url(#arrow)"/>
+
+ <!-- Convergence box -->
+ <rect class="panel p-green" x="220" y="1040" width="780" height="94" rx="8"/>
+ <text x="610" y="1070" class="h1" text-anchor="middle">NodeExecutor.execute()</text>
+ <text x="610" y="1094" class="sub" text-anchor="middle">plugin registry dispatch &#183; class-based plugins in server/nodes/&lt;group&gt;/</text>
+ <text x="610" y="1114" class="sub" text-anchor="middle">-&gt; result dict</text>
+
+ <!-- Convergence -> output -->
+ <path class="conn" d="M 610 1134 L 610 1166" marker-end="url(#arrow)"/>
+
+ <!-- Output box -->
+ <rect class="panel p-green" x="320" y="1170" width="580" height="78" rx="8"/>
+ <text x="610" y="1198" class="h1" text-anchor="middle">StatusBroadcaster</text>
+ <text x="610" y="1222" class="sub" text-anchor="middle">node_status + node_output (CloudEvents envelope) -&gt; frontend WebSocket</text>
+</svg>
diff --git a/docs-internal/design-system/assets/diagrams/how-it-works.svg b/docs-internal/design-system/assets/diagrams/how-it-works.svg
index 33c69332..5f98dfb4 100644
--- a/docs-internal/design-system/assets/diagrams/how-it-works.svg
+++ b/docs-internal/design-system/assets/diagrams/how-it-works.svg
@@ -1,164 +1,101 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1100 620" width="100%" preserveAspectRatio="xMidYMid meet" font-family="-apple-system, BlinkMacSystemFont, &#39;Segoe UI&#39;, Roboto, sans-serif">
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 540" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
<defs>
- <marker id="arrow-flow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
- <path d="M0,0 L10,5 L0,10 z" fill="#6b7280"></path>
+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
+ <path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"/>
</marker>
-
+ <style>
+ .bg { fill: #282a36; }
+ .panel { fill: #44475a; stroke-width: 2; }
+ .p-cyan { stroke: #8be9fd; } .p-purple { stroke: #bd93f9; } .p-orange { stroke: #ffb86c; } .p-green { stroke: #50fa7b; } .p-pink { stroke: #ff79c6; }
+ .title { fill: #f8f8f2; font-size: 20px; font-weight: 700; }
+ .h1 { fill: #f8f8f2; font-size: 18px; font-weight: 700; }
+ .h2 { fill: #f8f8f2; font-size: 14px; font-weight: 700; }
+ .sub { fill: #f8f8f2; font-size: 12px; }
+ .small { fill: #f8f8f2; font-size: 10px; }
+ .label { fill: #f1fa8c; font-size: 11px; font-style: italic; }
+ .conn { stroke: #f8f8f2; stroke-width: 1.8; fill: none; }
+ .conn-dot { stroke: #6272a4; stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
+ .box { fill: #282a36; stroke-width: 1.5; }
+ .tier-label { fill: #6272a4; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
+ .accent-cyan { fill: #8be9fd; } .accent-purple { fill: #bd93f9; } .accent-green { fill: #50fa7b; } .accent-orange { fill: #ffb86c; } .accent-pink { fill: #ff79c6; }
+ </style>
</defs>
-
- <rect width="1100" height="620" class="bg"></rect>
-
-
- <text x="550" y="40" text-anchor="middle" class="header">How OpenCompany Works</text>
- <text x="550" y="62" text-anchor="middle" class="subheader">Build AI workflows visually. Connect them to your apps. Run everything on your own computer.</text>
-
-
- <rect x="40" y="100" width="240" height="200" class="step-card-accent accent-1"></rect>
- <circle cx="68" cy="128" r="14" class="step-num-bg-1"></circle>
- <text x="68" y="133" text-anchor="middle" class="step-num">1</text>
- <text x="92" y="133" class="step-title">Pick from 100+ nodes</text>
-
- <rect x="60" y="155" width="200" height="22" class="node-mini"></rect>
- <text x="70" y="170" class="node-mini-text">🤖 AI Agent</text>
-
- <rect x="60" y="183" width="200" height="22" class="node-mini"></rect>
- <text x="70" y="198" class="node-mini-text">💬 Chat Trigger</text>
-
- <rect x="60" y="211" width="200" height="22" class="node-mini"></rect>
- <text x="70" y="226" class="node-mini-text">📱 Telegram</text>
-
- <rect x="60" y="239" width="200" height="22" class="node-mini"></rect>
- <text x="70" y="254" class="node-mini-text">📧 Gmail</text>
-
- <rect x="60" y="267" width="200" height="22" class="node-mini"></rect>
- <text x="70" y="282" class="node-mini-text">+ many more...</text>
-
-
- <path d="M 290 200 L 360 200" class="flow-arrow" marker-end="url(#arrow-flow)"></path>
-
-
- <rect x="370" y="100" width="360" height="200" class="step-card-accent accent-2"></rect>
- <circle cx="398" cy="128" r="14" class="step-num-bg-2"></circle>
- <text x="398" y="133" text-anchor="middle" class="step-num">2</text>
- <text x="422" y="133" class="step-title">Drag and connect them</text>
-
-
- <rect x="390" y="160" width="92" height="42" class="node-mini node-trigger-mini" rx="8"></rect>
- <text x="436" y="178" text-anchor="middle" class="node-mini-text">💬 Chat</text>
- <text x="436" y="194" text-anchor="middle" class="node-mini-text" style="font-size: 9px; fill: #6b7280;">trigger</text>
-
- <rect x="515" y="160" width="100" height="42" class="node-mini node-agent-mini" rx="8"></rect>
- <text x="565" y="178" text-anchor="middle" class="node-mini-text">🤖 AI Agent</text>
- <text x="565" y="194" text-anchor="middle" class="node-mini-text" style="font-size: 9px; fill: #6b7280;">thinks + acts</text>
-
- <rect x="648" y="160" width="72" height="42" class="node-mini node-output-mini" rx="8"></rect>
- <text x="684" y="178" text-anchor="middle" class="node-mini-text">📤 Reply</text>
- <text x="684" y="194" text-anchor="middle" class="node-mini-text" style="font-size: 9px; fill: #6b7280;">output</text>
-
- <path d="M 482 181 L 515 181" class="flow-arrow" marker-end="url(#arrow-flow)"></path>
- <path d="M 615 181 L 648 181" class="flow-arrow" marker-end="url(#arrow-flow)"></path>
-
-
- <rect x="430" y="220" width="80" height="22" class="node-mini" rx="6" style="fill: #f0fdfa; stroke: #06b6d4;"></rect>
- <text x="470" y="235" text-anchor="middle" class="node-mini-text" style="fill: #0e7490;">🧠 Memory</text>
-
- <rect x="520" y="220" width="80" height="22" class="node-mini" rx="6" style="fill: #f0fdfa; stroke: #06b6d4;"></rect>
- <text x="560" y="235" text-anchor="middle" class="node-mini-text" style="fill: #0e7490;">📚 Skill</text>
-
- <rect x="610" y="220" width="80" height="22" class="node-mini" rx="6" style="fill: #f0fdfa; stroke: #06b6d4;"></rect>
- <text x="650" y="235" text-anchor="middle" class="node-mini-text" style="fill: #0e7490;">🔧 Tool</text>
-
- <path d="M 545 202 L 470 220" class="dashed-conn"></path>
- <path d="M 565 202 L 560 220" class="dashed-conn"></path>
- <path d="M 590 202 L 650 220" class="dashed-conn"></path>
-
- <text x="550" y="265" text-anchor="middle" class="step-desc">Memory remembers · Skills teach · Tools extend</text>
- <text x="550" y="285" text-anchor="middle" class="step-desc" style="font-style: italic; fill: #6b7280;">This is the shape of every default workflow.</text>
-
-
- <path d="M 740 200 L 810 200" class="flow-arrow" marker-end="url(#arrow-flow)"></path>
-
-
- <rect x="820" y="100" width="240" height="200" class="step-card-accent accent-3"></rect>
- <circle cx="848" cy="128" r="14" class="step-num-bg-3"></circle>
- <text x="848" y="133" text-anchor="middle" class="step-num">3</text>
- <text x="872" y="133" class="step-title">AI runs it for you</text>
-
- <text x="940" y="170" text-anchor="middle" class="step-desc">Click Play, or...</text>
-
- <rect x="850" y="185" width="180" height="30" class="badge"></rect>
- <text x="940" y="204" text-anchor="middle" class="badge-text">DEPLOY ON A SCHEDULE</text>
-
- <rect x="850" y="223" width="180" height="30" class="badge"></rect>
- <text x="940" y="242" text-anchor="middle" class="badge-text">TRIGGER ON AN EVENT</text>
-
- <rect x="850" y="261" width="180" height="30" class="badge"></rect>
- <text x="940" y="280" text-anchor="middle" class="badge-text">RESPOND IN REAL TIME</text>
-
-
- <rect x="40" y="340" width="1020" height="180" class="step-card-accent accent-4"></rect>
- <circle cx="68" cy="368" r="14" class="step-num-bg-4"></circle>
- <text x="68" y="373" text-anchor="middle" class="step-num">4</text>
- <text x="92" y="373" class="step-title">Connect to the apps you already use</text>
-
-
- <rect x="60" y="395" width="90" height="28" class="integration-pill"></rect>
- <text x="105" y="414" text-anchor="middle" class="integration-text">📧 Gmail</text>
-
- <rect x="160" y="395" width="100" height="28" class="integration-pill"></rect>
- <text x="210" y="414" text-anchor="middle" class="integration-text">📅 Calendar</text>
-
- <rect x="270" y="395" width="80" height="28" class="integration-pill"></rect>
- <text x="310" y="414" text-anchor="middle" class="integration-text">📁 Drive</text>
-
- <rect x="360" y="395" width="90" height="28" class="integration-pill"></rect>
- <text x="405" y="414" text-anchor="middle" class="integration-text">📊 Sheets</text>
-
- <rect x="460" y="395" width="110" height="28" class="integration-pill"></rect>
- <text x="515" y="414" text-anchor="middle" class="integration-text">📱 WhatsApp</text>
-
- <rect x="580" y="395" width="100" height="28" class="integration-pill"></rect>
- <text x="630" y="414" text-anchor="middle" class="integration-text">💬 Telegram</text>
-
- <rect x="690" y="395" width="100" height="28" class="integration-pill"></rect>
- <text x="740" y="414" text-anchor="middle" class="integration-text">𝕏 Twitter</text>
-
- <rect x="800" y="395" width="110" height="28" class="integration-pill"></rect>
- <text x="855" y="414" text-anchor="middle" class="integration-text">📞 Your Phone</text>
-
- <rect x="920" y="395" width="120" height="28" class="integration-pill"></rect>
- <text x="980" y="414" text-anchor="middle" class="integration-text">💳 Stripe</text>
-
-
- <rect x="60" y="430" width="120" height="28" class="integration-pill"></rect>
- <text x="120" y="449" text-anchor="middle" class="integration-text">🌐 Web Browser</text>
-
- <rect x="190" y="430" width="120" height="28" class="integration-pill"></rect>
- <text x="250" y="449" text-anchor="middle" class="integration-text">🔍 Web Search</text>
-
- <rect x="320" y="430" width="130" height="28" class="integration-pill"></rect>
- <text x="385" y="449" text-anchor="middle" class="integration-text">🕷 Web Scraping</text>
-
- <rect x="460" y="430" width="110" height="28" class="integration-pill"></rect>
- <text x="515" y="449" text-anchor="middle" class="integration-text">📄 PDF / Docs</text>
-
- <rect x="580" y="430" width="100" height="28" class="integration-pill"></rect>
- <text x="630" y="449" text-anchor="middle" class="integration-text">💻 Python</text>
-
- <rect x="690" y="430" width="120" height="28" class="integration-pill"></rect>
- <text x="750" y="449" text-anchor="middle" class="integration-text">⚡ JavaScript</text>
-
- <rect x="820" y="430" width="80" height="28" class="integration-pill"></rect>
- <text x="860" y="449" text-anchor="middle" class="integration-text">📨 Email</text>
-
- <rect x="910" y="430" width="130" height="28" class="integration-pill"></rect>
- <text x="975" y="449" text-anchor="middle" class="integration-text">⏰ Cron / Timers</text>
-
- <text x="550" y="490" text-anchor="middle" class="step-desc">+ residential proxies, Apify scrapers, Maps, document RAG, and more</text>
-
-
- <rect x="40" y="540" width="1020" height="60" class="footer-strip"></rect>
- <text x="550" y="568" text-anchor="middle" class="footer-text">🏠 Everything runs on your computer</text>
- <text x="550" y="588" text-anchor="middle" class="footer-sub">Your API keys, your data, your conversations — never sent to OpenCompany servers. Free local AI via Ollama and LM Studio.</text>
-
-</svg>
\ No newline at end of file
+ <rect class="bg" width="1800" height="540"/>
+
+ <!-- Header -->
+ <text class="title" x="900" y="46" text-anchor="middle">How OpenCompany Works</text>
+ <text class="sub" x="900" y="74" text-anchor="middle">Build AI workflows visually, connect them to your apps, run everything on your own computer.</text>
+
+ <!-- Step 1: Pick your blocks -->
+ <rect class="panel p-purple" x="43" y="110" width="266" height="140" rx="10"/>
+ <circle class="accent-purple" cx="176" cy="142" r="15"/>
+ <text x="176" y="148" text-anchor="middle" font-size="16" font-weight="700" fill="#282a36">1</text>
+ <text class="h2" x="176" y="172" text-anchor="middle">Pick your blocks</text>
+ <text class="sub" x="176" y="196" text-anchor="middle">Drag nodes from the palette -</text>
+ <text class="sub" x="176" y="214" text-anchor="middle">100+ blocks: AI Agent, Chat,</text>
+ <text class="sub" x="176" y="232" text-anchor="middle">Telegram, Gmail, and more</text>
+
+ <!-- Arrow 1 -> 2 -->
+ <text class="label" x="357" y="173" text-anchor="middle">drag</text>
+ <path class="conn" d="M 313 185 L 399 185" marker-end="url(#arrow)"/>
+
+ <!-- Step 2: Connect them -->
+ <rect class="panel p-purple" x="405" y="110" width="266" height="140" rx="10"/>
+ <circle class="accent-purple" cx="538" cy="142" r="15"/>
+ <text x="538" y="148" text-anchor="middle" font-size="16" font-weight="700" fill="#282a36">2</text>
+ <text class="h2" x="538" y="172" text-anchor="middle">Connect them</text>
+ <text class="sub" x="538" y="196" text-anchor="middle">Wire trigger &#8594; AI Agent &#8594; reply.</text>
+ <text class="sub" x="538" y="214" text-anchor="middle">Attach Memory, Skills, and</text>
+ <text class="sub" x="538" y="232" text-anchor="middle">Tools to the agent</text>
+
+ <!-- Arrow 2 -> 3 -->
+ <text class="label" x="719" y="173" text-anchor="middle">wire</text>
+ <path class="conn" d="M 675 185 L 761 185" marker-end="url(#arrow)"/>
+
+ <!-- Step 3: Add your keys -->
+ <rect class="panel p-purple" x="767" y="110" width="266" height="140" rx="10"/>
+ <circle class="accent-purple" cx="900" cy="142" r="15"/>
+ <text x="900" y="148" text-anchor="middle" font-size="16" font-weight="700" fill="#282a36">3</text>
+ <text class="h2" x="900" y="172" text-anchor="middle">Add your keys</text>
+ <text class="sub" x="900" y="196" text-anchor="middle">Open API Credentials, paste a</text>
+ <text class="sub" x="900" y="214" text-anchor="middle">provider key, pick a model</text>
+ <text class="sub" x="900" y="232" text-anchor="middle">(or run one locally, free)</text>
+
+ <!-- Arrow 3 -> 4 -->
+ <text class="label" x="1081" y="173" text-anchor="middle">configure</text>
+ <path class="conn" d="M 1037 185 L 1123 185" marker-end="url(#arrow)"/>
+
+ <!-- Step 4: Test it, then start it -->
+ <rect class="panel p-purple" x="1129" y="110" width="266" height="140" rx="10"/>
+ <circle class="accent-purple" cx="1262" cy="142" r="15"/>
+ <text x="1262" y="148" text-anchor="middle" font-size="16" font-weight="700" fill="#282a36">4</text>
+ <text class="h2" x="1262" y="172" text-anchor="middle">Test it, then start it</text>
+ <text class="sub" x="1262" y="196" text-anchor="middle">Run tests one node in place.</text>
+ <text class="sub" x="1262" y="214" text-anchor="middle">Start deploys the whole workflow</text>
+ <text class="sub" x="1262" y="232" text-anchor="middle">(the button flips to Stop)</text>
+ <text class="label" x="1262" y="272" text-anchor="middle">runs on a schedule, on an event, or in real time</text>
+
+ <!-- Arrow 4 -> 5 -->
+ <text class="label" x="1443" y="173" text-anchor="middle">Run or Start</text>
+ <path class="conn" d="M 1399 185 L 1485 185" marker-end="url(#arrow)"/>
+
+ <!-- Step 5: Watch it work -->
+ <rect class="panel p-purple" x="1491" y="110" width="266" height="140" rx="10"/>
+ <circle class="accent-purple" cx="1624" cy="142" r="15"/>
+ <text x="1624" y="148" text-anchor="middle" font-size="16" font-weight="700" fill="#282a36">5</text>
+ <text class="h2" x="1624" y="172" text-anchor="middle">Watch it work</text>
+ <text class="sub" x="1624" y="196" text-anchor="middle">Answers appear in the Chat /</text>
+ <text class="sub" x="1624" y="214" text-anchor="middle">Console panel at the bottom</text>
+ <text class="sub" x="1624" y="232" text-anchor="middle">of the screen</text>
+
+ <!-- Value band 1: integrations -->
+ <rect class="panel p-green" x="43" y="304" width="1714" height="78" rx="10"/>
+ <text class="h1" x="900" y="336" text-anchor="middle">Connect the apps you already use</text>
+ <text class="sub" x="900" y="364" text-anchor="middle">Gmail &#183; Calendar &#183; Drive &#183; Sheets &#183; Telegram &#183; WhatsApp &#183; Twitter/X &#183; web browser &#183; web search &#183; Python &#183; JavaScript &#183; Maps + more</text>
+
+ <!-- Value band 2: local-first -->
+ <rect class="panel p-cyan" x="43" y="407" width="1714" height="92" rx="10"/>
+ <text class="h1" x="900" y="437" text-anchor="middle">Everything runs on your computer</text>
+ <text class="sub" x="900" y="463" text-anchor="middle">Your API keys, your data, your conversations - never sent to OpenCompany servers.</text>
+ <text class="sub" x="900" y="485" text-anchor="middle">Free local AI via Ollama and LM Studio.</text>
+</svg>
diff --git a/docs-internal/design-system/assets/diagrams/node-anatomy.svg b/docs-internal/design-system/assets/diagrams/node-anatomy.svg
index 46162745..c3466b2a 100644
--- a/docs-internal/design-system/assets/diagrams/node-anatomy.svg
+++ b/docs-internal/design-system/assets/diagrams/node-anatomy.svg
@@ -1,123 +1,119 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1400 800" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, &#39;SFMono-Regular&#39;, Menlo, Consolas, monospace">
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1760 800" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
- <path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"></path>
+ <path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"/>
</marker>
-
+ <style>
+ .bg { fill: #282a36; }
+ .panel { fill: #44475a; stroke-width: 2; }
+ .p-cyan { stroke: #8be9fd; } .p-purple { stroke: #bd93f9; } .p-orange { stroke: #ffb86c; } .p-green { stroke: #50fa7b; } .p-pink { stroke: #ff79c6; }
+ .title { fill: #f8f8f2; font-size: 20px; font-weight: 700; }
+ .h1 { fill: #f8f8f2; font-size: 18px; font-weight: 700; }
+ .h2 { fill: #f8f8f2; font-size: 14px; font-weight: 700; }
+ .sub { fill: #f8f8f2; font-size: 12px; }
+ .small { fill: #f8f8f2; font-size: 10px; }
+ .label { fill: #f1fa8c; font-size: 11px; font-style: italic; }
+ .conn { stroke: #f8f8f2; stroke-width: 1.8; fill: none; }
+ .conn-dot { stroke: #6272a4; stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
+ .box { fill: #282a36; stroke-width: 1.5; }
+ .tier-label { fill: #6272a4; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
+ .accent-cyan { fill: #8be9fd; } .accent-purple { fill: #bd93f9; } .accent-green { fill: #50fa7b; } .accent-orange { fill: #ffb86c; } .accent-pink { fill: #ff79c6; }
+ </style>
</defs>
-
- <rect class="bg" width="1400" height="800"></rect>
-
-
- <text x="700" y="35" class="title" text-anchor="middle" font-size="20">Anatomy of a Workflow Node</text>
- <text x="700" y="58" class="col-sub" text-anchor="middle" font-size="12">Where to touch code when adding a new node</text>
-
-
- <text x="230" y="100" class="col-header" text-anchor="middle">Frontend (client/)</text>
- <text x="230" y="118" class="col-sub" text-anchor="middle">TypeScript + React</text>
-
- <text x="700" y="100" class="col-header" text-anchor="middle">Communication</text>
- <text x="700" y="118" class="col-sub" text-anchor="middle">WebSocket</text>
-
- <text x="1170" y="100" class="col-header" text-anchor="middle">Backend (server/)</text>
- <text x="1170" y="118" class="col-sub" text-anchor="middle">Python + FastAPI</text>
-
-
-
- <rect class="fe-box" x="50" y="145" width="360" height="85" rx="8"></rect>
- <text x="70" y="170" class="title">1. Node definition</text>
- <text x="70" y="190" class="path">server/nodes/&lt;category&gt;/&lt;node&gt;.py</text>
- <text x="70" y="210" class="sub">INodeProperties: displayName, group, inputs,</text>
- <text x="70" y="224" class="sub">outputs, properties[], displayOptions.show</text>
-
-
- <rect class="fe-box" x="50" y="255" width="360" height="85" rx="8"></rect>
- <text x="70" y="280" class="title">2. Parameter panel</text>
- <text x="70" y="300" class="path">client/src/components/ParameterRenderer.tsx</text>
- <text x="70" y="320" class="sub">Renders parameters, conditional display,</text>
- <text x="70" y="334" class="sub">drag-and-drop template variables</text>
-
-
- <rect class="fe-box" x="50" y="365" width="360" height="85" rx="8"></rect>
- <text x="70" y="390" class="title">3. Canvas &amp; Run button</text>
- <text x="70" y="410" class="path">client/src/Dashboard.tsx</text>
- <text x="70" y="430" class="sub">React Flow canvas, useExecution hook,</text>
- <text x="70" y="444" class="sub">sends execute_node via WebSocket</text>
-
-
- <rect class="fe-box" x="50" y="475" width="360" height="85" rx="8"></rect>
- <text x="70" y="500" class="title">4. Credentials (if needed)</text>
- <text x="70" y="520" class="path">client/src/components/CredentialsModal.tsx</text>
- <text x="70" y="540" class="sub">API key entry + OAuth flows</text>
- <text x="70" y="554" class="sub">via useApiKeys hook</text>
-
-
- <rect class="comm-box" x="530" y="255" width="340" height="250" rx="8"></rect>
- <text x="700" y="290" class="title" text-anchor="middle">WebSocket /ws/status</text>
- <text x="700" y="315" class="sub" text-anchor="middle">Single persistent connection</text>
- <text x="700" y="335" class="sub" text-anchor="middle">between UI and backend</text>
-
-
- <text x="700" y="375" class="label" text-anchor="middle">execute_node</text>
- <path class="conn" d="M 570 385 L 830 385" marker-end="url(#arrow)"></path>
-
- <text x="700" y="420" class="label" text-anchor="middle">node_status</text>
- <path class="conn" d="M 830 430 L 570 430" marker-end="url(#arrow)"></path>
-
- <text x="700" y="465" class="label" text-anchor="middle">node_output</text>
- <path class="conn" d="M 830 475 L 570 475" marker-end="url(#arrow)"></path>
-
- <text x="700" y="495" class="sub" text-anchor="middle" fill="#6272a4" font-size="10">89 handler message types</text>
-
-
- <path class="conn" d="M 410 405 L 530 385" marker-end="url(#arrow)"></path>
-
-
-
- <rect class="be-box" x="990" y="145" width="360" height="85" rx="8"></rect>
- <text x="1010" y="170" class="title">A. Router / dispatch</text>
- <text x="1010" y="190" class="path-be">server/routers/websocket.py</text>
- <text x="1010" y="210" class="sub">@ws_handler decorators, dispatches</text>
- <text x="1010" y="224" class="sub">incoming messages to handlers</text>
-
-
- <rect class="be-box" x="990" y="255" width="360" height="85" rx="8"></rect>
- <text x="1010" y="280" class="title">B. Registry dispatch</text>
- <text x="1010" y="300" class="path-be">server/services/node_executor.py</text>
- <text x="1010" y="320" class="sub">Dict[node_type, handler] via</text>
- <text x="1010" y="334" class="sub">functools.partial dependency injection</text>
-
-
- <rect class="be-box" x="990" y="365" width="360" height="85" rx="8"></rect>
- <text x="1010" y="390" class="title">C. Business logic</text>
- <text x="1010" y="410" class="path-be">server/services/handlers/&lt;name&gt;.py</text>
- <text x="1010" y="430" class="sub">handle_&lt;name&gt;(node_id, parameters,</text>
- <text x="1010" y="444" class="sub">context, ...) -&gt; result dict</text>
-
-
- <rect class="ai-box" x="990" y="475" width="360" height="85" rx="8"></rect>
- <text x="1010" y="500" class="title">D. AI layer (for AI nodes)</text>
- <text x="1010" y="520" class="path-be">server/services/ai.py + llm/</text>
- <text x="1010" y="540" class="sub">Native SDK path or LangChain agent loop</text>
- <text x="1010" y="554" class="sub">with tool calling</text>
-
-
- <path class="conn" d="M 1170 230 L 1170 255" marker-end="url(#arrow)"></path>
- <path class="conn" d="M 1170 340 L 1170 365" marker-end="url(#arrow)"></path>
- <path class="conn" d="M 1170 450 L 1170 475" marker-end="url(#arrow)"></path>
-
-
- <path class="conn" d="M 870 385 L 990 185" marker-end="url(#arrow)"></path>
-
-
- <rect class="be-box" x="450" y="590" width="520" height="80" rx="8" fill="#282a36" stroke="#ff79c6"></rect>
- <text x="710" y="615" class="title" text-anchor="middle" fill="#ff79c6">Register the handler</text>
- <text x="710" y="635" class="sub" text-anchor="middle">Add entry to registry dict in services/node_executor.py:</text>
- <text x="710" y="655" class="path-be" text-anchor="middle">registry[&#39;yourNode&#39;] = partial(handle_your_node, database=self.database)</text>
-
-
- <text x="50" y="710" class="step">Contribution checklist</text>
- <text x="50" y="732" class="sub">1. Define node in TypeScript (left col) -&gt; 2. Write handler in Python (right col)</text>
- <text x="50" y="750" class="sub">3. Register in node_executor.py -&gt; 4. Restart dev server -&gt; Node appears in palette</text>
- <text x="50" y="770" class="sub" fill="#6272a4">Full step-by-step guide: docs-internal/node_creation.md</text>
-</svg>
\ No newline at end of file
+ <rect class="bg" width="1760" height="800"/>
+
+ <!-- Title -->
+ <text x="880" y="42" class="title" text-anchor="middle">Anatomy of a Plugin Node</text>
+ <text x="880" y="68" class="sub" text-anchor="middle">One Python folder = one node. Backend is the single source of truth - the frontend renders itself with zero TypeScript edits.</text>
+
+ <!-- ================= GROUP 1 (cyan): What you write ================= -->
+ <rect class="panel p-cyan" x="40" y="100" width="460" height="545" rx="10"/>
+ <text x="270" y="130" class="h1" text-anchor="middle">What you write</text>
+ <text x="270" y="150" class="accent-cyan" font-size="12" text-anchor="middle">server/nodes/&lt;group&gt;/&lt;plugin&gt;/</text>
+
+ <rect class="box p-cyan" x="60" y="168" width="420" height="78" rx="6"/>
+ <text x="270" y="190" class="h2" text-anchor="middle">__init__.py - the node class</text>
+ <text x="270" y="210" class="sub" text-anchor="middle">class MyNode(ActionNode / TriggerNode / ToolNode)</text>
+ <text x="270" y="228" class="small" text-anchor="middle">type, display_name, group, handles, credentials, task_queue</text>
+
+ <rect class="box p-cyan" x="60" y="264" width="420" height="78" rx="6"/>
+ <text x="270" y="286" class="h2" text-anchor="middle">Params / Output (Pydantic)</text>
+ <text x="270" y="306" class="sub" text-anchor="middle">snake_case fields = UI params = LLM tool schema</text>
+ <text x="270" y="324" class="small" text-anchor="middle">Output validated at the serialization boundary</text>
+
+ <rect class="box p-cyan" x="60" y="360" width="420" height="78" rx="6"/>
+ <text x="270" y="382" class="h2" text-anchor="middle">@Operation methods</text>
+ <text x="270" y="402" class="sub" text-anchor="middle">async def op(self, ctx, params) -&gt; Output</text>
+ <text x="270" y="420" class="small" text-anchor="middle">the business logic lives here</text>
+
+ <rect class="box p-cyan" x="60" y="456" width="420" height="78" rx="6"/>
+ <text x="270" y="478" class="h2" text-anchor="middle">icon.svg + meta.json</text>
+ <text x="270" y="498" class="sub" text-anchor="middle">co-located icon + {"color": "#..."}</text>
+ <text x="270" y="516" class="small" text-anchor="middle">icon/color are NOT class attributes</text>
+
+ <rect class="box p-cyan" x="60" y="552" width="420" height="78" rx="6"/>
+ <text x="270" y="574" class="h2" text-anchor="middle">Optional siblings (rich plugins)</text>
+ <text x="270" y="594" class="sub" text-anchor="middle">_service.py / _handlers.py / _credentials.py</text>
+ <text x="270" y="612" class="small" text-anchor="middle">for bots, daemons, signed webhooks</text>
+
+ <!-- ================= GROUP 2 (purple): Auto-registration ================= -->
+ <rect class="panel p-purple" x="650" y="100" width="460" height="449" rx="10"/>
+ <text x="880" y="130" class="h1" text-anchor="middle">Auto-registration on import</text>
+
+ <rect class="box p-purple" x="670" y="168" width="420" height="78" rx="6"/>
+ <text x="880" y="190" class="h2" text-anchor="middle">__init_subclass__ fires</text>
+ <text x="880" y="210" class="sub" text-anchor="middle">nodes/__init__.py pkgutil walker imports every plugin</text>
+ <text x="880" y="228" class="small" text-anchor="middle">no manual registry edit, no node_executor.py</text>
+
+ <rect class="box p-purple" x="670" y="264" width="420" height="78" rx="6"/>
+ <text x="880" y="286" class="h2" text-anchor="middle">5 registries populated</text>
+ <text x="880" y="306" class="sub" text-anchor="middle">_NODE_CLASS_REGISTRY &#183; NODE_METADATA &#183; _DIRECT_MODELS</text>
+ <text x="880" y="324" class="small" text-anchor="middle">NODE_OUTPUT_SCHEMAS &#183; _HANDLER_REGISTRY</text>
+
+ <rect class="box p-purple" x="670" y="360" width="420" height="78" rx="6"/>
+ <text x="880" y="382" class="h2" text-anchor="middle">Temporal activity minted</text>
+ <text x="880" y="402" class="sub" text-anchor="middle">cls.as_activity() -&gt; node.{type}.v{version}</text>
+ <text x="880" y="420" class="small" text-anchor="middle">routed to its task_queue worker pool</text>
+
+ <rect class="box p-purple" x="670" y="456" width="420" height="78" rx="6"/>
+ <text x="880" y="478" class="h2" text-anchor="middle">6 self-registration hooks (rich plugins)</text>
+ <text x="880" y="498" class="sub" text-anchor="middle">ws_handlers &#183; router &#183; filter_builder</text>
+ <text x="880" y="516" class="small" text-anchor="middle">trigger_precheck &#183; service_refresh &#183; output_schema</text>
+
+ <!-- ================= GROUP 3 (green): What the frontend sees ================= -->
+ <rect class="panel p-green" x="1260" y="100" width="460" height="353" rx="10"/>
+ <text x="1490" y="130" class="h1" text-anchor="middle">What the frontend sees</text>
+ <text x="1490" y="150" class="accent-green" font-size="12" text-anchor="middle">zero TS edits</text>
+
+ <rect class="box p-green" x="1280" y="168" width="420" height="78" rx="6"/>
+ <text x="1490" y="190" class="h2" text-anchor="middle">NodeSpec endpoint</text>
+ <text x="1490" y="210" class="sub" text-anchor="middle">GET /api/schemas/nodes/{type}/spec.json</text>
+ <text x="1490" y="228" class="small" text-anchor="middle">display meta + params + output schema</text>
+
+ <rect class="box p-green" x="1280" y="264" width="420" height="78" rx="6"/>
+ <text x="1490" y="286" class="h2" text-anchor="middle">useNodeSpec renders it</text>
+ <text x="1490" y="306" class="sub" text-anchor="middle">nodeSpecToDescription adapter builds the param panel,</text>
+ <text x="1490" y="324" class="small" text-anchor="middle">palette entry, and canvas handles - no client edits</text>
+
+ <rect class="box p-green" x="1280" y="360" width="420" height="78" rx="6"/>
+ <text x="1490" y="382" class="h2" text-anchor="middle">Credentials modal</text>
+ <text x="1490" y="402" class="sub" text-anchor="middle">declare a Credential subclass;</text>
+ <text x="1490" y="420" class="small" text-anchor="middle">modal renders from credential_providers.json</text>
+
+ <!-- ================= Arrows between groups ================= -->
+ <text x="575" y="292" class="label" text-anchor="middle">import re-registers</text>
+ <text x="575" y="307" class="label" text-anchor="middle">everything on</text>
+ <text x="575" y="322" class="label" text-anchor="middle">server restart</text>
+ <path class="conn" d="M 502 340 L 646 340" marker-end="url(#arrow)"/>
+
+ <text x="1185" y="270" class="label" text-anchor="middle">served over HTTP</text>
+ <text x="1185" y="285" class="label" text-anchor="middle">as NodeSpec</text>
+ <path class="conn" d="M 1112 300 L 1256 300" marker-end="url(#arrow)"/>
+
+ <!-- ================= Banner ================= -->
+ <rect class="panel p-pink" x="40" y="675" width="1680" height="58" rx="10"/>
+ <text x="880" y="711" class="accent-pink" font-size="18" font-weight="700" text-anchor="middle">No TypeScript node definition &#183; No node_executor.py registry entry &#183; No frontend edits</text>
+
+ <!-- ================= Footnote ================= -->
+ <text x="880" y="763" class="label" text-anchor="middle">Edge case: if tool_name != snake_case(type) and the plugin ships a paired skill, add a visuals.json alias (icon + color) - locked by tests/test_skill_icon_resolution.py</text>
+</svg>
diff --git a/docs-internal/design-system/assets/diagrams/system-overview.svg b/docs-internal/design-system/assets/diagrams/system-overview.svg
index 8db0b086..9fea8536 100644
--- a/docs-internal/design-system/assets/diagrams/system-overview.svg
+++ b/docs-internal/design-system/assets/diagrams/system-overview.svg
@@ -1,114 +1,158 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 720" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, &#39;SFMono-Regular&#39;, Menlo, Consolas, monospace">
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1080" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
- <path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"></path>
+ <path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"/>
</marker>
-
+ <style>
+ .bg { fill: #282a36; }
+ .panel { fill: #44475a; stroke-width: 2; }
+ .p-cyan { stroke: #8be9fd; } .p-purple { stroke: #bd93f9; } .p-orange { stroke: #ffb86c; } .p-green { stroke: #50fa7b; } .p-pink { stroke: #ff79c6; }
+ .title { fill: #f8f8f2; font-size: 20px; font-weight: 700; }
+ .h1 { fill: #f8f8f2; font-size: 18px; font-weight: 700; }
+ .h2 { fill: #f8f8f2; font-size: 14px; font-weight: 700; }
+ .sub { fill: #f8f8f2; font-size: 12px; }
+ .small { fill: #f8f8f2; font-size: 10px; }
+ .label { fill: #f1fa8c; font-size: 11px; font-style: italic; }
+ .conn { stroke: #f8f8f2; stroke-width: 1.8; fill: none; }
+ .conn-dot { stroke: #6272a4; stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
+ .box { fill: #282a36; stroke-width: 1.5; }
+ .tier-label { fill: #6272a4; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
+ .accent-cyan { fill: #8be9fd; } .accent-purple { fill: #bd93f9; } .accent-green { fill: #50fa7b; } .accent-orange { fill: #ffb86c; } .accent-pink { fill: #ff79c6; }
+ </style>
</defs>
-
- <rect class="bg" width="1200" height="720"></rect>
-
-
- <text x="40" y="55" class="tier-label">Tier 1</text>
-
- <rect class="panel panel-frontend" x="40" y="70" width="760" height="110" rx="8"></rect>
- <text x="60" y="100" class="title">Frontend (client/)</text>
- <text x="60" y="128" class="sub">React + TypeScript + React Flow + Zustand + Ant Design</text>
- <text x="60" y="148" class="sub">Dracula-themed canvas, parameter panel, credentials modal</text>
- <text x="60" y="168" class="sub">96 workflow nodes rendered via INodeProperties interface</text>
-
-
- <path class="conn" d="M 420 180 L 420 240" marker-end="url(#arrow)"></path>
- <path class="conn" d="M 420 240 L 420 180" marker-end="url(#arrow)"></path>
- <text x="435" y="215" class="label">WebSocket /ws/status</text>
-
-
- <text x="40" y="260" class="tier-label">Tier 2</text>
-
- <rect class="panel panel-backend" x="40" y="275" width="760" height="130" rx="8"></rect>
- <text x="60" y="305" class="title">Backend (server/)</text>
- <text x="60" y="333" class="sub">FastAPI + 89 WebSocket handlers + dependency injection container</text>
- <text x="60" y="353" class="sub">WorkflowService (facade) -&gt; NodeExecutor -&gt; per-node handlers</text>
- <text x="60" y="373" class="sub">ParameterResolver -&gt; template {{node.field}} substitution</text>
- <text x="60" y="393" class="sub">AuthService -&gt; encrypted credentials (Fernet + PBKDF2)</text>
-
-
- <path class="conn" d="M 420 405 L 420 465" marker-end="url(#arrow)"></path>
- <text x="435" y="440" class="label">async handlers</text>
-
-
- <text x="40" y="485" class="tier-label">Tier 3</text>
-
- <rect class="panel panel-exec" x="40" y="500" width="760" height="180" rx="8"></rect>
- <text x="60" y="530" class="title">Execution tier</text>
-
-
- <rect class="small-box small-exec" x="60" y="545" width="140" height="50" rx="6"></rect>
- <text x="130" y="568" class="sub" text-anchor="middle">Temporal</text>
- <text x="130" y="584" class="sub" text-anchor="middle" font-size="10">distributed workers</text>
-
- <rect class="small-box small-exec" x="215" y="545" width="140" height="50" rx="6"></rect>
- <text x="285" y="568" class="sub" text-anchor="middle">Redis</text>
- <text x="285" y="584" class="sub" text-anchor="middle" font-size="10">cache + locks + streams</text>
-
- <rect class="small-box small-exec" x="370" y="545" width="140" height="50" rx="6"></rect>
- <text x="440" y="568" class="sub" text-anchor="middle">SQLite</text>
- <text x="440" y="584" class="sub" text-anchor="middle" font-size="10">workflow.db + credentials.db</text>
-
- <rect class="small-box small-exec" x="525" y="545" width="140" height="50" rx="6"></rect>
- <text x="595" y="568" class="sub" text-anchor="middle">Node.js server</text>
- <text x="595" y="584" class="sub" text-anchor="middle" font-size="10">JS/TS code executor</text>
-
- <rect class="small-box small-exec" x="60" y="608" width="220" height="50" rx="6"></rect>
- <text x="170" y="631" class="sub" text-anchor="middle">WhatsApp RPC (port 9400)</text>
- <text x="170" y="647" class="sub" text-anchor="middle" font-size="10">whatsapp-rpc binary</text>
-
- <rect class="small-box small-exec" x="295" y="608" width="220" height="50" rx="6"></rect>
- <text x="405" y="631" class="sub" text-anchor="middle">Android relay</text>
- <text x="405" y="647" class="sub" text-anchor="middle" font-size="10">persistent WebSocket</text>
-
- <rect class="small-box small-exec" x="530" y="608" width="250" height="50" rx="6"></rect>
- <text x="655" y="631" class="sub" text-anchor="middle">Temporal server</text>
- <text x="655" y="647" class="sub" text-anchor="middle" font-size="10">ports 7233 / 8233 / 8080</text>
-
-
- <text x="830" y="55" class="tier-label">External</text>
- <rect class="panel panel-ext" x="830" y="70" width="340" height="610" rx="8"></rect>
- <text x="850" y="100" class="title">External services</text>
-
- <text x="850" y="130" class="sub" font-weight="700" fill="#8be9fd">LLM providers (10)</text>
- <text x="850" y="150" class="sub">OpenAI, Anthropic, Gemini, OpenRouter,</text>
- <text x="850" y="168" class="sub">xAI, DeepSeek, Kimi, Mistral, Groq, Cerebras</text>
-
- <text x="850" y="200" class="sub" font-weight="700" fill="#8be9fd">Google Workspace</text>
- <text x="850" y="220" class="sub">Gmail, Calendar, Drive, Sheets,</text>
- <text x="850" y="238" class="sub">Tasks, Contacts (unified OAuth)</text>
-
- <text x="850" y="270" class="sub" font-weight="700" fill="#8be9fd">Social platforms</text>
- <text x="850" y="290" class="sub">WhatsApp, Telegram, Twitter/X,</text>
- <text x="850" y="308" class="sub">Discord, Slack, Signal (unified)</text>
-
- <text x="850" y="340" class="sub" font-weight="700" fill="#8be9fd">Search APIs</text>
- <text x="850" y="360" class="sub">Brave, Serper, Perplexity,</text>
- <text x="850" y="378" class="sub">DuckDuckGo (free)</text>
-
- <text x="850" y="410" class="sub" font-weight="700" fill="#8be9fd">Web scraping</text>
- <text x="850" y="430" class="sub">Apify actors, Crawlee scraper,</text>
- <text x="850" y="448" class="sub">residential proxy providers</text>
-
- <text x="850" y="480" class="sub" font-weight="700" fill="#8be9fd">Device integration</text>
- <text x="850" y="500" class="sub">Android via ADB relay,</text>
- <text x="850" y="518" class="sub">16 Android service nodes</text>
-
- <text x="850" y="550" class="sub" font-weight="700" fill="#8be9fd">Vector + RAG</text>
- <text x="850" y="570" class="sub">ChromaDB, Qdrant, Pinecone,</text>
- <text x="850" y="588" class="sub">HuggingFace embeddings</text>
-
- <text x="850" y="620" class="sub" font-weight="700" fill="#8be9fd">Maps</text>
- <text x="850" y="640" class="sub">Google Maps Geocoding,</text>
- <text x="850" y="658" class="sub">Places nearbySearch</text>
-
-
- <path class="conn" d="M 800 590 L 830 590" marker-end="url(#arrow)"></path>
- <text x="805" y="580" class="label">HTTP / SDK</text>
-</svg>
\ No newline at end of file
+ <rect class="bg" width="1800" height="1080"/>
+
+ <text class="title" x="900" y="44" text-anchor="middle">OpenCompany - System Overview</text>
+ <text class="sub" x="900" y="70" text-anchor="middle">FastAPI plugin backend + React Flow client + sidecar processes (single-machine dev topology)</text>
+
+ <!-- ===== Tier: Browser ===== -->
+ <text class="tier-label" x="230" y="96">BROWSER</text>
+ <rect class="panel p-cyan" x="230" y="104" width="960" height="110" rx="10"/>
+ <rect class="box p-cyan" x="500" y="118" width="420" height="82" rx="8"/>
+ <text class="h2" x="710" y="144" text-anchor="middle">React Flow client</text>
+ <text class="sub" x="710" y="163" text-anchor="middle">client/ - Vite dev :3000</text>
+ <text class="sub" x="710" y="181" text-anchor="middle">React 19 + Tailwind v4 + shadcn/ui + Zustand</text>
+
+ <!-- Browser <-> Backend -->
+ <path class="conn" d="M 558 218 L 558 314" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 568 314 L 568 218" marker-end="url(#arrow)"/>
+ <text class="label" x="546" y="270" text-anchor="end">WebSocket /ws/status</text>
+ <path class="conn" d="M 860 218 L 860 314" marker-end="url(#arrow)"/>
+ <text class="label" x="874" y="270">REST /api/*</text>
+
+ <!-- Inbound webhook into backend left edge -->
+ <path class="conn" d="M 40 430 L 226 430" marker-end="url(#arrow)"/>
+ <text class="label" x="130" y="414" text-anchor="middle">/webhook/{path} (inbound)</text>
+
+ <!-- ===== Tier: Python backend ===== -->
+ <text class="tier-label" x="230" y="310">PYTHON BACKEND</text>
+ <rect class="panel p-purple" x="230" y="318" width="960" height="324" rx="10"/>
+ <text class="h1" x="710" y="348" text-anchor="middle">Python backend - FastAPI :3010 (server/)</text>
+
+ <rect class="box p-purple" x="250" y="368" width="435" height="70" rx="8"/>
+ <text class="h2" x="467" y="395" text-anchor="middle">WS + REST dispatch</text>
+ <text class="small" x="467" y="417" text-anchor="middle">core MESSAGE_HANDLERS + plugin ws_handler_registry</text>
+
+ <rect class="box p-purple" x="735" y="368" width="435" height="70" rx="8"/>
+ <text class="h2" x="952" y="395" text-anchor="middle">WorkflowService -&gt; NodeExecutor</text>
+ <text class="sub" x="952" y="417" text-anchor="middle">ParameterResolver {{node.field}}</text>
+
+ <rect class="box p-purple" x="250" y="456" width="435" height="84" rx="8"/>
+ <text class="h2" x="467" y="483" text-anchor="middle">Node plugins (115+)</text>
+ <text class="small" x="467" y="503" text-anchor="middle">server/nodes/&lt;group&gt;/&lt;plugin&gt;/</text>
+ <text class="small" x="467" y="521" text-anchor="middle">Pydantic Params/Output = SSOT</text>
+
+ <rect class="box p-purple" x="735" y="456" width="435" height="84" rx="8"/>
+ <text class="h2" x="952" y="483" text-anchor="middle">AuthService</text>
+ <text class="sub" x="952" y="507" text-anchor="middle">Fernet + PBKDF2 encrypted credentials</text>
+
+ <rect class="box p-purple" x="250" y="558" width="920" height="64" rx="8"/>
+ <text class="h2" x="710" y="584" text-anchor="middle">Execution engine</text>
+ <text class="sub" x="710" y="607" text-anchor="middle">Temporal -&gt; Redis-parallel -&gt; sequential (auto-fallback)</text>
+
+ <!-- Backend -> Sidecars -->
+ <path class="conn" d="M 710 646 L 710 722" marker-end="url(#arrow)"/>
+ <text class="label" x="724" y="688">spawns / calls</text>
+
+ <!-- ===== Tier: Sidecar processes ===== -->
+ <text class="tier-label" x="230" y="718">SIDECAR PROCESSES</text>
+ <rect class="panel p-orange" x="230" y="726" width="960" height="120" rx="10"/>
+
+ <rect class="box p-orange" x="250" y="746" width="215" height="80" rx="8"/>
+ <text class="h2" x="357" y="772" text-anchor="middle">Node.js executor :3020</text>
+ <text class="small" x="357" y="792" text-anchor="middle">Express + tsx</text>
+ <text class="small" x="357" y="808" text-anchor="middle">JS/TS code nodes</text>
+
+ <rect class="box p-orange" x="485" y="746" width="215" height="80" rx="8"/>
+ <text class="h2" x="592" y="772" text-anchor="middle">WhatsApp RPC :9400</text>
+ <text class="small" x="592" y="792" text-anchor="middle">Go whatsmeow binary</text>
+
+ <rect class="box p-orange" x="720" y="746" width="215" height="80" rx="8"/>
+ <text class="h2" x="827" y="772" text-anchor="middle">Temporal server</text>
+ <text class="small" x="827" y="792" text-anchor="middle">gRPC :7233 - Web UI :8080</text>
+
+ <rect class="box p-orange" x="955" y="746" width="215" height="80" rx="8"/>
+ <text class="h2" x="1062" y="772" text-anchor="middle">Temporal workers</text>
+ <text class="small" x="1062" y="792" text-anchor="middle">manager + per-queue</text>
+ <text class="small" x="1062" y="808" text-anchor="middle">worker pool</text>
+
+ <!-- Backend -> Storage (routed around sidecar tier) -->
+ <path class="conn" d="M 230 610 L 170 610 L 170 985 L 226 985" marker-end="url(#arrow)"/>
+ <text class="label" x="162" y="800" text-anchor="end">read/write</text>
+
+ <!-- ===== Tier: Storage ===== -->
+ <text class="tier-label" x="230" y="922">STORAGE</text>
+ <rect class="panel p-pink" x="230" y="930" width="960" height="110" rx="10"/>
+ <rect class="box p-pink" x="250" y="950" width="920" height="70" rx="8"/>
+ <text class="h2" x="710" y="977" text-anchor="middle">~/.opencompany/</text>
+ <text class="sub" x="710" y="1000" text-anchor="middle">workflow.db - credentials.db - temporal.db - Redis cache/locks (optional)</text>
+
+ <!-- Backend / Sidecars -> External services -->
+ <path class="conn" d="M 1194 480 L 1316 480" marker-end="url(#arrow)"/>
+ <text class="label" x="1255" y="464" text-anchor="middle">HTTP / SDK / CLI</text>
+ <path class="conn" d="M 1194 786 L 1316 786" marker-end="url(#arrow)"/>
+ <text class="label" x="1255" y="770" text-anchor="middle">HTTP / SDK / CLI</text>
+
+ <!-- ===== External services (right column) ===== -->
+ <text class="tier-label" x="1320" y="96">EXTERNAL SERVICES</text>
+ <rect class="panel p-green" x="1320" y="104" width="440" height="936" rx="10"/>
+ <text class="h1" x="1540" y="134" text-anchor="middle">External services</text>
+
+ <rect class="box p-green" x="1340" y="152" width="400" height="100" rx="8"/>
+ <text class="h2" x="1540" y="177" text-anchor="middle">LLM providers (12)</text>
+ <text class="sub" x="1540" y="197" text-anchor="middle">OpenAI, Anthropic, Gemini, OpenRouter, xAI,</text>
+ <text class="sub" x="1540" y="215" text-anchor="middle">DeepSeek, Kimi, Mistral, Groq, Cerebras</text>
+ <text class="sub" x="1540" y="233" text-anchor="middle">local: Ollama, LM Studio</text>
+
+ <rect class="box p-green" x="1340" y="280" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="305" text-anchor="middle">Google Workspace</text>
+ <text class="sub" x="1540" y="325" text-anchor="middle">Gmail, Calendar, Drive, Sheets, Tasks, Contacts</text>
+
+ <rect class="box p-green" x="1340" y="368" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="393" text-anchor="middle">Messaging</text>
+ <text class="sub" x="1540" y="413" text-anchor="middle">WhatsApp, Telegram, Twitter/X</text>
+
+ <rect class="box p-green" x="1340" y="456" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="481" text-anchor="middle">Search APIs</text>
+ <text class="sub" x="1540" y="501" text-anchor="middle">DuckDuckGo (free), Brave, Serper, Perplexity</text>
+
+ <rect class="box p-green" x="1340" y="544" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="569" text-anchor="middle">Web scraping</text>
+ <text class="sub" x="1540" y="589" text-anchor="middle">Apify actors, Crawlee, residential proxies</text>
+
+ <rect class="box p-green" x="1340" y="632" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="657" text-anchor="middle">Dev CLIs</text>
+ <text class="sub" x="1540" y="677" text-anchor="middle">GitHub (gh), Vercel, Stripe</text>
+
+ <rect class="box p-green" x="1340" y="720" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="745" text-anchor="middle">Device</text>
+ <text class="sub" x="1540" y="765" text-anchor="middle">Android via relay - 16 service nodes</text>
+
+ <rect class="box p-green" x="1340" y="808" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="833" text-anchor="middle">Vector + RAG</text>
+ <text class="sub" x="1540" y="853" text-anchor="middle">ChromaDB, Qdrant, Pinecone</text>
+
+ <rect class="box p-green" x="1340" y="896" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="921" text-anchor="middle">Maps</text>
+ <text class="sub" x="1540" y="941" text-anchor="middle">Google Maps Geocoding + Places</text>
+</svg>
diff --git a/docs-internal/native_llm_sdk.md b/docs-internal/native_llm_sdk.md
index a4a35087..a202a7d4 100644
--- a/docs-internal/native_llm_sdk.md
+++ b/docs-internal/native_llm_sdk.md
@@ -47,16 +47,16 @@ The native layer currently supports **12 providers**, grouped by implementation:
| `mistral` | `providers/openai.py` + base_url | `openai` | OpenAI-compatible |
| `ollama` | `providers/openai.py` + `{provider}_proxy` URL | `openai` (chat) + `ollama` (probe) | Local server. Validator probes via `ollama.AsyncClient.ps()` for typed `context_length` per loaded model. Runtime uses `OpenAIProvider` with `base_url={user URL}` so traffic stays on `localhost`. |
| `lmstudio` | `providers/openai.py` + `{provider}_proxy` URL | `openai` (chat) + `lmstudio` (probe) | Local server. Validator probes via `lmstudio.AsyncClient.llm.list_loaded()` for typed `LlmInstanceInfo.context_length`. Same OpenAI-compat runtime path as Ollama. |
-| `groq` | LangChain fallback | `langchain-groq` | Not yet on native path |
-| `cerebras` | LangChain fallback | `langchain-cerebras` | Not yet on native path |
+| `groq` | `providers/_compat.py` + base_url | `openai` | OpenAI-compatible (chat-path LangChain fallback retired in Phase D) |
+| `cerebras` | `providers/_compat.py` + base_url | `openai` | OpenAI-compatible (chat-path LangChain fallback retired in Phase D) |
-Source of truth for this list: `server/config/llm_defaults.json` (the `providers` dict) and `server/services/llm/factory.py` (`NATIVE_PROVIDERS` constant).
+Source of truth for this list: `server/config/llm_defaults.json` (the `providers` dict) and the `register_provider(ProviderSpec(...))` calls in `server/services/llm/providers/` (each provider module registers itself at import; `factory.py` is legacy and no longer consulted by `ai.py`).
### Native chat path vs agent dropdown — two different counts
-- **Native chat path (`execute_chat` / `fetch_models`) supports 12 providers** — 10 truly native (8 via the shared OpenAI-compatible client: openai, openrouter, xai, deepseek, kimi, mistral, ollama, lmstudio; plus the Anthropic/Gemini native SDKs); Groq/Cerebras fall back to LangChain inside `execute_chat`. `xai` lives here.
+- **Native chat path (`execute_chat` / `fetch_models`) supports 12 providers, all native** — Anthropic and Gemini via their own SDKs; OpenAI and OpenRouter via the openai SDK; and 8 more through the shared OpenAI-compatible client with a per-provider `base_url` (xai, deepseek, kimi, mistral, groq, cerebras, ollama, lmstudio — registered in `providers/_compat.py`). `execute_chat` delegates every provider to `ChatUnifier.chat`; there is no per-provider branch and no chat-path LangChain fallback. `xai` lives here.
- **The agent dropdown exposes 11 providers** for `aiAgent`, `chatAgent` (Zeenie), and all specialized agents — the `provider` Literal in [`nodes/agent/ai_agent/__init__.py`](../server/nodes/agent/ai_agent/__init__.py), [`chat_agent.py`](../server/nodes/agent/chat_agent/__init__.py), and [`_specialized.py`](../server/nodes/agent/_specialized.py): `openai`, `anthropic`, `gemini`, `openrouter`, `groq`, `cerebras`, `deepseek`, `kimi`, `mistral`, `ollama`, `lmstudio`. **`xai` is native-chat-only and is NOT in the agent Literal** (no agent dropdown entry).
-- Groq and Cerebras are available as standalone chat-model nodes AND in the agent dropdown, but use the LangChain path for both chat and agent execution.
+- Groq and Cerebras are available as standalone chat-model nodes AND in the agent dropdown. Chat runs on the native OpenAI-compatible client; only the agent path uses LangChain (`ChatGroq` / `ChatCerebras`) — the same chat-native / agent-LangChain split every provider has.
### Provider / model reference table
diff --git a/docs/diagrams/ai-agent-routing.svg b/docs/diagrams/ai-agent-routing.svg
index d7b336af..6364583a 100644
--- a/docs/diagrams/ai-agent-routing.svg
+++ b/docs/diagrams/ai-agent-routing.svg
@@ -1,138 +1,121 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1400 900" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1165 985" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
<path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"/>
</marker>
<style>
.bg { fill: #282a36; }
- .entry { fill: #44475a; stroke: #f1fa8c; stroke-width: 2.5; }
- .method { fill: #44475a; stroke: #ffb86c; stroke-width: 2; }
- .decision { fill: #44475a; stroke: #bd93f9; stroke-width: 2.5; }
- .native { fill: #44475a; stroke: #8be9fd; stroke-width: 2; }
- .langchain { fill: #44475a; stroke: #bd93f9; stroke-width: 2; }
- .shared { fill: #44475a; stroke: #50fa7b; stroke-width: 2.5; }
- .title { fill: #f8f8f2; font-size: 16px; font-weight: 700; }
- .big { fill: #f8f8f2; font-size: 17px; font-weight: 700; }
- .sub { fill: #f8f8f2; font-size: 11px; }
- .path { fill: #8be9fd; font-size: 11px; }
- .path-lc { fill: #bd93f9; font-size: 11px; }
+ .panel { fill: #44475a; stroke-width: 2; }
+ .p-cyan { stroke: #8be9fd; } .p-purple { stroke: #bd93f9; } .p-orange { stroke: #ffb86c; } .p-green { stroke: #50fa7b; } .p-pink { stroke: #ff79c6; }
+ .title { fill: #f8f8f2; font-size: 20px; font-weight: 700; }
+ .h1 { fill: #f8f8f2; font-size: 18px; font-weight: 700; }
+ .h2 { fill: #f8f8f2; font-size: 14px; font-weight: 700; }
+ .sub { fill: #f8f8f2; font-size: 12px; }
+ .small { fill: #f8f8f2; font-size: 10px; }
+ .label { fill: #f1fa8c; font-size: 11px; font-style: italic; }
.conn { stroke: #f8f8f2; stroke-width: 1.8; fill: none; }
- .conn-native { stroke: #8be9fd; stroke-width: 2; fill: none; }
- .conn-lc { stroke: #bd93f9; stroke-width: 2; fill: none; }
- .branch-label { fill: #f1fa8c; font-size: 12px; font-style: italic; font-weight: 700; }
- .col-header { fill: #6272a4; font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }
- .caption { fill: #6272a4; font-size: 11px; }
+ .conn-dot { stroke: #6272a4; stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
+ .box { fill: #282a36; stroke-width: 1.5; }
+ .tier-label { fill: #6272a4; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
+ .accent-cyan { fill: #8be9fd; } .accent-purple { fill: #bd93f9; } .accent-green { fill: #50fa7b; } .accent-orange { fill: #ffb86c; } .accent-pink { fill: #ff79c6; }
</style>
</defs>
-
- <rect class="bg" width="1400" height="900"/>
+ <rect class="bg" width="1165" height="985"/>
<!-- Title -->
- <text x="700" y="35" class="title" text-anchor="middle" font-size="20">AI Service: Native SDK vs LangChain Routing</text>
- <text x="700" y="58" class="caption" text-anchor="middle">server/services/ai.py + server/services/llm/</text>
-
- <!-- AIService entry -->
- <rect class="entry" x="540" y="85" width="320" height="70" rx="8"/>
- <text x="700" y="115" class="big" text-anchor="middle">AIService</text>
- <text x="700" y="138" class="sub" text-anchor="middle">server/services/ai.py (~4500 lines)</text>
-
- <!-- Branch arrows to two methods -->
- <path class="conn" d="M 700 155 L 700 185 L 300 185 L 300 215" marker-end="url(#arrow)"/>
- <path class="conn" d="M 700 155 L 700 185 L 1100 185 L 1100 215" marker-end="url(#arrow)"/>
-
- <!-- Column headers -->
- <text x="300" y="205" class="col-header" text-anchor="middle">Method 1: Direct Chat</text>
- <text x="1100" y="205" class="col-header" text-anchor="middle">Method 2: Agent Tool-Calling</text>
-
- <!-- LEFT COLUMN: execute_chat -->
- <rect class="method" x="120" y="215" width="360" height="75" rx="8"/>
- <text x="300" y="243" class="big" text-anchor="middle">execute_chat(parameters)</text>
- <text x="300" y="265" class="sub" text-anchor="middle">Used by chat model nodes</text>
- <text x="300" y="283" class="caption" text-anchor="middle">openaiChatModel, anthropicChatModel, ...</text>
-
- <!-- Decision: is_native_provider -->
- <polygon class="decision" points="300,310 470,385 300,460 130,385"/>
- <text x="300" y="375" class="big" text-anchor="middle">is_native_provider</text>
- <text x="300" y="400" class="big" text-anchor="middle">(provider)?</text>
-
- <!-- Arrow from method to decision -->
- <path class="conn" d="M 300 290 L 300 310" marker-end="url(#arrow)"/>
-
- <!-- Branch yes (native) -->
- <path class="conn-native" d="M 470 385 L 530 385 L 530 495" marker-end="url(#arrow)"/>
- <text x="505" y="375" class="branch-label">yes</text>
-
- <!-- Branch no (LangChain fallback) -->
- <path class="conn-lc" d="M 130 385 L 70 385 L 70 495" marker-end="url(#arrow)"/>
- <text x="95" y="375" class="branch-label">no</text>
-
- <!-- Native path box -->
- <rect class="native" x="340" y="495" width="380" height="150" rx="8"/>
- <text x="530" y="522" class="title" text-anchor="middle" fill="#8be9fd">Native SDK Path</text>
- <text x="530" y="545" class="sub" text-anchor="middle">create_provider(name, api_key)</text>
- <text x="530" y="563" class="sub" text-anchor="middle">lazy-imports one of:</text>
- <text x="530" y="582" class="path" text-anchor="middle">AnthropicProvider / OpenAIProvider</text>
- <text x="530" y="600" class="path" text-anchor="middle">GeminiProvider / OpenRouterProvider</text>
- <text x="530" y="622" class="sub" text-anchor="middle">OpenAI-compatible (xAI, DeepSeek,</text>
- <text x="530" y="638" class="sub" text-anchor="middle">Kimi, Mistral): shared OpenAIProvider + base_url</text>
-
- <!-- LangChain fallback box -->
- <rect class="langchain" x="10" y="495" width="260" height="150" rx="8"/>
- <text x="140" y="522" class="title" text-anchor="middle" fill="#bd93f9">LangChain Fallback</text>
- <text x="140" y="545" class="sub" text-anchor="middle">create_model()</text>
- <text x="140" y="565" class="path-lc" text-anchor="middle">ChatGroq</text>
- <text x="140" y="583" class="path-lc" text-anchor="middle">ChatCerebras</text>
- <text x="140" y="608" class="sub" text-anchor="middle">(providers without native</text>
- <text x="140" y="624" class="sub" text-anchor="middle">SDK implementation yet)</text>
-
- <!-- Both converge on LLMResponse -->
- <path class="conn-native" d="M 530 645 L 530 690" marker-end="url(#arrow)"/>
- <path class="conn-lc" d="M 140 645 L 140 680 L 340 680 L 340 690" marker-end="url(#arrow)"/>
-
- <!-- RIGHT COLUMN: execute_agent / execute_chat_agent -->
- <rect class="method" x="920" y="215" width="360" height="75" rx="8"/>
- <text x="1100" y="243" class="big" text-anchor="middle">execute_agent(parameters)</text>
- <text x="1100" y="263" class="sub" text-anchor="middle">execute_chat_agent(parameters)</text>
- <text x="1100" y="283" class="caption" text-anchor="middle">aiAgent, chatAgent, 11 specialized + 2 team leads</text>
-
- <!-- Arrow -->
- <path class="conn-lc" d="M 1100 290 L 1100 330" marker-end="url(#arrow)"/>
-
- <!-- LangChain chat model box -->
- <rect class="langchain" x="920" y="330" width="360" height="130" rx="8"/>
- <text x="1100" y="358" class="title" text-anchor="middle" fill="#bd93f9">LangChain chat model</text>
- <text x="1100" y="382" class="sub" text-anchor="middle">create_model() -&gt; LangChain class</text>
- <text x="1100" y="402" class="path-lc" text-anchor="middle">ChatOpenAI / ChatAnthropic</text>
- <text x="1100" y="420" class="path-lc" text-anchor="middle">ChatGoogleGenerativeAI / ChatGroq / ...</text>
- <text x="1100" y="442" class="sub" text-anchor="middle">.bind_tools([StructuredTool, ...])</text>
-
- <!-- Arrow to agent loop -->
- <path class="conn-lc" d="M 1100 460 L 1100 500" marker-end="url(#arrow)"/>
-
- <!-- _run_agent_loop box -->
- <rect class="langchain" x="900" y="500" width="400" height="155" rx="8"/>
- <text x="1100" y="528" class="title" text-anchor="middle" fill="#bd93f9">_run_agent_loop (plain async)</text>
- <text x="1100" y="552" class="sub" text-anchor="middle">for iteration in range(max): ainvoke -&gt; tool_calls?</text>
- <text x="1100" y="572" class="sub" text-anchor="middle">if tools: dispatch each, append ToolMessage, loop</text>
- <text x="1100" y="592" class="sub" text-anchor="middle">else: return final response</text>
- <text x="1100" y="615" class="caption" text-anchor="middle">Max iterations guard against tool loops</text>
- <text x="1100" y="635" class="caption" text-anchor="middle">Agent Teams: delegate_to_&lt;type&gt; tools auto-injected</text>
-
- <!-- Both columns converge on shared LLMResponse -->
- <rect class="shared" x="340" y="690" width="720" height="85" rx="8"/>
- <text x="700" y="718" class="title" text-anchor="middle" fill="#50fa7b">Normalized LLMResponse</text>
- <text x="700" y="740" class="sub" text-anchor="middle">content, thinking, tool_calls, usage (tokens), model, finish_reason</text>
- <text x="700" y="758" class="caption" text-anchor="middle">services/llm/protocol.py -- dataclass shared across all providers</text>
-
- <!-- Arrow from right column to shared -->
- <path class="conn-lc" d="M 1100 655 L 1100 685 L 720 685 L 720 690" marker-end="url(#arrow)"/>
-
- <!-- Shared infrastructure at bottom -->
- <rect class="shared" x="200" y="800" width="1000" height="80" rx="8"/>
- <text x="700" y="828" class="title" text-anchor="middle" fill="#50fa7b">Shared Infrastructure</text>
- <text x="700" y="850" class="sub" text-anchor="middle">compaction.py: token tracking, cost calculation, model-aware compaction (50% of context window)</text>
- <text x="700" y="868" class="sub" text-anchor="middle">pricing.py: USD cost per provider from config/pricing.json &#160;|&#160; model_registry.py: context length lookup</text>
-
- <!-- Arrow from LLMResponse down to shared infra -->
- <path class="conn" d="M 700 775 L 700 800" marker-end="url(#arrow)"/>
+ <text class="title" x="582" y="42" text-anchor="middle">AI Service - Chat (native SDKs) vs Agent (LangChain loop)</text>
+ <text class="sub" x="582" y="66" text-anchor="middle">server/services/ai.py + server/services/llm/</text>
+
+ <!-- Entry -->
+ <rect class="panel p-pink" x="452" y="85" width="260" height="60" rx="8"/>
+ <text class="h1" x="582" y="112" text-anchor="middle">AIService</text>
+ <text class="sub" x="582" y="133" text-anchor="middle">server/services/ai.py</text>
+
+ <!-- Entry arrows -->
+ <path class="conn" d="M 512 145 V 156 H 340 V 200" marker-end="url(#arrow)"/>
+ <text class="label" x="400" y="152" text-anchor="middle">chat completion</text>
+ <path class="conn" d="M 652 145 V 156 H 900 V 200" marker-end="url(#arrow)"/>
+ <text class="label" x="795" y="152" text-anchor="middle">agent with tools</text>
+
+ <!-- Chat panel (cyan) -->
+ <text class="h2 accent-cyan" x="44" y="172">Chat path - native SDKs, unified</text>
+ <rect class="panel p-cyan" x="40" y="180" width="510" height="470" rx="10"/>
+
+ <rect class="box p-cyan" x="60" y="200" width="470" height="58" rx="6"/>
+ <text class="h2" x="295" y="224" text-anchor="middle">execute_chat(...)</text>
+ <text class="sub" x="295" y="244" text-anchor="middle">chat-model nodes: openaiChatModel, anthropicChatModel, ...</text>
+
+ <path class="conn" d="M 295 258 L 295 306" marker-end="url(#arrow)"/>
+ <text class="label" x="305" y="286">delegates (every provider)</text>
+
+ <rect class="box p-cyan" x="60" y="306" width="470" height="76" rx="6"/>
+ <text class="h2" x="295" y="330" text-anchor="middle">ChatUnifier.chat(provider=...)</text>
+ <text class="sub" x="295" y="350" text-anchor="middle">single facade - no per-provider branch</text>
+ <text class="sub" x="295" y="368" text-anchor="middle">typed SDK errors -&gt; NodeUserError</text>
+
+ <path class="conn" d="M 295 382 L 295 430" marker-end="url(#arrow)"/>
+ <text class="label" x="305" y="410">lookup</text>
+
+ <rect class="box p-cyan" x="60" y="430" width="470" height="58" rx="6"/>
+ <text class="h2" x="295" y="454" text-anchor="middle">ProviderRegistry</text>
+ <text class="sub" x="295" y="474" text-anchor="middle">get_provider(name) -&gt; ProviderSpec.factory(...)</text>
+
+ <path class="conn" d="M 295 488 L 295 536" marker-end="url(#arrow)"/>
+ <text class="label" x="305" y="516">spec.factory()</text>
+
+ <rect class="box p-cyan" x="60" y="536" width="470" height="94" rx="6"/>
+ <text class="h2" x="295" y="560" text-anchor="middle">Native provider clients (12)</text>
+ <text class="sub" x="295" y="580" text-anchor="middle">Anthropic &#183; OpenAI &#183; Gemini &#183; OpenRouter</text>
+ <text class="sub" x="295" y="598" text-anchor="middle">OpenAI-compat via base_url: xAI, DeepSeek, Kimi,</text>
+ <text class="sub" x="295" y="616" text-anchor="middle">Mistral, Groq, Cerebras, Ollama, LM Studio</text>
+
+ <!-- Agent panel (purple) -->
+ <text class="h2 accent-purple" x="589" y="172">Agent path - LangChain tool loop</text>
+ <rect class="panel p-purple" x="585" y="180" width="540" height="382" rx="10"/>
+
+ <rect class="box p-purple" x="605" y="200" width="500" height="76" rx="6"/>
+ <text class="h2" x="855" y="224" text-anchor="middle">execute_agent / execute_chat_agent</text>
+ <text class="sub" x="855" y="244" text-anchor="middle">aiAgent, chatAgent + specialized agents + team leads</text>
+ <text class="sub" x="855" y="262" text-anchor="middle">(CLI agents rlm / claude_code / codex bypass this loop)</text>
+
+ <path class="conn" d="M 855 276 L 855 324" marker-end="url(#arrow)"/>
+ <text class="label" x="865" y="304">builds model</text>
+
+ <rect class="box p-purple" x="605" y="324" width="500" height="76" rx="6"/>
+ <text class="h2" x="855" y="348" text-anchor="middle">create_model() -&gt; LangChain chat model</text>
+ <text class="sub" x="855" y="368" text-anchor="middle">ChatOpenAI / ChatAnthropic / ChatGoogleGenerativeAI / ...</text>
+ <text class="sub" x="855" y="386" text-anchor="middle">.bind_tools([StructuredTool, ...])</text>
+
+ <path class="conn" d="M 855 400 L 855 448" marker-end="url(#arrow)"/>
+ <text class="label" x="865" y="428">bind_tools</text>
+
+ <rect class="box p-purple" x="605" y="448" width="500" height="94" rx="6"/>
+ <text class="h2" x="855" y="472" text-anchor="middle">_run_agent_loop (plain async)</text>
+ <text class="sub" x="855" y="492" text-anchor="middle">loop: ainvoke -&gt; tool_calls? dispatch -&gt; ToolMessage</text>
+ <text class="sub" x="855" y="510" text-anchor="middle">max-iterations guard &#183; delegate_to_&lt;type&gt; auto-injected</text>
+ <text class="sub" x="855" y="528" text-anchor="middle">hot-rebind of tools after canvas mutations</text>
+
+ <!-- Convergence arrows -->
+ <path class="conn" d="M 295 630 V 662 H 462 V 706" marker-end="url(#arrow)"/>
+ <text class="label" x="307" y="680">LLMResponse</text>
+ <path class="conn" d="M 855 542 V 662 H 702 V 706" marker-end="url(#arrow)"/>
+ <text class="label" x="867" y="575">final message</text>
+
+ <!-- Shared panel (green) -->
+ <text class="h2 accent-green" x="582" y="682" text-anchor="middle">Shared convergence</text>
+ <rect class="panel p-green" x="282" y="690" width="600" height="254" rx="10"/>
+
+ <rect class="box p-green" x="302" y="706" width="560" height="76" rx="6"/>
+ <text class="h2" x="582" y="730" text-anchor="middle">Normalized response</text>
+ <text class="sub" x="582" y="750" text-anchor="middle">content &#183; thinking &#183; tool_calls &#183; usage &#183; model &#183; finish_reason</text>
+ <text class="sub" x="582" y="768" text-anchor="middle">services/llm/protocol.py (agent path: same fields in a result dict)</text>
+
+ <path class="conn" d="M 582 782 L 582 830" marker-end="url(#arrow)"/>
+ <text class="label" x="594" y="810">token/cost tracking after each turn</text>
+
+ <rect class="box p-green" x="302" y="830" width="560" height="94" rx="6"/>
+ <text class="h2" x="582" y="854" text-anchor="middle">Shared infrastructure</text>
+ <text class="sub" x="582" y="874" text-anchor="middle">compaction.py: post-turn token tracking + model-aware compaction</text>
+ <text class="sub" x="582" y="892" text-anchor="middle">pricing.py: USD cost from config/pricing.json</text>
+ <text class="sub" x="582" y="910" text-anchor="middle">model_registry.py: context-length lookup</text>
</svg>
diff --git a/docs/diagrams/default-workflows.svg b/docs/diagrams/default-workflows.svg
index 53e0188f..1ff5cdbd 100644
--- a/docs/diagrams/default-workflows.svg
+++ b/docs/diagrams/default-workflows.svg
@@ -1,314 +1,186 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1100 1020" width="100%" preserveAspectRatio="xMidYMid meet" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif">
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1240 1320" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
<defs>
- <marker id="arr" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
- <path d="M0,0 L10,5 L0,10 z" fill="#6b7280"/>
- </marker>
- <marker id="arr-purple" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
- <path d="M0,0 L10,5 L0,10 z" fill="#8b5cf6"/>
- </marker>
- <marker id="arr-cyan" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
- <path d="M0,0 L10,5 L0,10 z" fill="#06b6d4"/>
- </marker>
- <marker id="arr-green" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
- <path d="M0,0 L10,5 L0,10 z" fill="#10b981"/>
+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
+ <path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"/>
</marker>
<style>
- .bg { fill: #fafafa; }
- .header-text { fill: #111827; font-size: 22px; font-weight: 700; }
- .header-sub { fill: #6b7280; font-size: 14px; }
-
- .row-card { fill: #ffffff; stroke-width: 2; rx: 14; }
- .row-1 { stroke: #8b5cf6; }
- .row-2 { stroke: #06b6d4; }
- .row-3 { stroke: #10b981; }
-
- .num-bg-1 { fill: #8b5cf6; }
- .num-bg-2 { fill: #06b6d4; }
- .num-bg-3 { fill: #10b981; }
- .num-txt { fill: #ffffff; font-size: 15px; font-weight: 700; }
-
- .row-title { fill: #111827; font-size: 18px; font-weight: 700; }
- .row-tag { fill: #6b7280; font-size: 12px; font-style: italic; }
- .row-desc { fill: #4b5563; font-size: 13px; }
- .row-use { fill: #1f2937; font-size: 13px; font-weight: 600; }
-
- .node-box { fill: #ffffff; stroke: #d1d5db; stroke-width: 1.5; rx: 8; }
- .node-trigger { fill: #fef3c7; stroke: #f59e0b; }
- .node-agent-1 { fill: #ede9fe; stroke: #8b5cf6; stroke-width: 2.5; }
- .node-agent-2 { fill: #cffafe; stroke: #06b6d4; stroke-width: 2.5; }
- .node-agent-3 { fill: #d1fae5; stroke: #10b981; stroke-width: 2.5; }
- .node-helper { fill: #f3f4f6; stroke: #9ca3af; }
- .node-tool { fill: #f9fafb; stroke: #d1d5db; }
- .node-output { fill: #e0f2fe; stroke: #0284c7; }
-
- .node-txt { fill: #111827; font-size: 12px; font-weight: 600; }
- .node-sub { fill: #6b7280; font-size: 10px; }
-
- .conn { stroke: #9ca3af; stroke-width: 2; fill: none; stroke-linecap: round; }
- .conn-dotted { stroke: #9ca3af; stroke-width: 1.5; fill: none; stroke-dasharray: 3,3; }
- .conn-delegate { stroke: #06b6d4; stroke-width: 2; fill: none; stroke-linecap: round; }
- .conn-flow-1 { stroke: #8b5cf6; stroke-width: 2; fill: none; stroke-linecap: round; }
- .conn-flow-2 { stroke: #06b6d4; stroke-width: 2; fill: none; stroke-linecap: round; }
- .conn-flow-3 { stroke: #10b981; stroke-width: 2; fill: none; stroke-linecap: round; }
-
- .label-italic { fill: #6b7280; font-size: 10px; font-style: italic; }
+ .bg { fill: #282a36; }
+ .panel { fill: #44475a; stroke-width: 2; }
+ .p-cyan { stroke: #8be9fd; } .p-purple { stroke: #bd93f9; } .p-orange { stroke: #ffb86c; } .p-green { stroke: #50fa7b; } .p-pink { stroke: #ff79c6; }
+ .title { fill: #f8f8f2; font-size: 20px; font-weight: 700; }
+ .h1 { fill: #f8f8f2; font-size: 18px; font-weight: 700; }
+ .h2 { fill: #f8f8f2; font-size: 14px; font-weight: 700; }
+ .sub { fill: #f8f8f2; font-size: 12px; }
+ .small { fill: #f8f8f2; font-size: 10px; }
+ .label { fill: #f1fa8c; font-size: 11px; font-style: italic; }
+ .conn { stroke: #f8f8f2; stroke-width: 1.8; fill: none; }
+ .conn-dot { stroke: #6272a4; stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
+ .box { fill: #282a36; stroke-width: 1.5; }
+ .tier-label { fill: #6272a4; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
+ .accent-cyan { fill: #8be9fd; } .accent-purple { fill: #bd93f9; } .accent-green { fill: #50fa7b; } .accent-orange { fill: #ffb86c; } .accent-pink { fill: #ff79c6; }
</style>
</defs>
-
- <rect width="1100" height="1020" class="bg"/>
+ <rect class="bg" width="1240" height="1320"/>
<!-- Header -->
- <text x="550" y="40" text-anchor="middle" class="header-text">Three Workflows You Get on Day One</text>
- <text x="550" y="62" text-anchor="middle" class="header-sub">Open OpenCompany for the first time and these are already loaded. Each shows a different pattern you can copy.</text>
-
- <!-- ============================================================ -->
- <!-- WORKFLOW 1: AI ASSISTANT -->
- <!-- ============================================================ -->
- <rect x="30" y="90" width="1040" height="240" class="row-card row-1"/>
- <circle cx="58" cy="118" r="14" class="num-bg-1"/>
- <text x="58" y="123" text-anchor="middle" class="num-txt">1</text>
- <text x="84" y="118" class="row-title">AI Assistant</text>
- <text x="84" y="135" class="row-tag">16 nodes · one smart agent with a full toolbox</text>
-
- <!-- Triggers (left) -->
- <rect x="50" y="180" width="120" height="38" class="node-box node-trigger" rx="8"/>
- <text x="110" y="198" text-anchor="middle" class="node-txt">💬 Chat</text>
- <text x="110" y="212" text-anchor="middle" class="node-sub">in-app panel</text>
-
- <rect x="50" y="232" width="120" height="38" class="node-box node-trigger" rx="8"/>
- <text x="110" y="250" text-anchor="middle" class="node-txt">📱 Telegram</text>
- <text x="110" y="264" text-anchor="middle" class="node-sub">incoming message</text>
-
- <!-- AI Agent center -->
- <rect x="280" y="195" width="160" height="60" class="node-box node-agent-1" rx="10"/>
- <text x="360" y="220" text-anchor="middle" class="node-txt" style="font-size: 14px;">🤖 AI Agent</text>
- <text x="360" y="240" text-anchor="middle" class="node-sub">thinks, decides, acts</text>
-
- <!-- Arrows in -->
- <path d="M 175 199 L 280 215" class="conn-flow-1" marker-end="url(#arr-purple)"/>
- <path d="M 175 251 L 280 235" class="conn-flow-1" marker-end="url(#arr-purple)"/>
-
- <!-- Memory + Skills attached below -->
- <rect x="220" y="280" width="100" height="32" class="node-box node-helper" rx="6"/>
- <text x="270" y="299" text-anchor="middle" class="node-txt">🧠 Memory</text>
-
- <rect x="330" y="280" width="100" height="32" class="node-box node-helper" rx="6"/>
- <text x="380" y="299" text-anchor="middle" class="node-txt">📚 Skills</text>
-
- <path d="M 320 255 L 270 280" class="conn-dotted"/>
- <path d="M 400 255 L 380 280" class="conn-dotted"/>
-
- <!-- Tools cluster (right of agent) -->
- <rect x="490" y="170" width="280" height="120" class="node-box" rx="10" style="fill: #fafafa; stroke: #d1d5db;"/>
- <text x="630" y="190" text-anchor="middle" class="node-txt" style="fill: #6b7280;">🔧 Toolbox</text>
-
- <rect x="500" y="200" width="84" height="22" class="node-tool" rx="5"/>
- <text x="542" y="215" text-anchor="middle" class="node-sub">🔍 Web search</text>
-
- <rect x="592" y="200" width="84" height="22" class="node-tool" rx="5"/>
- <text x="634" y="215" text-anchor="middle" class="node-sub">🌐 Browser</text>
-
- <rect x="684" y="200" width="84" height="22" class="node-tool" rx="5"/>
- <text x="726" y="215" text-anchor="middle" class="node-sub">📄 Files</text>
-
- <rect x="500" y="228" width="84" height="22" class="node-tool" rx="5"/>
- <text x="542" y="243" text-anchor="middle" class="node-sub">💻 Shell</text>
-
- <rect x="592" y="228" width="84" height="22" class="node-tool" rx="5"/>
- <text x="634" y="243" text-anchor="middle" class="node-sub">🐍 Python</text>
-
- <rect x="684" y="228" width="84" height="22" class="node-tool" rx="5"/>
- <text x="726" y="243" text-anchor="middle" class="node-sub">⚙ Processes</text>
-
- <rect x="546" y="256" width="84" height="22" class="node-tool" rx="5"/>
- <text x="588" y="271" text-anchor="middle" class="node-sub">📋 Todos</text>
-
- <rect x="638" y="256" width="84" height="22" class="node-tool" rx="5"/>
- <text x="680" y="271" text-anchor="middle" class="node-sub">+ more</text>
-
- <path d="M 440 225 L 490 225" class="conn-flow-1" marker-end="url(#arr-purple)"/>
-
- <!-- Outputs (right) -->
- <rect x="830" y="180" width="180" height="38" class="node-box node-output" rx="8"/>
- <text x="920" y="198" text-anchor="middle" class="node-txt">📤 Telegram Send</text>
- <text x="920" y="212" text-anchor="middle" class="node-sub">reply to user</text>
-
- <rect x="830" y="232" width="180" height="38" class="node-box node-output" rx="8"/>
- <text x="920" y="250" text-anchor="middle" class="node-txt">📝 Console</text>
- <text x="920" y="264" text-anchor="middle" class="node-sub">live log in UI</text>
-
- <path d="M 770 199 L 830 199" class="conn-flow-1" marker-end="url(#arr-purple)"/>
- <path d="M 770 251 L 830 251" class="conn-flow-1" marker-end="url(#arr-purple)"/>
-
- <!-- Use this when -->
- <text x="58" y="313" class="row-use">USE WHEN:</text>
- <text x="155" y="313" class="row-desc">You want one AI that can browse the web, run code on your machine, and chat over Telegram.</text>
-
- <!-- ============================================================ -->
- <!-- WORKFLOW 2: AI EMPLOYEE -->
- <!-- ============================================================ -->
- <rect x="30" y="355" width="1040" height="340" class="row-card row-2"/>
- <circle cx="58" cy="383" r="14" class="num-bg-2"/>
- <text x="58" y="388" text-anchor="middle" class="num-txt">2</text>
- <text x="84" y="383" class="row-title">AI Employee</text>
- <text x="84" y="400" class="row-tag">58 nodes · a team lead that delegates to 5 specialists</text>
-
- <!-- Triggers (left) -->
- <rect x="50" y="450" width="120" height="38" class="node-box node-trigger" rx="8"/>
- <text x="110" y="468" text-anchor="middle" class="node-txt">💬 Chat</text>
- <text x="110" y="482" text-anchor="middle" class="node-sub">in-app panel</text>
-
- <rect x="50" y="500" width="120" height="38" class="node-box node-trigger" rx="8"/>
- <text x="110" y="518" text-anchor="middle" class="node-txt">📱 Telegram</text>
- <text x="110" y="532" text-anchor="middle" class="node-sub">incoming message</text>
-
- <!-- Zeenie team lead -->
- <rect x="240" y="465" width="170" height="62" class="node-box node-agent-2" rx="10"/>
- <text x="325" y="490" text-anchor="middle" class="node-txt" style="font-size: 14px;">👔 Zeenie</text>
- <text x="325" y="510" text-anchor="middle" class="node-sub">team lead — decides</text>
- <text x="325" y="522" text-anchor="middle" class="node-sub">who handles what</text>
-
- <path d="M 175 469 L 240 487" class="conn-flow-2" marker-end="url(#arr-cyan)"/>
- <path d="M 175 519 L 240 505" class="conn-flow-2" marker-end="url(#arr-cyan)"/>
-
- <!-- Zeenie's own Memory + Skills -->
- <rect x="245" y="545" width="78" height="26" class="node-box node-helper" rx="5"/>
- <text x="284" y="562" text-anchor="middle" class="node-sub">🧠 Memory</text>
-
- <rect x="327" y="545" width="78" height="26" class="node-box node-helper" rx="5"/>
- <text x="366" y="562" text-anchor="middle" class="node-sub">📚 Skills</text>
-
- <path d="M 290 527 L 284 545" class="conn-dotted"/>
- <path d="M 360 527 L 366 545" class="conn-dotted"/>
-
- <!-- Delegation arrow to specialists -->
- <text x="465" y="497" class="label-italic">delegates to →</text>
-
- <!-- Five specialists in a column -->
- <rect x="555" y="395" width="220" height="48" class="node-box node-agent-2" rx="8"/>
- <text x="665" y="414" text-anchor="middle" class="node-txt">💻 Coding Agent</text>
- <text x="665" y="430" text-anchor="middle" class="node-sub">files · shell · Python · processes</text>
-
- <rect x="555" y="450" width="220" height="48" class="node-box node-agent-2" rx="8"/>
- <text x="665" y="469" text-anchor="middle" class="node-txt">📧 Productivity Agent</text>
- <text x="665" y="485" text-anchor="middle" class="node-sub">Gmail · Calendar · Drive · Sheets</text>
-
- <rect x="555" y="505" width="220" height="48" class="node-box node-agent-2" rx="8"/>
- <text x="665" y="524" text-anchor="middle" class="node-txt">🗺 Travel Agent</text>
- <text x="665" y="540" text-anchor="middle" class="node-sub">Maps · geocoding · nearby places</text>
-
- <rect x="555" y="560" width="220" height="48" class="node-box node-agent-2" rx="8"/>
- <text x="665" y="579" text-anchor="middle" class="node-txt">🌐 Web Agent</text>
- <text x="665" y="595" text-anchor="middle" class="node-sub">browser · HTTP · web search</text>
-
- <rect x="555" y="615" width="220" height="48" class="node-box node-agent-2" rx="8"/>
- <text x="665" y="634" text-anchor="middle" class="node-txt">💬 Social Agent</text>
- <text x="665" y="650" text-anchor="middle" class="node-sub">Twitter · WhatsApp</text>
-
- <!-- Delegate connections -->
- <path d="M 410 480 Q 480 480 480 419 L 555 419" class="conn-delegate" marker-end="url(#arr-cyan)"/>
- <path d="M 410 490 Q 490 490 490 474 L 555 474" class="conn-delegate" marker-end="url(#arr-cyan)"/>
- <path d="M 410 500 L 555 529" class="conn-delegate" marker-end="url(#arr-cyan)"/>
- <path d="M 410 510 Q 490 510 490 584 L 555 584" class="conn-delegate" marker-end="url(#arr-cyan)"/>
- <path d="M 410 520 Q 480 520 480 639 L 555 639" class="conn-delegate" marker-end="url(#arr-cyan)"/>
-
- <!-- Note on isolation -->
- <text x="785" y="430" class="label-italic">each has its own</text>
- <text x="785" y="445" class="label-italic">memory · skills · tools</text>
-
- <!-- Outputs (right side) -->
- <rect x="830" y="540" width="180" height="38" class="node-box node-output" rx="8"/>
- <text x="920" y="558" text-anchor="middle" class="node-txt">📤 Telegram</text>
- <text x="920" y="572" text-anchor="middle" class="node-sub">reply to user</text>
-
- <rect x="830" y="585" width="180" height="38" class="node-box node-output" rx="8"/>
- <text x="920" y="603" text-anchor="middle" class="node-txt">📝 Console</text>
- <text x="920" y="617" text-anchor="middle" class="node-sub">per-agent logs</text>
-
- <!-- Use this when -->
- <text x="58" y="678" class="row-use">USE WHEN:</text>
- <text x="155" y="678" class="row-desc">You want one chat that handles everything — and each domain has a specialist that's actually good at it.</text>
-
- <!-- ============================================================ -->
- <!-- WORKFLOW 3: CLAUDE ASSISTANT -->
- <!-- ============================================================ -->
- <rect x="30" y="720" width="1040" height="240" class="row-card row-3"/>
- <circle cx="58" cy="748" r="14" class="num-bg-3"/>
- <text x="58" y="753" text-anchor="middle" class="num-txt">3</text>
- <text x="84" y="748" class="row-title">Claude Assistant</text>
- <text x="84" y="765" class="row-tag">15 nodes · Anthropic's Claude Code in a workflow, sessions persist across days</text>
-
- <!-- Triggers (left) -->
- <rect x="50" y="810" width="120" height="38" class="node-box node-trigger" rx="8"/>
- <text x="110" y="828" text-anchor="middle" class="node-txt">💬 Chat</text>
- <text x="110" y="842" text-anchor="middle" class="node-sub">in-app panel</text>
-
- <rect x="50" y="862" width="120" height="38" class="node-box node-trigger" rx="8"/>
- <text x="110" y="880" text-anchor="middle" class="node-txt">📱 Telegram</text>
- <text x="110" y="894" text-anchor="middle" class="node-sub">incoming message</text>
-
- <!-- Claude Code center -->
- <rect x="280" y="825" width="160" height="60" class="node-box node-agent-3" rx="10"/>
- <text x="360" y="850" text-anchor="middle" class="node-txt" style="font-size: 14px;">🧠 Claude Code</text>
- <text x="360" y="870" text-anchor="middle" class="node-sub">session-persistent CLI</text>
-
- <path d="M 175 829 L 280 845" class="conn-flow-3" marker-end="url(#arr-green)"/>
- <path d="M 175 881 L 280 865" class="conn-flow-3" marker-end="url(#arr-green)"/>
-
- <!-- Memory + Skills below -->
- <rect x="270" y="908" width="80" height="28" class="node-box node-helper" rx="5"/>
- <text x="310" y="926" text-anchor="middle" class="node-sub">🧠 Memory</text>
-
- <rect x="365" y="908" width="80" height="28" class="node-box node-helper" rx="5"/>
- <text x="405" y="926" text-anchor="middle" class="node-sub">📚 Skills</text>
-
- <path d="M 320 885 L 310 908" class="conn-dotted"/>
- <path d="M 400 885 L 405 908" class="conn-dotted"/>
-
- <!-- Tools cluster -->
- <rect x="490" y="800" width="280" height="120" class="node-box" rx="10" style="fill: #fafafa; stroke: #d1d5db;"/>
- <text x="630" y="820" text-anchor="middle" class="node-txt" style="fill: #6b7280;">🔧 Coding Toolbox</text>
-
- <rect x="500" y="830" width="84" height="22" class="node-tool" rx="5"/>
- <text x="542" y="845" text-anchor="middle" class="node-sub">📄 Files</text>
-
- <rect x="592" y="830" width="84" height="22" class="node-tool" rx="5"/>
- <text x="634" y="845" text-anchor="middle" class="node-sub">🔎 FS Search</text>
-
- <rect x="684" y="830" width="84" height="22" class="node-tool" rx="5"/>
- <text x="726" y="845" text-anchor="middle" class="node-sub">💻 Shell</text>
-
- <rect x="500" y="858" width="84" height="22" class="node-tool" rx="5"/>
- <text x="542" y="873" text-anchor="middle" class="node-sub">⚙ Processes</text>
-
- <rect x="592" y="858" width="84" height="22" class="node-tool" rx="5"/>
- <text x="634" y="873" text-anchor="middle" class="node-sub">🌐 Browser</text>
-
- <rect x="684" y="858" width="84" height="22" class="node-tool" rx="5"/>
- <text x="726" y="873" text-anchor="middle" class="node-sub">🔍 Search</text>
-
- <rect x="592" y="886" width="84" height="22" class="node-tool" rx="5"/>
- <text x="634" y="901" text-anchor="middle" class="node-sub">📋 Todos</text>
-
- <path d="M 440 855 L 490 855" class="conn-flow-3" marker-end="url(#arr-green)"/>
-
- <!-- Outputs -->
- <rect x="830" y="810" width="180" height="38" class="node-box node-output" rx="8"/>
- <text x="920" y="828" text-anchor="middle" class="node-txt">📤 Telegram Send</text>
- <text x="920" y="842" text-anchor="middle" class="node-sub">reply to user</text>
-
- <rect x="830" y="862" width="180" height="38" class="node-box node-output" rx="8"/>
- <text x="920" y="880" text-anchor="middle" class="node-txt">📝 Console</text>
- <text x="920" y="894" text-anchor="middle" class="node-sub">live log in UI</text>
-
- <path d="M 770 829 L 830 829" class="conn-flow-3" marker-end="url(#arr-green)"/>
- <path d="M 770 881 L 830 881" class="conn-flow-3" marker-end="url(#arr-green)"/>
-
- <!-- Use this when -->
- <text x="58" y="945" class="row-use">USE WHEN:</text>
- <text x="155" y="945" class="row-desc">Your AI needs to actually ship code — refactor, build features, debug — across sessions that persist.</text>
-
- <!-- Footer note -->
- <text x="550" y="995" text-anchor="middle" class="label-italic" style="font-size: 12px;">All three are real .json files in the /workflows folder. Open them in the canvas, edit anything, save as your own.</text>
-
+ <text x="620" y="42" text-anchor="middle" class="title">Three Workflows You Get on Day One</text>
+ <text x="620" y="68" text-anchor="middle" class="sub">Loaded automatically on first launch. Each shows a different pattern you can copy.</text>
+
+ <!-- ================= ROW 1: AI ASSISTANT (purple) ================= -->
+ <rect class="panel p-purple" x="30" y="95" width="1180" height="340" rx="10"/>
+ <text x="50" y="129" class="h1 accent-purple">AI Assistant</text>
+ <text x="50" y="151" class="sub">16 nodes &#183; one smart agent with a full toolbox</text>
+
+ <!-- triggers -->
+ <rect class="box p-orange" x="50" y="175" width="180" height="40" rx="6"/>
+ <text x="140" y="200" text-anchor="middle" class="h2">Chat Trigger</text>
+ <rect class="box p-orange" x="50" y="235" width="180" height="40" rx="6"/>
+ <text x="140" y="260" text-anchor="middle" class="h2">Telegram Receive</text>
+
+ <!-- agent -->
+ <rect class="box p-purple" x="380" y="195" width="200" height="60" rx="8"/>
+ <text x="480" y="230" text-anchor="middle" class="h2">AI Agent</text>
+
+ <path class="conn" d="M 230 195 L 380 213" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 230 255 L 380 237" marker-end="url(#arrow)"/>
+
+ <!-- outputs -->
+ <rect class="box p-pink" x="700" y="175" width="180" height="40" rx="6"/>
+ <text x="790" y="200" text-anchor="middle" class="h2">Console</text>
+ <rect class="box p-pink" x="700" y="235" width="180" height="40" rx="6"/>
+ <text x="790" y="260" text-anchor="middle" class="h2">Telegram Send</text>
+
+ <path class="conn" d="M 580 213 L 700 195" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 580 237 L 700 255" marker-end="url(#arrow)"/>
+
+ <!-- dotted attachment note -->
+ <path class="conn-dot" d="M 560 195 L 560 160 L 1020 160 L 1020 175"/>
+ <rect class="box p-cyan" x="930" y="175" width="250" height="44" rx="6"/>
+ <text x="1055" y="193" text-anchor="middle" class="sub">Memory + Skills</text>
+ <text x="1055" y="209" text-anchor="middle" class="sub">attached to the agent</text>
+
+ <!-- toolbox cluster -->
+ <path class="conn-dot" d="M 480 255 L 480 305"/>
+ <rect class="box p-purple" x="380" y="305" width="560" height="80" rx="8"/>
+ <text x="660" y="329" text-anchor="middle" class="h2 accent-purple">Toolbox (9 tools)</text>
+ <text x="660" y="351" text-anchor="middle" class="small">web search &#183; browser &#183; file read/write &#183; fs search</text>
+ <text x="660" y="369" text-anchor="middle" class="small">shell &#183; Python &#183; processes &#183; todos</text>
+
+ <text x="50" y="415" class="sub"><tspan class="accent-purple">Use when:</tspan> one AI that browses, runs code, and chats over Telegram.</text>
+
+ <!-- ================= ROW 2: AI EMPLOYEE (cyan) ================= -->
+ <rect class="panel p-cyan" x="30" y="465" width="1180" height="410" rx="10"/>
+ <text x="50" y="499" class="h1 accent-cyan">AI Employee</text>
+ <text x="50" y="521" class="sub">58 nodes &#183; a team lead that delegates to 5 specialists</text>
+
+ <!-- triggers -->
+ <rect class="box p-orange" x="50" y="541" width="180" height="40" rx="6"/>
+ <text x="140" y="566" text-anchor="middle" class="h2">Chat Trigger</text>
+ <rect class="box p-orange" x="50" y="599" width="180" height="40" rx="6"/>
+ <text x="140" y="624" text-anchor="middle" class="h2">Telegram Receive</text>
+ <rect class="box p-orange" x="50" y="657" width="180" height="40" rx="6"/>
+ <text x="140" y="682" text-anchor="middle" class="h2">Task Completed</text>
+
+ <!-- team lead -->
+ <rect class="box p-cyan" x="380" y="589" width="200" height="60" rx="8"/>
+ <text x="480" y="613" text-anchor="middle" class="h2">Zeenie</text>
+ <text x="480" y="633" text-anchor="middle" class="small">team lead</text>
+
+ <path class="conn" d="M 230 561 L 380 604" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 230 619 L 380 619" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 230 677 L 380 634" marker-end="url(#arrow)"/>
+
+ <!-- outputs -->
+ <rect class="box p-pink" x="700" y="570" width="180" height="40" rx="6"/>
+ <text x="790" y="595" text-anchor="middle" class="h2">Console</text>
+ <rect class="box p-pink" x="700" y="628" width="180" height="40" rx="6"/>
+ <text x="790" y="653" text-anchor="middle" class="h2">Telegram Send</text>
+
+ <path class="conn" d="M 580 609 L 700 590" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 580 629 L 700 648" marker-end="url(#arrow)"/>
+
+ <!-- dotted attachment note -->
+ <path class="conn-dot" d="M 560 589 L 560 553 L 1020 553 L 1020 599"/>
+ <rect class="box p-purple" x="930" y="599" width="250" height="44" rx="6"/>
+ <text x="1055" y="617" text-anchor="middle" class="sub">own Memory + Skills</text>
+ <text x="1055" y="633" text-anchor="middle" class="sub">+ todos + processes</text>
+
+ <!-- delegation trunk + bus -->
+ <path class="conn" d="M 480 649 L 480 715"/>
+ <text x="495" y="690" class="label">delegates to</text>
+ <path class="conn" d="M 210 715 L 1050 715"/>
+ <path class="conn" d="M 210 715 L 210 746" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 450 715 L 450 746" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 670 715 L 670 746" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 860 715 L 860 746" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 1050 715 L 1050 746" marker-end="url(#arrow)"/>
+
+ <!-- specialists -->
+ <rect class="box p-cyan" x="110" y="747" width="200" height="56" rx="6"/>
+ <text x="210" y="770" text-anchor="middle" class="h2">Coding Agent</text>
+ <text x="210" y="790" text-anchor="middle" class="small">files &#183; shell &#183; Python</text>
+
+ <rect class="box p-cyan" x="335" y="747" width="230" height="56" rx="6"/>
+ <text x="450" y="770" text-anchor="middle" class="h2">Productivity Agent</text>
+ <text x="450" y="790" text-anchor="middle" class="small">Gmail &#183; Calendar &#183; Drive &#183; Sheets</text>
+
+ <rect class="box p-cyan" x="590" y="747" width="160" height="56" rx="6"/>
+ <text x="670" y="770" text-anchor="middle" class="h2">Travel Agent</text>
+ <text x="670" y="790" text-anchor="middle" class="small">Maps &#183; places</text>
+
+ <rect class="box p-cyan" x="775" y="747" width="170" height="56" rx="6"/>
+ <text x="860" y="770" text-anchor="middle" class="h2">Web Agent</text>
+ <text x="860" y="790" text-anchor="middle" class="small">browser &#183; HTTP &#183; search</text>
+
+ <rect class="box p-cyan" x="970" y="747" width="160" height="56" rx="6"/>
+ <text x="1050" y="770" text-anchor="middle" class="h2">Social Agent</text>
+ <text x="1050" y="790" text-anchor="middle" class="small">Twitter &#183; WhatsApp</text>
+
+ <text x="620" y="828" text-anchor="middle" class="small">each specialist has its own memory &#183; skills &#183; tools &#183; console</text>
+
+ <text x="50" y="856" class="sub"><tspan class="accent-cyan">Use when:</tspan> one chat handles everything, each domain gets a real specialist.</text>
+
+ <!-- ================= ROW 3: CLAUDE ASSISTANT (green) ================= -->
+ <rect class="panel p-green" x="30" y="905" width="1180" height="340" rx="10"/>
+ <text x="50" y="939" class="h1 accent-green">Claude Assistant</text>
+ <text x="50" y="961" class="sub">15 nodes &#183; Claude Code in a workflow, sessions persist across days</text>
+
+ <!-- triggers -->
+ <rect class="box p-orange" x="50" y="985" width="180" height="40" rx="6"/>
+ <text x="140" y="1010" text-anchor="middle" class="h2">Chat Trigger</text>
+ <rect class="box p-orange" x="50" y="1045" width="180" height="40" rx="6"/>
+ <text x="140" y="1070" text-anchor="middle" class="h2">Telegram Receive</text>
+
+ <!-- agent -->
+ <rect class="box p-green" x="380" y="1005" width="200" height="60" rx="8"/>
+ <text x="480" y="1040" text-anchor="middle" class="h2">Claude Code</text>
+
+ <path class="conn" d="M 230 1005 L 380 1023" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 230 1065 L 380 1047" marker-end="url(#arrow)"/>
+
+ <!-- outputs -->
+ <rect class="box p-pink" x="700" y="985" width="180" height="40" rx="6"/>
+ <text x="790" y="1010" text-anchor="middle" class="h2">Console</text>
+ <rect class="box p-pink" x="700" y="1045" width="180" height="40" rx="6"/>
+ <text x="790" y="1070" text-anchor="middle" class="h2">Telegram Send</text>
+
+ <path class="conn" d="M 580 1023 L 700 1005" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 580 1047 L 700 1065" marker-end="url(#arrow)"/>
+
+ <!-- dotted attachment note -->
+ <path class="conn-dot" d="M 560 1005 L 560 970 L 1020 970 L 1020 985"/>
+ <rect class="box p-cyan" x="930" y="985" width="250" height="44" rx="6"/>
+ <text x="1055" y="1011" text-anchor="middle" class="sub">Memory + Skills attached</text>
+
+ <!-- toolbox cluster -->
+ <path class="conn-dot" d="M 480 1065 L 480 1115"/>
+ <rect class="box p-green" x="380" y="1115" width="560" height="80" rx="8"/>
+ <text x="660" y="1139" text-anchor="middle" class="h2 accent-green">Coding toolbox (8 tools)</text>
+ <text x="660" y="1161" text-anchor="middle" class="small">files &#183; fs search &#183; shell &#183; processes</text>
+ <text x="660" y="1179" text-anchor="middle" class="small">browser &#183; web search &#183; todos</text>
+
+ <text x="50" y="1225" class="sub"><tspan class="accent-green">Use when:</tspan> your AI needs to actually ship code - refactor, build, debug.</text>
+
+ <!-- Footer -->
+ <text x="620" y="1285" text-anchor="middle" class="sub">All three are real .json files in the .opencompany/workflows folder. Open them on the canvas, edit anything, save your own version.</text>
</svg>
diff --git a/docs/diagrams/execution-flow.svg b/docs/diagrams/execution-flow.svg
index 86f44632..d3ee53bb 100644
--- a/docs/diagrams/execution-flow.svg
+++ b/docs/diagrams/execution-flow.svg
@@ -1,108 +1,145 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1460 1300" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
<path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"/>
</marker>
<style>
.bg { fill: #282a36; }
- .entry { fill: #44475a; stroke: #8be9fd; stroke-width: 2.5; }
- .decision { fill: #44475a; stroke: #bd93f9; stroke-width: 2.5; }
- .path-temporal { fill: #44475a; stroke: #50fa7b; stroke-width: 2; }
- .path-redis { fill: #44475a; stroke: #8be9fd; stroke-width: 2; }
- .path-seq { fill: #44475a; stroke: #ffb86c; stroke-width: 2; }
- .shared { fill: #44475a; stroke: #f1fa8c; stroke-width: 2.5; }
- .output { fill: #44475a; stroke: #ff79c6; stroke-width: 2.5; }
- .title { fill: #f8f8f2; font-size: 16px; font-weight: 700; }
- .big { fill: #f8f8f2; font-size: 18px; font-weight: 700; }
+ .panel { fill: #44475a; stroke-width: 2; }
+ .p-cyan { stroke: #8be9fd; } .p-purple { stroke: #bd93f9; } .p-orange { stroke: #ffb86c; } .p-green { stroke: #50fa7b; } .p-pink { stroke: #ff79c6; }
+ .title { fill: #f8f8f2; font-size: 20px; font-weight: 700; }
+ .h1 { fill: #f8f8f2; font-size: 18px; font-weight: 700; }
+ .h2 { fill: #f8f8f2; font-size: 14px; font-weight: 700; }
.sub { fill: #f8f8f2; font-size: 12px; }
- .mode-label { fill: #f8f8f2; font-size: 14px; font-weight: 700; }
+ .small { fill: #f8f8f2; font-size: 10px; }
+ .label { fill: #f1fa8c; font-size: 11px; font-style: italic; }
.conn { stroke: #f8f8f2; stroke-width: 1.8; fill: none; }
- .conn-yes { stroke: #50fa7b; stroke-width: 1.8; fill: none; }
- .conn-no { stroke: #ff79c6; stroke-width: 1.8; fill: none; }
- .branch-label { fill: #f1fa8c; font-size: 12px; font-style: italic; font-weight: 700; }
- .caption { fill: #6272a4; font-size: 11px; }
+ .conn-dot { stroke: #6272a4; stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
+ .box { fill: #282a36; stroke-width: 1.5; }
+ .tier-label { fill: #6272a4; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
+ .accent-cyan { fill: #8be9fd; } .accent-purple { fill: #bd93f9; } .accent-green { fill: #50fa7b; } .accent-orange { fill: #ffb86c; } .accent-pink { fill: #ff79c6; }
</style>
</defs>
-
- <rect class="bg" width="1200" height="800"/>
-
- <!-- Entry node -->
- <rect class="entry" x="460" y="30" width="280" height="60" rx="8"/>
- <text x="600" y="58" class="title" text-anchor="middle">workflow.execute()</text>
- <text x="600" y="78" class="sub" text-anchor="middle">(WorkflowService facade)</text>
-
- <!-- Arrow to first decision -->
- <path class="conn" d="M 600 90 L 600 135" marker-end="url(#arrow)"/>
-
- <!-- First decision: Temporal? -->
- <polygon class="decision" points="600,140 780,210 600,280 420,210"/>
- <text x="600" y="200" class="big" text-anchor="middle">TEMPORAL_ENABLED</text>
- <text x="600" y="225" class="big" text-anchor="middle">and reachable?</text>
-
- <!-- Branch yes to Temporal path -->
- <path class="conn-yes" d="M 780 210 L 950 210 L 950 320" marker-end="url(#arrow)"/>
- <text x="830" y="200" class="branch-label">yes</text>
-
- <!-- Branch no to second decision -->
- <path class="conn-no" d="M 420 210 L 260 210 L 260 280" marker-end="url(#arrow)"/>
- <text x="325" y="200" class="branch-label">no</text>
-
- <!-- Second decision: Redis? -->
- <polygon class="decision" points="260,285 430,350 260,415 90,350"/>
- <text x="260" y="345" class="big" text-anchor="middle">Redis</text>
- <text x="260" y="370" class="big" text-anchor="middle">available?</text>
-
- <!-- Branch yes from second decision -->
- <path class="conn-yes" d="M 430 350 L 600 350 L 600 320" marker-end="url(#arrow)"/>
- <text x="475" y="340" class="branch-label">yes</text>
-
- <!-- Branch no from second decision -->
- <path class="conn-no" d="M 260 415 L 260 445" marker-end="url(#arrow)"/>
- <text x="200" y="440" class="branch-label">no</text>
-
- <!-- Three execution mode boxes -->
- <!-- Temporal Distributed (right) -->
- <rect class="path-temporal" x="820" y="320" width="260" height="150" rx="8"/>
- <text x="950" y="348" class="mode-label" text-anchor="middle">Temporal Distributed</text>
- <text x="950" y="372" class="sub" text-anchor="middle">per-node activities</text>
- <text x="950" y="392" class="sub" text-anchor="middle">3 retries, 10 min timeout</text>
- <text x="950" y="412" class="sub" text-anchor="middle">horizontal scaling</text>
- <text x="950" y="432" class="sub" text-anchor="middle">FIRST_COMPLETED scheduling</text>
- <text x="950" y="458" class="caption" text-anchor="middle">services/temporal/</text>
-
- <!-- Parallel Local Redis (center) -->
- <rect class="path-redis" x="470" y="320" width="260" height="150" rx="8"/>
- <text x="600" y="348" class="mode-label" text-anchor="middle">Parallel Local (Redis)</text>
- <text x="600" y="372" class="sub" text-anchor="middle">decide loop + Kahn layers</text>
- <text x="600" y="392" class="sub" text-anchor="middle">asyncio.gather() fork/join</text>
- <text x="600" y="412" class="sub" text-anchor="middle">Prefect-style input hash cache</text>
- <text x="600" y="432" class="sub" text-anchor="middle">DLQ + heartbeat recovery</text>
- <text x="600" y="458" class="caption" text-anchor="middle">services/execution/</text>
-
- <!-- Sequential fallback (left) -->
- <rect class="path-seq" x="120" y="445" width="280" height="120" rx="8"/>
- <text x="260" y="473" class="mode-label" text-anchor="middle">Sequential Fallback</text>
- <text x="260" y="497" class="sub" text-anchor="middle">simple topological walk</text>
- <text x="260" y="517" class="sub" text-anchor="middle">no cache, no retry, no DLQ</text>
- <text x="260" y="537" class="sub" text-anchor="middle">minimal environments only</text>
- <text x="260" y="558" class="caption" text-anchor="middle">_execute_sequential()</text>
-
- <!-- Converge arrows to shared node executor box -->
- <path class="conn" d="M 950 470 L 950 590 L 600 590" marker-end="url(#arrow)"/>
- <path class="conn" d="M 600 470 L 600 590" marker-end="url(#arrow)"/>
- <path class="conn" d="M 260 565 L 260 590 L 600 590" marker-end="url(#arrow)"/>
-
- <!-- Shared node handler box -->
- <rect class="shared" x="330" y="595" width="540" height="90" rx="8"/>
- <text x="600" y="625" class="title" text-anchor="middle">NodeExecutor.execute()</text>
- <text x="600" y="648" class="sub" text-anchor="middle">registry dispatch: {node_type: handler via functools.partial}</text>
- <text x="600" y="668" class="sub" text-anchor="middle">handlers/*.py -&gt; result dict -&gt; ExecutionContext</text>
-
- <!-- Arrow down to status broadcast -->
- <path class="conn" d="M 600 685 L 600 715" marker-end="url(#arrow)"/>
-
- <!-- Status broadcast -->
- <rect class="output" x="380" y="720" width="440" height="60" rx="8"/>
- <text x="600" y="745" class="title" text-anchor="middle">Status broadcast via StatusBroadcaster</text>
- <text x="600" y="765" class="sub" text-anchor="middle">node_status + node_output -&gt; Frontend WebSocket</text>
+ <rect class="bg" width="1460" height="1300"/>
+
+ <!-- Title -->
+ <text x="40" y="45" class="title">How Workflows Execute</text>
+ <text x="40" y="68" class="sub">Two entry points -&gt; WorkflowService routing -&gt; shared node dispatch</text>
+
+ <!-- Lane labels -->
+ <text x="250" y="92" class="tier-label" text-anchor="middle">CANVAS RUN PATH</text>
+ <text x="990" y="92" class="tier-label" text-anchor="middle">DEPLOYED PATH</text>
+
+ <!-- Entry box 1: Per-node Run (cyan) -->
+ <rect class="panel p-cyan" x="40" y="100" width="420" height="96" rx="8"/>
+ <text x="250" y="130" class="h1" text-anchor="middle">Per-node "Run"</text>
+ <text x="250" y="156" class="sub" text-anchor="middle">execute_node WS msg -&gt; WorkflowService.execute_node</text>
+ <text x="250" y="178" class="sub" text-anchor="middle">runs ONE node &#183; no mode routing</text>
+
+ <!-- Entry box 2: Toolbar Start (purple) -->
+ <rect class="panel p-purple" x="780" y="100" width="420" height="96" rx="8"/>
+ <text x="990" y="130" class="h1" text-anchor="middle">Toolbar "Start"</text>
+ <text x="990" y="156" class="sub" text-anchor="middle">deploy_workflow WS msg -&gt; DeploymentManager.deploy</text>
+ <text x="990" y="178" class="sub" text-anchor="middle">(button label is Start, toggles to Stop)</text>
+
+ <!-- Canvas lane: straight down to convergence -->
+ <path class="conn" d="M 250 196 L 250 1038" marker-end="url(#arrow)"/>
+ <text x="262" y="250" class="label">direct dispatch</text>
+ <text x="270" y="500" class="small" style="fill:#6272a4">canvas trigger waits use in-memory</text>
+ <text x="270" y="518" class="small" style="fill:#6272a4">event_waiter (asyncio.Future)</text>
+
+ <!-- Deployed lane -->
+ <path class="conn" d="M 990 196 L 990 238" marker-end="url(#arrow)"/>
+
+ <rect class="panel p-purple" x="775" y="240" width="430" height="90" rx="8"/>
+ <text x="990" y="266" class="h2" text-anchor="middle">Durable trigger listeners</text>
+ <text x="990" y="288" class="small" text-anchor="middle">TriggerListenerWorkflow (push) &#183; PollingTriggerWorkflow (poll)</text>
+ <text x="990" y="308" class="small" text-anchor="middle">Temporal Schedule (cron, 24h catch-up)</text>
+
+ <path class="conn" d="M 990 330 L 990 370" marker-end="url(#arrow)"/>
+ <text x="1002" y="356" class="label">on event</text>
+
+ <rect class="panel p-purple" x="775" y="372" width="430" height="90" rx="8"/>
+ <text x="990" y="398" class="h2" text-anchor="middle">dispatch.emit(event)</text>
+ <text x="990" y="420" class="small" text-anchor="middle">Temporal Visibility query: EventType=... AND Running</text>
+ <text x="990" y="440" class="small" text-anchor="middle">-&gt; Signal each matching listener</text>
+
+ <path class="conn" d="M 990 462 L 990 502" marker-end="url(#arrow)"/>
+ <text x="1002" y="488" class="label">Signal</text>
+
+ <rect class="panel p-purple" x="775" y="504" width="430" height="72" rx="8"/>
+ <text x="990" y="530" class="h2" text-anchor="middle">Per-firing child run</text>
+ <text x="990" y="552" class="small" text-anchor="middle">child MachinaWorkflow per event &#183; trigger node _pre_executed</text>
+
+ <!-- Deployed lane into router -->
+ <path class="conn" d="M 990 576 L 990 608 L 620 608 L 620 636" marker-end="url(#arrow)"/>
+
+ <!-- Router diamond 1 -->
+ <polygon class="box p-orange" points="620,638 795,700 620,762 445,700"/>
+ <text x="620" y="696" class="h2" text-anchor="middle">TEMPORAL_ENABLED</text>
+ <text x="620" y="716" class="h2" text-anchor="middle">and worker wired?</text>
+
+ <!-- D1 no -> D2 -->
+ <path class="conn" d="M 795 700 L 856 700" marker-end="url(#arrow)"/>
+ <text x="812" y="692" class="label">no</text>
+
+ <!-- D1 yes -> Temporal box -->
+ <path class="conn" d="M 620 762 L 620 788 L 520 788 L 520 828" marker-end="url(#arrow)"/>
+ <text x="630" y="782" class="label">yes</text>
+
+ <!-- Router diamond 2 -->
+ <polygon class="box p-orange" points="990,645 1120,700 990,755 860,700"/>
+ <text x="990" y="696" class="h2" text-anchor="middle">Redis</text>
+ <text x="990" y="716" class="h2" text-anchor="middle">available?</text>
+
+ <!-- D2 yes -> Parallel box -->
+ <path class="conn" d="M 990 755 L 990 788 L 935 788 L 935 828" marker-end="url(#arrow)"/>
+ <text x="1000" y="780" class="label">yes</text>
+
+ <!-- D2 no -> Sequential box -->
+ <path class="conn" d="M 1120 700 L 1290 700 L 1290 828" marker-end="url(#arrow)"/>
+ <text x="1140" y="692" class="label">no</text>
+
+ <!-- Mode box: Temporal Distributed -->
+ <rect class="panel p-orange" x="330" y="830" width="380" height="152" rx="8"/>
+ <text x="520" y="856" class="h2" text-anchor="middle">Temporal Distributed</text>
+ <text x="520" y="880" class="sub" text-anchor="middle">MachinaWorkflow orchestrator (FIRST_COMPLETED)</text>
+ <text x="520" y="900" class="sub" text-anchor="middle">per-type activities node.{type}.v{ver}</text>
+ <text x="520" y="920" class="sub" text-anchor="middle">3 retries &#183; 10 min timeout &#183; heartbeats</text>
+ <text x="520" y="940" class="sub" text-anchor="middle">per-queue TemporalWorkerPool (default on)</text>
+ <text x="520" y="964" class="small" style="fill:#6272a4" text-anchor="middle">services/temporal/</text>
+
+ <!-- Mode box: Parallel Local (Redis) -->
+ <rect class="panel p-orange" x="760" y="830" width="350" height="132" rx="8"/>
+ <text x="935" y="856" class="h2" text-anchor="middle">Parallel Local (Redis)</text>
+ <text x="935" y="880" class="sub" text-anchor="middle">decide loop + Kahn layers</text>
+ <text x="935" y="900" class="sub" text-anchor="middle">asyncio.gather() fork/join</text>
+ <text x="935" y="920" class="sub" text-anchor="middle">input-hash cache &#183; DLQ + heartbeat recovery</text>
+ <text x="935" y="944" class="small" style="fill:#6272a4" text-anchor="middle">services/execution/</text>
+
+ <!-- Mode box: Sequential Fallback -->
+ <rect class="panel p-orange" x="1160" y="830" width="260" height="112" rx="8"/>
+ <text x="1290" y="856" class="h2" text-anchor="middle">Sequential Fallback</text>
+ <text x="1290" y="880" class="sub" text-anchor="middle">topological walk</text>
+ <text x="1290" y="900" class="sub" text-anchor="middle">no cache, no retry, no DLQ</text>
+ <text x="1290" y="924" class="small" style="fill:#6272a4" text-anchor="middle">_execute_sequential()</text>
+
+ <!-- Mode boxes -> convergence -->
+ <path class="conn" d="M 520 982 L 520 1038" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 935 962 L 935 1038" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 1290 942 L 1290 1087 L 1004 1087" marker-end="url(#arrow)"/>
+
+ <!-- Convergence box -->
+ <rect class="panel p-green" x="220" y="1040" width="780" height="94" rx="8"/>
+ <text x="610" y="1070" class="h1" text-anchor="middle">NodeExecutor.execute()</text>
+ <text x="610" y="1094" class="sub" text-anchor="middle">plugin registry dispatch &#183; class-based plugins in server/nodes/&lt;group&gt;/</text>
+ <text x="610" y="1114" class="sub" text-anchor="middle">-&gt; result dict</text>
+
+ <!-- Convergence -> output -->
+ <path class="conn" d="M 610 1134 L 610 1166" marker-end="url(#arrow)"/>
+
+ <!-- Output box -->
+ <rect class="panel p-green" x="320" y="1170" width="580" height="78" rx="8"/>
+ <text x="610" y="1198" class="h1" text-anchor="middle">StatusBroadcaster</text>
+ <text x="610" y="1222" class="sub" text-anchor="middle">node_status + node_output (CloudEvents envelope) -&gt; frontend WebSocket</text>
</svg>
diff --git a/docs/diagrams/how-it-works.svg b/docs/diagrams/how-it-works.svg
index cd5183ab..5f98dfb4 100644
--- a/docs/diagrams/how-it-works.svg
+++ b/docs/diagrams/how-it-works.svg
@@ -1,194 +1,101 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1100 620" width="100%" preserveAspectRatio="xMidYMid meet" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif">
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 540" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
<defs>
- <marker id="arrow-flow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
- <path d="M0,0 L10,5 L0,10 z" fill="#6b7280"/>
+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
+ <path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"/>
</marker>
<style>
- .bg { fill: #fafafa; }
- .step-card-accent { fill: #ffffff; stroke-width: 3; rx: 12; }
- .accent-1 { stroke: #8b5cf6; }
- .accent-2 { stroke: #06b6d4; }
- .accent-3 { stroke: #10b981; }
- .accent-4 { stroke: #f59e0b; }
- .step-num { fill: #ffffff; font-size: 14px; font-weight: 700; }
- .step-num-bg-1 { fill: #8b5cf6; }
- .step-num-bg-2 { fill: #06b6d4; }
- .step-num-bg-3 { fill: #10b981; }
- .step-num-bg-4 { fill: #f59e0b; }
- .step-title { fill: #111827; font-size: 17px; font-weight: 700; }
- .step-desc { fill: #4b5563; font-size: 13px; }
- .header { fill: #111827; font-size: 22px; font-weight: 700; }
- .subheader { fill: #6b7280; font-size: 14px; }
- .footer-strip { fill: #1f2937; rx: 10; }
- .footer-text { fill: #f9fafb; font-size: 15px; font-weight: 600; }
- .footer-sub { fill: #d1d5db; font-size: 12px; }
- .flow-arrow { stroke: #9ca3af; stroke-width: 2.5; fill: none; stroke-linecap: round; }
- .node-mini { fill: #f3f4f6; stroke: #d1d5db; stroke-width: 1.5; rx: 6; }
- .node-mini-text { fill: #374151; font-size: 11px; font-weight: 600; }
- .node-trigger-mini { fill: #fef3c7; stroke: #f59e0b; }
- .node-agent-mini { fill: #ede9fe; stroke: #8b5cf6; stroke-width: 2; }
- .node-output-mini { fill: #e0f2fe; stroke: #0284c7; }
- .integration-pill { fill: #f9fafb; stroke: #e5e7eb; stroke-width: 1.5; rx: 14; }
- .integration-text { fill: #374151; font-size: 12px; font-weight: 500; }
- .badge { fill: #ede9fe; stroke: #8b5cf6; stroke-width: 1.5; rx: 6; }
- .badge-text { fill: #6d28d9; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; }
- .dashed-conn { stroke: #06b6d4; stroke-width: 1.5; stroke-dasharray: 3,2; fill: none; }
+ .bg { fill: #282a36; }
+ .panel { fill: #44475a; stroke-width: 2; }
+ .p-cyan { stroke: #8be9fd; } .p-purple { stroke: #bd93f9; } .p-orange { stroke: #ffb86c; } .p-green { stroke: #50fa7b; } .p-pink { stroke: #ff79c6; }
+ .title { fill: #f8f8f2; font-size: 20px; font-weight: 700; }
+ .h1 { fill: #f8f8f2; font-size: 18px; font-weight: 700; }
+ .h2 { fill: #f8f8f2; font-size: 14px; font-weight: 700; }
+ .sub { fill: #f8f8f2; font-size: 12px; }
+ .small { fill: #f8f8f2; font-size: 10px; }
+ .label { fill: #f1fa8c; font-size: 11px; font-style: italic; }
+ .conn { stroke: #f8f8f2; stroke-width: 1.8; fill: none; }
+ .conn-dot { stroke: #6272a4; stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
+ .box { fill: #282a36; stroke-width: 1.5; }
+ .tier-label { fill: #6272a4; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
+ .accent-cyan { fill: #8be9fd; } .accent-purple { fill: #bd93f9; } .accent-green { fill: #50fa7b; } .accent-orange { fill: #ffb86c; } .accent-pink { fill: #ff79c6; }
</style>
</defs>
-
- <rect width="1100" height="620" class="bg"/>
+ <rect class="bg" width="1800" height="540"/>
<!-- Header -->
- <text x="550" y="40" text-anchor="middle" class="header">How OpenCompany Works</text>
- <text x="550" y="62" text-anchor="middle" class="subheader">Build AI workflows visually. Connect them to your apps. Run everything on your own computer.</text>
-
- <!-- ============ STEP 1: YOU PICK NODES ============ -->
- <rect x="40" y="100" width="240" height="200" class="step-card-accent accent-1"/>
- <circle cx="68" cy="128" r="14" class="step-num-bg-1"/>
- <text x="68" y="133" text-anchor="middle" class="step-num">1</text>
- <text x="92" y="133" class="step-title">Pick from 100+ nodes</text>
-
- <rect x="60" y="155" width="200" height="22" class="node-mini"/>
- <text x="70" y="170" class="node-mini-text">🤖 AI Agent</text>
-
- <rect x="60" y="183" width="200" height="22" class="node-mini"/>
- <text x="70" y="198" class="node-mini-text">💬 Chat Trigger</text>
-
- <rect x="60" y="211" width="200" height="22" class="node-mini"/>
- <text x="70" y="226" class="node-mini-text">📱 Telegram</text>
-
- <rect x="60" y="239" width="200" height="22" class="node-mini"/>
- <text x="70" y="254" class="node-mini-text">📧 Gmail</text>
-
- <rect x="60" y="267" width="200" height="22" class="node-mini"/>
- <text x="70" y="282" class="node-mini-text">+ many more...</text>
-
- <!-- Arrow 1 → 2 -->
- <path d="M 290 200 L 360 200" class="flow-arrow" marker-end="url(#arrow-flow)"/>
-
- <!-- ============ STEP 2: DRAG & CONNECT ============ -->
- <rect x="370" y="100" width="360" height="200" class="step-card-accent accent-2"/>
- <circle cx="398" cy="128" r="14" class="step-num-bg-2"/>
- <text x="398" y="133" text-anchor="middle" class="step-num">2</text>
- <text x="422" y="133" class="step-title">Drag and connect them</text>
-
- <!-- Mini canvas — matches the actual default-workflow shape: trigger → agent → reply -->
- <rect x="390" y="160" width="92" height="42" class="node-mini node-trigger-mini" rx="8"/>
- <text x="436" y="178" text-anchor="middle" class="node-mini-text">💬 Chat</text>
- <text x="436" y="194" text-anchor="middle" class="node-mini-text" style="font-size: 9px; fill: #6b7280;">trigger</text>
-
- <rect x="515" y="160" width="100" height="42" class="node-mini node-agent-mini" rx="8"/>
- <text x="565" y="178" text-anchor="middle" class="node-mini-text">🤖 AI Agent</text>
- <text x="565" y="194" text-anchor="middle" class="node-mini-text" style="font-size: 9px; fill: #6b7280;">thinks + acts</text>
-
- <rect x="648" y="160" width="72" height="42" class="node-mini node-output-mini" rx="8"/>
- <text x="684" y="178" text-anchor="middle" class="node-mini-text">📤 Reply</text>
- <text x="684" y="194" text-anchor="middle" class="node-mini-text" style="font-size: 9px; fill: #6b7280;">output</text>
-
- <path d="M 482 181 L 515 181" class="flow-arrow" marker-end="url(#arrow-flow)"/>
- <path d="M 615 181 L 648 181" class="flow-arrow" marker-end="url(#arrow-flow)"/>
-
- <!-- Memory + Skills + Tool attached underneath the agent (matches default workflow shape) -->
- <rect x="430" y="220" width="80" height="22" class="node-mini" rx="6" style="fill: #f0fdfa; stroke: #06b6d4;"/>
- <text x="470" y="235" text-anchor="middle" class="node-mini-text" style="fill: #0e7490;">🧠 Memory</text>
-
- <rect x="520" y="220" width="80" height="22" class="node-mini" rx="6" style="fill: #f0fdfa; stroke: #06b6d4;"/>
- <text x="560" y="235" text-anchor="middle" class="node-mini-text" style="fill: #0e7490;">📚 Skill</text>
-
- <rect x="610" y="220" width="80" height="22" class="node-mini" rx="6" style="fill: #f0fdfa; stroke: #06b6d4;"/>
- <text x="650" y="235" text-anchor="middle" class="node-mini-text" style="fill: #0e7490;">🔧 Tool</text>
-
- <path d="M 545 202 L 470 220" class="dashed-conn"/>
- <path d="M 565 202 L 560 220" class="dashed-conn"/>
- <path d="M 590 202 L 650 220" class="dashed-conn"/>
-
- <text x="550" y="265" text-anchor="middle" class="step-desc">Memory remembers · Skills teach · Tools extend</text>
- <text x="550" y="285" text-anchor="middle" class="step-desc" style="font-style: italic; fill: #6b7280;">This is the shape of every default workflow.</text>
-
- <!-- Arrow 2 → 3 -->
- <path d="M 740 200 L 810 200" class="flow-arrow" marker-end="url(#arrow-flow)"/>
-
- <!-- ============ STEP 3: AI RUNS IT ============ -->
- <rect x="820" y="100" width="240" height="200" class="step-card-accent accent-3"/>
- <circle cx="848" cy="128" r="14" class="step-num-bg-3"/>
- <text x="848" y="133" text-anchor="middle" class="step-num">3</text>
- <text x="872" y="133" class="step-title">AI runs it for you</text>
-
- <text x="940" y="170" text-anchor="middle" class="step-desc">Click Play, or...</text>
-
- <rect x="850" y="185" width="180" height="30" class="badge"/>
- <text x="940" y="204" text-anchor="middle" class="badge-text">DEPLOY ON A SCHEDULE</text>
-
- <rect x="850" y="223" width="180" height="30" class="badge"/>
- <text x="940" y="242" text-anchor="middle" class="badge-text">TRIGGER ON AN EVENT</text>
-
- <rect x="850" y="261" width="180" height="30" class="badge"/>
- <text x="940" y="280" text-anchor="middle" class="badge-text">RESPOND IN REAL TIME</text>
-
- <!-- ============ STEP 4: CONNECTED APPS ============ -->
- <rect x="40" y="340" width="1020" height="180" class="step-card-accent accent-4"/>
- <circle cx="68" cy="368" r="14" class="step-num-bg-4"/>
- <text x="68" y="373" text-anchor="middle" class="step-num">4</text>
- <text x="92" y="373" class="step-title">Connect to the apps you already use</text>
-
- <!-- Row 1 of pills -->
- <rect x="60" y="395" width="90" height="28" class="integration-pill"/>
- <text x="105" y="414" text-anchor="middle" class="integration-text">📧 Gmail</text>
-
- <rect x="160" y="395" width="100" height="28" class="integration-pill"/>
- <text x="210" y="414" text-anchor="middle" class="integration-text">📅 Calendar</text>
-
- <rect x="270" y="395" width="80" height="28" class="integration-pill"/>
- <text x="310" y="414" text-anchor="middle" class="integration-text">📁 Drive</text>
-
- <rect x="360" y="395" width="90" height="28" class="integration-pill"/>
- <text x="405" y="414" text-anchor="middle" class="integration-text">📊 Sheets</text>
-
- <rect x="460" y="395" width="110" height="28" class="integration-pill"/>
- <text x="515" y="414" text-anchor="middle" class="integration-text">📱 WhatsApp</text>
-
- <rect x="580" y="395" width="100" height="28" class="integration-pill"/>
- <text x="630" y="414" text-anchor="middle" class="integration-text">💬 Telegram</text>
-
- <rect x="690" y="395" width="100" height="28" class="integration-pill"/>
- <text x="740" y="414" text-anchor="middle" class="integration-text">𝕏 Twitter</text>
-
- <rect x="800" y="395" width="110" height="28" class="integration-pill"/>
- <text x="855" y="414" text-anchor="middle" class="integration-text">📞 Your Phone</text>
-
- <rect x="920" y="395" width="120" height="28" class="integration-pill"/>
- <text x="980" y="414" text-anchor="middle" class="integration-text">💳 Stripe</text>
-
- <!-- Row 2 of pills -->
- <rect x="60" y="430" width="120" height="28" class="integration-pill"/>
- <text x="120" y="449" text-anchor="middle" class="integration-text">🌐 Web Browser</text>
-
- <rect x="190" y="430" width="120" height="28" class="integration-pill"/>
- <text x="250" y="449" text-anchor="middle" class="integration-text">🔍 Web Search</text>
-
- <rect x="320" y="430" width="130" height="28" class="integration-pill"/>
- <text x="385" y="449" text-anchor="middle" class="integration-text">🕷 Web Scraping</text>
-
- <rect x="460" y="430" width="110" height="28" class="integration-pill"/>
- <text x="515" y="449" text-anchor="middle" class="integration-text">📄 PDF / Docs</text>
-
- <rect x="580" y="430" width="100" height="28" class="integration-pill"/>
- <text x="630" y="449" text-anchor="middle" class="integration-text">💻 Python</text>
-
- <rect x="690" y="430" width="120" height="28" class="integration-pill"/>
- <text x="750" y="449" text-anchor="middle" class="integration-text">⚡ JavaScript</text>
-
- <rect x="820" y="430" width="80" height="28" class="integration-pill"/>
- <text x="860" y="449" text-anchor="middle" class="integration-text">📨 Email</text>
-
- <rect x="910" y="430" width="130" height="28" class="integration-pill"/>
- <text x="975" y="449" text-anchor="middle" class="integration-text">⏰ Cron / Timers</text>
-
- <text x="550" y="490" text-anchor="middle" class="step-desc">+ residential proxies, Apify scrapers, Maps, document RAG, and more</text>
-
- <!-- ============ FOOTER STRIP ============ -->
- <rect x="40" y="540" width="1020" height="60" class="footer-strip"/>
- <text x="550" y="568" text-anchor="middle" class="footer-text">🏠 Everything runs on your computer</text>
- <text x="550" y="588" text-anchor="middle" class="footer-sub">Your API keys, your data, your conversations — never sent to OpenCompany servers. Free local AI via Ollama and LM Studio.</text>
-
+ <text class="title" x="900" y="46" text-anchor="middle">How OpenCompany Works</text>
+ <text class="sub" x="900" y="74" text-anchor="middle">Build AI workflows visually, connect them to your apps, run everything on your own computer.</text>
+
+ <!-- Step 1: Pick your blocks -->
+ <rect class="panel p-purple" x="43" y="110" width="266" height="140" rx="10"/>
+ <circle class="accent-purple" cx="176" cy="142" r="15"/>
+ <text x="176" y="148" text-anchor="middle" font-size="16" font-weight="700" fill="#282a36">1</text>
+ <text class="h2" x="176" y="172" text-anchor="middle">Pick your blocks</text>
+ <text class="sub" x="176" y="196" text-anchor="middle">Drag nodes from the palette -</text>
+ <text class="sub" x="176" y="214" text-anchor="middle">100+ blocks: AI Agent, Chat,</text>
+ <text class="sub" x="176" y="232" text-anchor="middle">Telegram, Gmail, and more</text>
+
+ <!-- Arrow 1 -> 2 -->
+ <text class="label" x="357" y="173" text-anchor="middle">drag</text>
+ <path class="conn" d="M 313 185 L 399 185" marker-end="url(#arrow)"/>
+
+ <!-- Step 2: Connect them -->
+ <rect class="panel p-purple" x="405" y="110" width="266" height="140" rx="10"/>
+ <circle class="accent-purple" cx="538" cy="142" r="15"/>
+ <text x="538" y="148" text-anchor="middle" font-size="16" font-weight="700" fill="#282a36">2</text>
+ <text class="h2" x="538" y="172" text-anchor="middle">Connect them</text>
+ <text class="sub" x="538" y="196" text-anchor="middle">Wire trigger &#8594; AI Agent &#8594; reply.</text>
+ <text class="sub" x="538" y="214" text-anchor="middle">Attach Memory, Skills, and</text>
+ <text class="sub" x="538" y="232" text-anchor="middle">Tools to the agent</text>
+
+ <!-- Arrow 2 -> 3 -->
+ <text class="label" x="719" y="173" text-anchor="middle">wire</text>
+ <path class="conn" d="M 675 185 L 761 185" marker-end="url(#arrow)"/>
+
+ <!-- Step 3: Add your keys -->
+ <rect class="panel p-purple" x="767" y="110" width="266" height="140" rx="10"/>
+ <circle class="accent-purple" cx="900" cy="142" r="15"/>
+ <text x="900" y="148" text-anchor="middle" font-size="16" font-weight="700" fill="#282a36">3</text>
+ <text class="h2" x="900" y="172" text-anchor="middle">Add your keys</text>
+ <text class="sub" x="900" y="196" text-anchor="middle">Open API Credentials, paste a</text>
+ <text class="sub" x="900" y="214" text-anchor="middle">provider key, pick a model</text>
+ <text class="sub" x="900" y="232" text-anchor="middle">(or run one locally, free)</text>
+
+ <!-- Arrow 3 -> 4 -->
+ <text class="label" x="1081" y="173" text-anchor="middle">configure</text>
+ <path class="conn" d="M 1037 185 L 1123 185" marker-end="url(#arrow)"/>
+
+ <!-- Step 4: Test it, then start it -->
+ <rect class="panel p-purple" x="1129" y="110" width="266" height="140" rx="10"/>
+ <circle class="accent-purple" cx="1262" cy="142" r="15"/>
+ <text x="1262" y="148" text-anchor="middle" font-size="16" font-weight="700" fill="#282a36">4</text>
+ <text class="h2" x="1262" y="172" text-anchor="middle">Test it, then start it</text>
+ <text class="sub" x="1262" y="196" text-anchor="middle">Run tests one node in place.</text>
+ <text class="sub" x="1262" y="214" text-anchor="middle">Start deploys the whole workflow</text>
+ <text class="sub" x="1262" y="232" text-anchor="middle">(the button flips to Stop)</text>
+ <text class="label" x="1262" y="272" text-anchor="middle">runs on a schedule, on an event, or in real time</text>
+
+ <!-- Arrow 4 -> 5 -->
+ <text class="label" x="1443" y="173" text-anchor="middle">Run or Start</text>
+ <path class="conn" d="M 1399 185 L 1485 185" marker-end="url(#arrow)"/>
+
+ <!-- Step 5: Watch it work -->
+ <rect class="panel p-purple" x="1491" y="110" width="266" height="140" rx="10"/>
+ <circle class="accent-purple" cx="1624" cy="142" r="15"/>
+ <text x="1624" y="148" text-anchor="middle" font-size="16" font-weight="700" fill="#282a36">5</text>
+ <text class="h2" x="1624" y="172" text-anchor="middle">Watch it work</text>
+ <text class="sub" x="1624" y="196" text-anchor="middle">Answers appear in the Chat /</text>
+ <text class="sub" x="1624" y="214" text-anchor="middle">Console panel at the bottom</text>
+ <text class="sub" x="1624" y="232" text-anchor="middle">of the screen</text>
+
+ <!-- Value band 1: integrations -->
+ <rect class="panel p-green" x="43" y="304" width="1714" height="78" rx="10"/>
+ <text class="h1" x="900" y="336" text-anchor="middle">Connect the apps you already use</text>
+ <text class="sub" x="900" y="364" text-anchor="middle">Gmail &#183; Calendar &#183; Drive &#183; Sheets &#183; Telegram &#183; WhatsApp &#183; Twitter/X &#183; web browser &#183; web search &#183; Python &#183; JavaScript &#183; Maps + more</text>
+
+ <!-- Value band 2: local-first -->
+ <rect class="panel p-cyan" x="43" y="407" width="1714" height="92" rx="10"/>
+ <text class="h1" x="900" y="437" text-anchor="middle">Everything runs on your computer</text>
+ <text class="sub" x="900" y="463" text-anchor="middle">Your API keys, your data, your conversations - never sent to OpenCompany servers.</text>
+ <text class="sub" x="900" y="485" text-anchor="middle">Free local AI via Ollama and LM Studio.</text>
</svg>
diff --git a/docs/diagrams/node-anatomy.svg b/docs/diagrams/node-anatomy.svg
index 8c383bb4..c3466b2a 100644
--- a/docs/diagrams/node-anatomy.svg
+++ b/docs/diagrams/node-anatomy.svg
@@ -1,138 +1,119 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1400 800" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1760 800" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
<path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"/>
</marker>
<style>
.bg { fill: #282a36; }
- .col-header { fill: #6272a4; font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }
- .col-sub { fill: #6272a4; font-size: 11px; }
- .fe-box { fill: #44475a; stroke: #8be9fd; stroke-width: 2; }
- .be-box { fill: #44475a; stroke: #bd93f9; stroke-width: 2; }
- .comm-box { fill: #44475a; stroke: #f1fa8c; stroke-width: 2; }
- .ai-box { fill: #44475a; stroke: #50fa7b; stroke-width: 2; }
- .title { fill: #f8f8f2; font-size: 14px; font-weight: 700; }
- .path { fill: #8be9fd; font-size: 11px; font-family: ui-monospace, monospace; }
- .path-be { fill: #bd93f9; font-size: 11px; font-family: ui-monospace, monospace; }
- .sub { fill: #f8f8f2; font-size: 11px; }
- .conn { stroke: #f8f8f2; stroke-width: 1.8; fill: none; }
+ .panel { fill: #44475a; stroke-width: 2; }
+ .p-cyan { stroke: #8be9fd; } .p-purple { stroke: #bd93f9; } .p-orange { stroke: #ffb86c; } .p-green { stroke: #50fa7b; } .p-pink { stroke: #ff79c6; }
+ .title { fill: #f8f8f2; font-size: 20px; font-weight: 700; }
+ .h1 { fill: #f8f8f2; font-size: 18px; font-weight: 700; }
+ .h2 { fill: #f8f8f2; font-size: 14px; font-weight: 700; }
+ .sub { fill: #f8f8f2; font-size: 12px; }
+ .small { fill: #f8f8f2; font-size: 10px; }
.label { fill: #f1fa8c; font-size: 11px; font-style: italic; }
- .step { fill: #ffb86c; font-size: 12px; font-weight: 700; }
+ .conn { stroke: #f8f8f2; stroke-width: 1.8; fill: none; }
+ .conn-dot { stroke: #6272a4; stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
+ .box { fill: #282a36; stroke-width: 1.5; }
+ .tier-label { fill: #6272a4; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
+ .accent-cyan { fill: #8be9fd; } .accent-purple { fill: #bd93f9; } .accent-green { fill: #50fa7b; } .accent-orange { fill: #ffb86c; } .accent-pink { fill: #ff79c6; }
</style>
</defs>
-
- <rect class="bg" width="1400" height="800"/>
+ <rect class="bg" width="1760" height="800"/>
<!-- Title -->
- <text x="700" y="35" class="title" text-anchor="middle" font-size="20">Anatomy of a Workflow Node</text>
- <text x="700" y="58" class="col-sub" text-anchor="middle" font-size="12">Where to touch code when adding a new node</text>
-
- <!-- Column headers -->
- <text x="230" y="100" class="col-header" text-anchor="middle">Frontend (client/)</text>
- <text x="230" y="118" class="col-sub" text-anchor="middle">TypeScript + React</text>
-
- <text x="700" y="100" class="col-header" text-anchor="middle">Communication</text>
- <text x="700" y="118" class="col-sub" text-anchor="middle">WebSocket</text>
-
- <text x="1170" y="100" class="col-header" text-anchor="middle">Backend (server/)</text>
- <text x="1170" y="118" class="col-sub" text-anchor="middle">Python + FastAPI</text>
-
- <!-- Frontend column boxes -->
- <!-- 1. Node definition -->
- <rect class="fe-box" x="50" y="145" width="360" height="85" rx="8"/>
- <text x="70" y="170" class="title">1. Node definition</text>
- <text x="70" y="190" class="path">server/nodes/&lt;category&gt;/&lt;node&gt;.py</text>
- <text x="70" y="210" class="sub">INodeProperties: displayName, group, inputs,</text>
- <text x="70" y="224" class="sub">outputs, properties[], displayOptions.show</text>
-
- <!-- 2. Parameter renderer -->
- <rect class="fe-box" x="50" y="255" width="360" height="85" rx="8"/>
- <text x="70" y="280" class="title">2. Parameter panel</text>
- <text x="70" y="300" class="path">client/src/components/ParameterRenderer.tsx</text>
- <text x="70" y="320" class="sub">Renders parameters, conditional display,</text>
- <text x="70" y="334" class="sub">drag-and-drop template variables</text>
-
- <!-- 3. Canvas / execution -->
- <rect class="fe-box" x="50" y="365" width="360" height="85" rx="8"/>
- <text x="70" y="390" class="title">3. Canvas &amp; Run button</text>
- <text x="70" y="410" class="path">client/src/Dashboard.tsx</text>
- <text x="70" y="430" class="sub">React Flow canvas, useExecution hook,</text>
- <text x="70" y="444" class="sub">sends execute_node via WebSocket</text>
-
- <!-- 4. Registry/credentials -->
- <rect class="fe-box" x="50" y="475" width="360" height="85" rx="8"/>
- <text x="70" y="500" class="title">4. Credentials (if needed)</text>
- <text x="70" y="520" class="path">client/src/components/CredentialsModal.tsx</text>
- <text x="70" y="540" class="sub">API key entry + OAuth flows</text>
- <text x="70" y="554" class="sub">via useApiKeys hook</text>
-
- <!-- Communication column -->
- <rect class="comm-box" x="530" y="255" width="340" height="250" rx="8"/>
- <text x="700" y="290" class="title" text-anchor="middle">WebSocket /ws/status</text>
- <text x="700" y="315" class="sub" text-anchor="middle">Single persistent connection</text>
- <text x="700" y="335" class="sub" text-anchor="middle">between UI and backend</text>
-
- <!-- Message type arrows -->
- <text x="700" y="375" class="label" text-anchor="middle">execute_node</text>
- <path class="conn" d="M 570 385 L 830 385" marker-end="url(#arrow)"/>
-
- <text x="700" y="420" class="label" text-anchor="middle">node_status</text>
- <path class="conn" d="M 830 430 L 570 430" marker-end="url(#arrow)"/>
-
- <text x="700" y="465" class="label" text-anchor="middle">node_output</text>
- <path class="conn" d="M 830 475 L 570 475" marker-end="url(#arrow)"/>
-
- <text x="700" y="495" class="sub" text-anchor="middle" fill="#6272a4" font-size="10">89 handler message types</text>
-
- <!-- Arrows from frontend column into comm column -->
- <path class="conn" d="M 410 405 L 530 385" marker-end="url(#arrow)"/>
-
- <!-- Backend column boxes -->
- <!-- A. Router / dispatch -->
- <rect class="be-box" x="990" y="145" width="360" height="85" rx="8"/>
- <text x="1010" y="170" class="title">A. Router / dispatch</text>
- <text x="1010" y="190" class="path-be">server/routers/websocket.py</text>
- <text x="1010" y="210" class="sub">@ws_handler decorators, dispatches</text>
- <text x="1010" y="224" class="sub">incoming messages to handlers</text>
-
- <!-- B. Node executor registry -->
- <rect class="be-box" x="990" y="255" width="360" height="85" rx="8"/>
- <text x="1010" y="280" class="title">B. Registry dispatch</text>
- <text x="1010" y="300" class="path-be">server/services/node_executor.py</text>
- <text x="1010" y="320" class="sub">Dict[node_type, handler] via</text>
- <text x="1010" y="334" class="sub">functools.partial dependency injection</text>
-
- <!-- C. Handler -->
- <rect class="be-box" x="990" y="365" width="360" height="85" rx="8"/>
- <text x="1010" y="390" class="title">C. Business logic</text>
- <text x="1010" y="410" class="path-be">server/services/handlers/&lt;name&gt;.py</text>
- <text x="1010" y="430" class="sub">handle_&lt;name&gt;(node_id, parameters,</text>
- <text x="1010" y="444" class="sub">context, ...) -&gt; result dict</text>
-
- <!-- D. AI service (optional) -->
- <rect class="ai-box" x="990" y="475" width="360" height="85" rx="8"/>
- <text x="1010" y="500" class="title">D. AI layer (for AI nodes)</text>
- <text x="1010" y="520" class="path-be">server/services/ai.py + llm/</text>
- <text x="1010" y="540" class="sub">Native SDK path or LangChain agent loop</text>
- <text x="1010" y="554" class="sub">with tool calling</text>
-
- <!-- Arrows inside backend column (vertical flow) -->
- <path class="conn" d="M 1170 230 L 1170 255" marker-end="url(#arrow)"/>
- <path class="conn" d="M 1170 340 L 1170 365" marker-end="url(#arrow)"/>
- <path class="conn" d="M 1170 450 L 1170 475" marker-end="url(#arrow)"/>
-
- <!-- Arrow from comm column into backend -->
- <path class="conn" d="M 870 385 L 990 185" marker-end="url(#arrow)"/>
-
- <!-- Registration step note -->
- <rect class="be-box" x="450" y="590" width="520" height="80" rx="8" fill="#282a36" stroke="#ff79c6"/>
- <text x="710" y="615" class="title" text-anchor="middle" fill="#ff79c6">Register the handler</text>
- <text x="710" y="635" class="sub" text-anchor="middle">Add entry to registry dict in services/node_executor.py:</text>
- <text x="710" y="655" class="path-be" text-anchor="middle">registry['yourNode'] = partial(handle_your_node, database=self.database)</text>
-
- <!-- Flow legend -->
- <text x="50" y="710" class="step">Contribution checklist</text>
- <text x="50" y="732" class="sub">1. Define node in TypeScript (left col) -&gt; 2. Write handler in Python (right col)</text>
- <text x="50" y="750" class="sub">3. Register in node_executor.py -&gt; 4. Restart dev server -&gt; Node appears in palette</text>
- <text x="50" y="770" class="sub" fill="#6272a4">Full step-by-step guide: docs-internal/node_creation.md</text>
+ <text x="880" y="42" class="title" text-anchor="middle">Anatomy of a Plugin Node</text>
+ <text x="880" y="68" class="sub" text-anchor="middle">One Python folder = one node. Backend is the single source of truth - the frontend renders itself with zero TypeScript edits.</text>
+
+ <!-- ================= GROUP 1 (cyan): What you write ================= -->
+ <rect class="panel p-cyan" x="40" y="100" width="460" height="545" rx="10"/>
+ <text x="270" y="130" class="h1" text-anchor="middle">What you write</text>
+ <text x="270" y="150" class="accent-cyan" font-size="12" text-anchor="middle">server/nodes/&lt;group&gt;/&lt;plugin&gt;/</text>
+
+ <rect class="box p-cyan" x="60" y="168" width="420" height="78" rx="6"/>
+ <text x="270" y="190" class="h2" text-anchor="middle">__init__.py - the node class</text>
+ <text x="270" y="210" class="sub" text-anchor="middle">class MyNode(ActionNode / TriggerNode / ToolNode)</text>
+ <text x="270" y="228" class="small" text-anchor="middle">type, display_name, group, handles, credentials, task_queue</text>
+
+ <rect class="box p-cyan" x="60" y="264" width="420" height="78" rx="6"/>
+ <text x="270" y="286" class="h2" text-anchor="middle">Params / Output (Pydantic)</text>
+ <text x="270" y="306" class="sub" text-anchor="middle">snake_case fields = UI params = LLM tool schema</text>
+ <text x="270" y="324" class="small" text-anchor="middle">Output validated at the serialization boundary</text>
+
+ <rect class="box p-cyan" x="60" y="360" width="420" height="78" rx="6"/>
+ <text x="270" y="382" class="h2" text-anchor="middle">@Operation methods</text>
+ <text x="270" y="402" class="sub" text-anchor="middle">async def op(self, ctx, params) -&gt; Output</text>
+ <text x="270" y="420" class="small" text-anchor="middle">the business logic lives here</text>
+
+ <rect class="box p-cyan" x="60" y="456" width="420" height="78" rx="6"/>
+ <text x="270" y="478" class="h2" text-anchor="middle">icon.svg + meta.json</text>
+ <text x="270" y="498" class="sub" text-anchor="middle">co-located icon + {"color": "#..."}</text>
+ <text x="270" y="516" class="small" text-anchor="middle">icon/color are NOT class attributes</text>
+
+ <rect class="box p-cyan" x="60" y="552" width="420" height="78" rx="6"/>
+ <text x="270" y="574" class="h2" text-anchor="middle">Optional siblings (rich plugins)</text>
+ <text x="270" y="594" class="sub" text-anchor="middle">_service.py / _handlers.py / _credentials.py</text>
+ <text x="270" y="612" class="small" text-anchor="middle">for bots, daemons, signed webhooks</text>
+
+ <!-- ================= GROUP 2 (purple): Auto-registration ================= -->
+ <rect class="panel p-purple" x="650" y="100" width="460" height="449" rx="10"/>
+ <text x="880" y="130" class="h1" text-anchor="middle">Auto-registration on import</text>
+
+ <rect class="box p-purple" x="670" y="168" width="420" height="78" rx="6"/>
+ <text x="880" y="190" class="h2" text-anchor="middle">__init_subclass__ fires</text>
+ <text x="880" y="210" class="sub" text-anchor="middle">nodes/__init__.py pkgutil walker imports every plugin</text>
+ <text x="880" y="228" class="small" text-anchor="middle">no manual registry edit, no node_executor.py</text>
+
+ <rect class="box p-purple" x="670" y="264" width="420" height="78" rx="6"/>
+ <text x="880" y="286" class="h2" text-anchor="middle">5 registries populated</text>
+ <text x="880" y="306" class="sub" text-anchor="middle">_NODE_CLASS_REGISTRY &#183; NODE_METADATA &#183; _DIRECT_MODELS</text>
+ <text x="880" y="324" class="small" text-anchor="middle">NODE_OUTPUT_SCHEMAS &#183; _HANDLER_REGISTRY</text>
+
+ <rect class="box p-purple" x="670" y="360" width="420" height="78" rx="6"/>
+ <text x="880" y="382" class="h2" text-anchor="middle">Temporal activity minted</text>
+ <text x="880" y="402" class="sub" text-anchor="middle">cls.as_activity() -&gt; node.{type}.v{version}</text>
+ <text x="880" y="420" class="small" text-anchor="middle">routed to its task_queue worker pool</text>
+
+ <rect class="box p-purple" x="670" y="456" width="420" height="78" rx="6"/>
+ <text x="880" y="478" class="h2" text-anchor="middle">6 self-registration hooks (rich plugins)</text>
+ <text x="880" y="498" class="sub" text-anchor="middle">ws_handlers &#183; router &#183; filter_builder</text>
+ <text x="880" y="516" class="small" text-anchor="middle">trigger_precheck &#183; service_refresh &#183; output_schema</text>
+
+ <!-- ================= GROUP 3 (green): What the frontend sees ================= -->
+ <rect class="panel p-green" x="1260" y="100" width="460" height="353" rx="10"/>
+ <text x="1490" y="130" class="h1" text-anchor="middle">What the frontend sees</text>
+ <text x="1490" y="150" class="accent-green" font-size="12" text-anchor="middle">zero TS edits</text>
+
+ <rect class="box p-green" x="1280" y="168" width="420" height="78" rx="6"/>
+ <text x="1490" y="190" class="h2" text-anchor="middle">NodeSpec endpoint</text>
+ <text x="1490" y="210" class="sub" text-anchor="middle">GET /api/schemas/nodes/{type}/spec.json</text>
+ <text x="1490" y="228" class="small" text-anchor="middle">display meta + params + output schema</text>
+
+ <rect class="box p-green" x="1280" y="264" width="420" height="78" rx="6"/>
+ <text x="1490" y="286" class="h2" text-anchor="middle">useNodeSpec renders it</text>
+ <text x="1490" y="306" class="sub" text-anchor="middle">nodeSpecToDescription adapter builds the param panel,</text>
+ <text x="1490" y="324" class="small" text-anchor="middle">palette entry, and canvas handles - no client edits</text>
+
+ <rect class="box p-green" x="1280" y="360" width="420" height="78" rx="6"/>
+ <text x="1490" y="382" class="h2" text-anchor="middle">Credentials modal</text>
+ <text x="1490" y="402" class="sub" text-anchor="middle">declare a Credential subclass;</text>
+ <text x="1490" y="420" class="small" text-anchor="middle">modal renders from credential_providers.json</text>
+
+ <!-- ================= Arrows between groups ================= -->
+ <text x="575" y="292" class="label" text-anchor="middle">import re-registers</text>
+ <text x="575" y="307" class="label" text-anchor="middle">everything on</text>
+ <text x="575" y="322" class="label" text-anchor="middle">server restart</text>
+ <path class="conn" d="M 502 340 L 646 340" marker-end="url(#arrow)"/>
+
+ <text x="1185" y="270" class="label" text-anchor="middle">served over HTTP</text>
+ <text x="1185" y="285" class="label" text-anchor="middle">as NodeSpec</text>
+ <path class="conn" d="M 1112 300 L 1256 300" marker-end="url(#arrow)"/>
+
+ <!-- ================= Banner ================= -->
+ <rect class="panel p-pink" x="40" y="675" width="1680" height="58" rx="10"/>
+ <text x="880" y="711" class="accent-pink" font-size="18" font-weight="700" text-anchor="middle">No TypeScript node definition &#183; No node_executor.py registry entry &#183; No frontend edits</text>
+
+ <!-- ================= Footnote ================= -->
+ <text x="880" y="763" class="label" text-anchor="middle">Edge case: if tool_name != snake_case(type) and the plugin ships a paired skill, add a visuals.json alias (icon + color) - locked by tests/test_skill_icon_resolution.py</text>
</svg>
diff --git a/docs/diagrams/system-overview.svg b/docs/diagrams/system-overview.svg
index 5a8f562d..9fea8536 100644
--- a/docs/diagrams/system-overview.svg
+++ b/docs/diagrams/system-overview.svg
@@ -1,4 +1,4 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 720" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1080" width="100%" preserveAspectRatio="xMidYMid meet" font-family="ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace">
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
<path d="M0,0 L10,5 L0,10 z" fill="#f8f8f2"/>
@@ -6,124 +6,153 @@
<style>
.bg { fill: #282a36; }
.panel { fill: #44475a; stroke-width: 2; }
- .panel-frontend { stroke: #8be9fd; }
- .panel-backend { stroke: #bd93f9; }
- .panel-exec { stroke: #ffb86c; }
- .panel-ext { stroke: #50fa7b; }
- .title { fill: #f8f8f2; font-size: 18px; font-weight: 700; }
+ .p-cyan { stroke: #8be9fd; } .p-purple { stroke: #bd93f9; } .p-orange { stroke: #ffb86c; } .p-green { stroke: #50fa7b; } .p-pink { stroke: #ff79c6; }
+ .title { fill: #f8f8f2; font-size: 20px; font-weight: 700; }
+ .h1 { fill: #f8f8f2; font-size: 18px; font-weight: 700; }
+ .h2 { fill: #f8f8f2; font-size: 14px; font-weight: 700; }
.sub { fill: #f8f8f2; font-size: 12px; }
+ .small { fill: #f8f8f2; font-size: 10px; }
.label { fill: #f1fa8c; font-size: 11px; font-style: italic; }
.conn { stroke: #f8f8f2; stroke-width: 1.8; fill: none; }
- .small-box { fill: #282a36; stroke-width: 1.5; }
- .small-exec { stroke: #ffb86c; }
- .small-ext { stroke: #50fa7b; }
+ .conn-dot { stroke: #6272a4; stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
+ .box { fill: #282a36; stroke-width: 1.5; }
.tier-label { fill: #6272a4; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
+ .accent-cyan { fill: #8be9fd; } .accent-purple { fill: #bd93f9; } .accent-green { fill: #50fa7b; } .accent-orange { fill: #ffb86c; } .accent-pink { fill: #ff79c6; }
</style>
</defs>
-
- <rect class="bg" width="1200" height="720"/>
-
- <!-- Tier label: Frontend -->
- <text x="40" y="55" class="tier-label">Tier 1</text>
- <!-- Frontend panel -->
- <rect class="panel panel-frontend" x="40" y="70" width="760" height="110" rx="8"/>
- <text x="60" y="100" class="title">Frontend (client/)</text>
- <text x="60" y="128" class="sub">React + TypeScript + React Flow + Zustand + Ant Design</text>
- <text x="60" y="148" class="sub">Dracula-themed canvas, parameter panel, credentials modal</text>
- <text x="60" y="168" class="sub">96 workflow nodes rendered via INodeProperties interface</text>
-
- <!-- Arrow Frontend -> Backend -->
- <path class="conn" d="M 420 180 L 420 240" marker-end="url(#arrow)"/>
- <path class="conn" d="M 420 240 L 420 180" marker-end="url(#arrow)"/>
- <text x="435" y="215" class="label">WebSocket /ws/status</text>
-
- <!-- Tier label: Backend -->
- <text x="40" y="260" class="tier-label">Tier 2</text>
- <!-- Backend panel -->
- <rect class="panel panel-backend" x="40" y="275" width="760" height="130" rx="8"/>
- <text x="60" y="305" class="title">Backend (server/)</text>
- <text x="60" y="333" class="sub">FastAPI + 89 WebSocket handlers + dependency injection container</text>
- <text x="60" y="353" class="sub">WorkflowService (facade) -&gt; NodeExecutor -&gt; per-node handlers</text>
- <text x="60" y="373" class="sub">ParameterResolver -&gt; template {{node.field}} substitution</text>
- <text x="60" y="393" class="sub">AuthService -&gt; encrypted credentials (Fernet + PBKDF2)</text>
-
- <!-- Arrow Backend -> Execution -->
- <path class="conn" d="M 420 405 L 420 465" marker-end="url(#arrow)"/>
- <text x="435" y="440" class="label">async handlers</text>
-
- <!-- Tier label: Execution -->
- <text x="40" y="485" class="tier-label">Tier 3</text>
- <!-- Execution tier panel -->
- <rect class="panel panel-exec" x="40" y="500" width="760" height="180" rx="8"/>
- <text x="60" y="530" class="title">Execution tier</text>
-
- <!-- Sub-boxes inside execution tier -->
- <rect class="small-box small-exec" x="60" y="545" width="140" height="50" rx="6"/>
- <text x="130" y="568" class="sub" text-anchor="middle">Temporal</text>
- <text x="130" y="584" class="sub" text-anchor="middle" font-size="10">distributed workers</text>
-
- <rect class="small-box small-exec" x="215" y="545" width="140" height="50" rx="6"/>
- <text x="285" y="568" class="sub" text-anchor="middle">Redis</text>
- <text x="285" y="584" class="sub" text-anchor="middle" font-size="10">cache + locks + streams</text>
-
- <rect class="small-box small-exec" x="370" y="545" width="140" height="50" rx="6"/>
- <text x="440" y="568" class="sub" text-anchor="middle">SQLite</text>
- <text x="440" y="584" class="sub" text-anchor="middle" font-size="10">workflow.db + credentials.db</text>
-
- <rect class="small-box small-exec" x="525" y="545" width="140" height="50" rx="6"/>
- <text x="595" y="568" class="sub" text-anchor="middle">Node.js server</text>
- <text x="595" y="584" class="sub" text-anchor="middle" font-size="10">JS/TS code executor</text>
-
- <rect class="small-box small-exec" x="60" y="608" width="220" height="50" rx="6"/>
- <text x="170" y="631" class="sub" text-anchor="middle">WhatsApp RPC (port 9400)</text>
- <text x="170" y="647" class="sub" text-anchor="middle" font-size="10">whatsapp-rpc binary</text>
-
- <rect class="small-box small-exec" x="295" y="608" width="220" height="50" rx="6"/>
- <text x="405" y="631" class="sub" text-anchor="middle">Android relay</text>
- <text x="405" y="647" class="sub" text-anchor="middle" font-size="10">persistent WebSocket</text>
-
- <rect class="small-box small-exec" x="530" y="608" width="250" height="50" rx="6"/>
- <text x="655" y="631" class="sub" text-anchor="middle">Temporal server</text>
- <text x="655" y="647" class="sub" text-anchor="middle" font-size="10">ports 7233 / 8233 / 8080</text>
-
- <!-- Right sidebar: External services -->
- <text x="830" y="55" class="tier-label">External</text>
- <rect class="panel panel-ext" x="830" y="70" width="340" height="610" rx="8"/>
- <text x="850" y="100" class="title">External services</text>
-
- <text x="850" y="130" class="sub" font-weight="700" fill="#8be9fd">LLM providers (10)</text>
- <text x="850" y="150" class="sub">OpenAI, Anthropic, Gemini, OpenRouter,</text>
- <text x="850" y="168" class="sub">xAI, DeepSeek, Kimi, Mistral, Groq, Cerebras</text>
-
- <text x="850" y="200" class="sub" font-weight="700" fill="#8be9fd">Google Workspace</text>
- <text x="850" y="220" class="sub">Gmail, Calendar, Drive, Sheets,</text>
- <text x="850" y="238" class="sub">Tasks, Contacts (unified OAuth)</text>
-
- <text x="850" y="270" class="sub" font-weight="700" fill="#8be9fd">Social platforms</text>
- <text x="850" y="290" class="sub">WhatsApp, Telegram, Twitter/X,</text>
- <text x="850" y="308" class="sub">Discord, Slack, Signal (unified)</text>
-
- <text x="850" y="340" class="sub" font-weight="700" fill="#8be9fd">Search APIs</text>
- <text x="850" y="360" class="sub">Brave, Serper, Perplexity,</text>
- <text x="850" y="378" class="sub">DuckDuckGo (free)</text>
-
- <text x="850" y="410" class="sub" font-weight="700" fill="#8be9fd">Web scraping</text>
- <text x="850" y="430" class="sub">Apify actors, Crawlee scraper,</text>
- <text x="850" y="448" class="sub">residential proxy providers</text>
-
- <text x="850" y="480" class="sub" font-weight="700" fill="#8be9fd">Device integration</text>
- <text x="850" y="500" class="sub">Android via ADB relay,</text>
- <text x="850" y="518" class="sub">16 Android service nodes</text>
-
- <text x="850" y="550" class="sub" font-weight="700" fill="#8be9fd">Vector + RAG</text>
- <text x="850" y="570" class="sub">ChromaDB, Qdrant, Pinecone,</text>
- <text x="850" y="588" class="sub">HuggingFace embeddings</text>
-
- <text x="850" y="620" class="sub" font-weight="700" fill="#8be9fd">Maps</text>
- <text x="850" y="640" class="sub">Google Maps Geocoding,</text>
- <text x="850" y="658" class="sub">Places nearbySearch</text>
-
- <!-- Arrow Execution -> External -->
- <path class="conn" d="M 800 590 L 830 590" marker-end="url(#arrow)"/>
- <text x="805" y="580" class="label">HTTP / SDK</text>
+ <rect class="bg" width="1800" height="1080"/>
+
+ <text class="title" x="900" y="44" text-anchor="middle">OpenCompany - System Overview</text>
+ <text class="sub" x="900" y="70" text-anchor="middle">FastAPI plugin backend + React Flow client + sidecar processes (single-machine dev topology)</text>
+
+ <!-- ===== Tier: Browser ===== -->
+ <text class="tier-label" x="230" y="96">BROWSER</text>
+ <rect class="panel p-cyan" x="230" y="104" width="960" height="110" rx="10"/>
+ <rect class="box p-cyan" x="500" y="118" width="420" height="82" rx="8"/>
+ <text class="h2" x="710" y="144" text-anchor="middle">React Flow client</text>
+ <text class="sub" x="710" y="163" text-anchor="middle">client/ - Vite dev :3000</text>
+ <text class="sub" x="710" y="181" text-anchor="middle">React 19 + Tailwind v4 + shadcn/ui + Zustand</text>
+
+ <!-- Browser <-> Backend -->
+ <path class="conn" d="M 558 218 L 558 314" marker-end="url(#arrow)"/>
+ <path class="conn" d="M 568 314 L 568 218" marker-end="url(#arrow)"/>
+ <text class="label" x="546" y="270" text-anchor="end">WebSocket /ws/status</text>
+ <path class="conn" d="M 860 218 L 860 314" marker-end="url(#arrow)"/>
+ <text class="label" x="874" y="270">REST /api/*</text>
+
+ <!-- Inbound webhook into backend left edge -->
+ <path class="conn" d="M 40 430 L 226 430" marker-end="url(#arrow)"/>
+ <text class="label" x="130" y="414" text-anchor="middle">/webhook/{path} (inbound)</text>
+
+ <!-- ===== Tier: Python backend ===== -->
+ <text class="tier-label" x="230" y="310">PYTHON BACKEND</text>
+ <rect class="panel p-purple" x="230" y="318" width="960" height="324" rx="10"/>
+ <text class="h1" x="710" y="348" text-anchor="middle">Python backend - FastAPI :3010 (server/)</text>
+
+ <rect class="box p-purple" x="250" y="368" width="435" height="70" rx="8"/>
+ <text class="h2" x="467" y="395" text-anchor="middle">WS + REST dispatch</text>
+ <text class="small" x="467" y="417" text-anchor="middle">core MESSAGE_HANDLERS + plugin ws_handler_registry</text>
+
+ <rect class="box p-purple" x="735" y="368" width="435" height="70" rx="8"/>
+ <text class="h2" x="952" y="395" text-anchor="middle">WorkflowService -&gt; NodeExecutor</text>
+ <text class="sub" x="952" y="417" text-anchor="middle">ParameterResolver {{node.field}}</text>
+
+ <rect class="box p-purple" x="250" y="456" width="435" height="84" rx="8"/>
+ <text class="h2" x="467" y="483" text-anchor="middle">Node plugins (115+)</text>
+ <text class="small" x="467" y="503" text-anchor="middle">server/nodes/&lt;group&gt;/&lt;plugin&gt;/</text>
+ <text class="small" x="467" y="521" text-anchor="middle">Pydantic Params/Output = SSOT</text>
+
+ <rect class="box p-purple" x="735" y="456" width="435" height="84" rx="8"/>
+ <text class="h2" x="952" y="483" text-anchor="middle">AuthService</text>
+ <text class="sub" x="952" y="507" text-anchor="middle">Fernet + PBKDF2 encrypted credentials</text>
+
+ <rect class="box p-purple" x="250" y="558" width="920" height="64" rx="8"/>
+ <text class="h2" x="710" y="584" text-anchor="middle">Execution engine</text>
+ <text class="sub" x="710" y="607" text-anchor="middle">Temporal -&gt; Redis-parallel -&gt; sequential (auto-fallback)</text>
+
+ <!-- Backend -> Sidecars -->
+ <path class="conn" d="M 710 646 L 710 722" marker-end="url(#arrow)"/>
+ <text class="label" x="724" y="688">spawns / calls</text>
+
+ <!-- ===== Tier: Sidecar processes ===== -->
+ <text class="tier-label" x="230" y="718">SIDECAR PROCESSES</text>
+ <rect class="panel p-orange" x="230" y="726" width="960" height="120" rx="10"/>
+
+ <rect class="box p-orange" x="250" y="746" width="215" height="80" rx="8"/>
+ <text class="h2" x="357" y="772" text-anchor="middle">Node.js executor :3020</text>
+ <text class="small" x="357" y="792" text-anchor="middle">Express + tsx</text>
+ <text class="small" x="357" y="808" text-anchor="middle">JS/TS code nodes</text>
+
+ <rect class="box p-orange" x="485" y="746" width="215" height="80" rx="8"/>
+ <text class="h2" x="592" y="772" text-anchor="middle">WhatsApp RPC :9400</text>
+ <text class="small" x="592" y="792" text-anchor="middle">Go whatsmeow binary</text>
+
+ <rect class="box p-orange" x="720" y="746" width="215" height="80" rx="8"/>
+ <text class="h2" x="827" y="772" text-anchor="middle">Temporal server</text>
+ <text class="small" x="827" y="792" text-anchor="middle">gRPC :7233 - Web UI :8080</text>
+
+ <rect class="box p-orange" x="955" y="746" width="215" height="80" rx="8"/>
+ <text class="h2" x="1062" y="772" text-anchor="middle">Temporal workers</text>
+ <text class="small" x="1062" y="792" text-anchor="middle">manager + per-queue</text>
+ <text class="small" x="1062" y="808" text-anchor="middle">worker pool</text>
+
+ <!-- Backend -> Storage (routed around sidecar tier) -->
+ <path class="conn" d="M 230 610 L 170 610 L 170 985 L 226 985" marker-end="url(#arrow)"/>
+ <text class="label" x="162" y="800" text-anchor="end">read/write</text>
+
+ <!-- ===== Tier: Storage ===== -->
+ <text class="tier-label" x="230" y="922">STORAGE</text>
+ <rect class="panel p-pink" x="230" y="930" width="960" height="110" rx="10"/>
+ <rect class="box p-pink" x="250" y="950" width="920" height="70" rx="8"/>
+ <text class="h2" x="710" y="977" text-anchor="middle">~/.opencompany/</text>
+ <text class="sub" x="710" y="1000" text-anchor="middle">workflow.db - credentials.db - temporal.db - Redis cache/locks (optional)</text>
+
+ <!-- Backend / Sidecars -> External services -->
+ <path class="conn" d="M 1194 480 L 1316 480" marker-end="url(#arrow)"/>
+ <text class="label" x="1255" y="464" text-anchor="middle">HTTP / SDK / CLI</text>
+ <path class="conn" d="M 1194 786 L 1316 786" marker-end="url(#arrow)"/>
+ <text class="label" x="1255" y="770" text-anchor="middle">HTTP / SDK / CLI</text>
+
+ <!-- ===== External services (right column) ===== -->
+ <text class="tier-label" x="1320" y="96">EXTERNAL SERVICES</text>
+ <rect class="panel p-green" x="1320" y="104" width="440" height="936" rx="10"/>
+ <text class="h1" x="1540" y="134" text-anchor="middle">External services</text>
+
+ <rect class="box p-green" x="1340" y="152" width="400" height="100" rx="8"/>
+ <text class="h2" x="1540" y="177" text-anchor="middle">LLM providers (12)</text>
+ <text class="sub" x="1540" y="197" text-anchor="middle">OpenAI, Anthropic, Gemini, OpenRouter, xAI,</text>
+ <text class="sub" x="1540" y="215" text-anchor="middle">DeepSeek, Kimi, Mistral, Groq, Cerebras</text>
+ <text class="sub" x="1540" y="233" text-anchor="middle">local: Ollama, LM Studio</text>
+
+ <rect class="box p-green" x="1340" y="280" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="305" text-anchor="middle">Google Workspace</text>
+ <text class="sub" x="1540" y="325" text-anchor="middle">Gmail, Calendar, Drive, Sheets, Tasks, Contacts</text>
+
+ <rect class="box p-green" x="1340" y="368" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="393" text-anchor="middle">Messaging</text>
+ <text class="sub" x="1540" y="413" text-anchor="middle">WhatsApp, Telegram, Twitter/X</text>
+
+ <rect class="box p-green" x="1340" y="456" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="481" text-anchor="middle">Search APIs</text>
+ <text class="sub" x="1540" y="501" text-anchor="middle">DuckDuckGo (free), Brave, Serper, Perplexity</text>
+
+ <rect class="box p-green" x="1340" y="544" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="569" text-anchor="middle">Web scraping</text>
+ <text class="sub" x="1540" y="589" text-anchor="middle">Apify actors, Crawlee, residential proxies</text>
+
+ <rect class="box p-green" x="1340" y="632" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="657" text-anchor="middle">Dev CLIs</text>
+ <text class="sub" x="1540" y="677" text-anchor="middle">GitHub (gh), Vercel, Stripe</text>
+
+ <rect class="box p-green" x="1340" y="720" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="745" text-anchor="middle">Device</text>
+ <text class="sub" x="1540" y="765" text-anchor="middle">Android via relay - 16 service nodes</text>
+
+ <rect class="box p-green" x="1340" y="808" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="833" text-anchor="middle">Vector + RAG</text>
+ <text class="sub" x="1540" y="853" text-anchor="middle">ChromaDB, Qdrant, Pinecone</text>
+
+ <rect class="box p-green" x="1340" y="896" width="400" height="60" rx="8"/>
+ <text class="h2" x="1540" y="921" text-anchor="middle">Maps</text>
+ <text class="sub" x="1540" y="941" text-anchor="middle">Google Maps Geocoding + Places</text>
</svg>