Canvas & Nodes
The canvas is the core of Modular9. It's a visual, drag-and-drop environment where you compose AI workflows by placing nodes and connecting them with edges.
The Visual Canvas
Modular9's canvas is built on React Flow, a production-grade graph library for React. The canvas maintains a directed acyclic graph (DAG) — a set of nodes and directed edges with no cycles.
Canvas Controls
| Action | How |
|--------|-----|
| Pan | Click and drag on empty canvas area |
| Zoom | Scroll wheel, or use + / - buttons |
| Select node | Click the node |
| Multi-select | Hold Shift and drag a selection rectangle |
| Move multiple | Select nodes, then drag any of them |
| Delete | Select node(s) or edge(s), press Backspace or Delete |
| New workflow | Press N or click the toolbar button |
| Save | Cmd+S / Ctrl+S |
| Fit view | Click the fit-view button in the canvas controls |
Canvas State
The canvas state is managed by Zustand via the Canvas Store (src/lib/canvas/store.ts). The store holds:
interface CanvasStore {
nodes: Node[] // React Flow nodes (position + data)
edges: Edge[] // React Flow edges (source/target handles)
workflow: {
id: string | null // null = unsaved workflow
name: string
isDirty: boolean // unsaved changes
}
}
When you save a workflow, the entire canvas state (nodes + edges serialized as JSON) is persisted to PostgreSQL via the /api/workflows API route.
Node Types
Modular9 has two node types: Trigger and Specialist.
Trigger Node
The Trigger node is the entry point for every workflow. Every canvas starts with one. It defines how the workflow is initiated:
| Type | Description |
|------|-------------|
| Chat | Manually run via the chat interface — accepts a text input prompt and optional file attachment |
| Cron | Scheduled execution using a cron expression (e.g., 0 9 * * 1 = every Monday at 9am) |
| Webhook | Triggered by an HTTP POST request to a generated endpoint URL |
One trigger per workflow
Each workflow has exactly one trigger node. Adding a Trigger via the toolbar is blocked if one already exists on the canvas.
The trigger node displays the selected type with a colored indicator:
- Chat: green handle
- Cron: purple handle
- Webhook: blue handle
Specialist Node
A Specialist node is an AI agent. It wraps a plugin and executes it against upstream input using the configured LLM.
Each Specialist node has:
{
"pluginId": "code-review",
"pluginName": "Code Review",
"pluginColor": "#22c55e",
"pluginIcon": "code",
"selectedModel": "meta/llama-3.3-70b-instruct",
"temperature": 0.7,
"maxTokens": 4096,
"systemPrompt": "",
"lookAheadEnabled": false,
"lookAheadInstruction": "",
"logicConfig": null
}
The logicConfig field holds the node's LOGIC.md reasoning specification — see Execution Engine for details.
Anatomy of a Specialist Node Card
The node card renders:
- Plugin color strip at the top — visual identity tied to the pack color
- Icon + plugin name — identifies the specialist role
- Source and target handles — the connection points on left (input) and right (output) edges
- Settings gear icon — opens the Advanced Settings dialog for full configuration
Edges and Data Flow
Edges represent the flow of data between nodes. When a workflow executes:
- The Trigger node fires with an initial payload (user text, cron tick, or webhook body)
- The payload flows to the first connected Specialist node as its input
- That node processes the input using its LLM call, producing output text
- The output text flows to the next node as its input
- Execution continues through the DAG until all reachable nodes complete
This is a text-in, text-out pipeline at each hop. The output of one node becomes the raw input of the next.
Edge Interactions
| Action | How | |--------|-----| | Connect nodes | Drag from the source handle (right edge) to a target handle (left edge) | | Reconnect edge | Drag the edge endpoint to a new target handle | | Delete edge | Right-click the edge → "Remove connection" | | Multi-edge | A node can have multiple outgoing or incoming edges (fan-out / fan-in) |
Self-connections are blocked
Connecting a node to itself is prevented by the canvas. The edge will be rejected and not created.
Look-Ahead Filters
Each edge can carry a plain-English conditional filter. Enable it in the edge's Advanced Settings:
Only continue if severity is HIGH or CRITICAL
The filter is evaluated by the LLM after the upstream node completes. If the condition is not met, execution stops at that edge and downstream nodes are not run.
This lets you build conditional branches without code:
- "Skip if the output contains no action items"
- "Only continue if confidence is above 90%"
- "Stop if the user's question is off-topic"
Connector Nodes
Connector nodes are a specialized variant of Specialist nodes. Instead of calling an LLM, they call an external service's REST API directly.
Connectors appear in the Connectors tab of the right sidebar. Available connectors include:
- GitHub — create issues, pull requests, comments
- Slack — post messages to channels
- Notion — create database entries, append to pages
- HubSpot — create contacts, update deals
- Gmail / Outlook — send emails
- Google Drive — upload files
- Supabase — query, insert, call RPC functions
- Webhook — POST to any HTTP endpoint
A connector node receives the upstream node's text output and uses it as the body/content/message of the API call. LLM-generated content flows into the action automatically.
Canvas Minimap
The minimap (bottom-right corner) shows a bird's-eye view of your workflow. Click anywhere on the minimap to pan to that region. The minimap is especially useful for large workflows with many nodes.
Next Steps
- Plugins — understand the plugin ecosystem powering each node
- Execution Engine — how workflows run step by step
- Building Workflows — practical guide to composing workflows