Skip to content

Node Graph Editor

A node graph for wiring AI pipelines together, node by node. Nodes carry their own parameter widgets and typed ports, wires take the colour of their type and refuse the wrong ones, and Run shows each node working, cached, failed or skipped, with a preview inside it.

On this page

Examples

Press Run. Change the seed and run again: only what depends on it re-runs, the rest says cached. Set Upscale to 8x to see an error and the skipped node after it.

Installation

Installation is part of Pro

Pro components install from a licensed registry. The live preview stays open to everyone.

Props

nodeTypesrequired
NodeTypeDef[]
The registry: { type, title, inputs, outputs, widgets, preview, simulate }. A port is { id, label, type, required }, a type is any string ("TEXT", "IMAGE", "MODEL"; "ANY" fits everything). A widget is text, number (with a slider), select, seed (with Random) or toggle.
value / defaultValue / onChange
Graph / Graph / (graph) => void
Defaultempty
{ nodes, edges }. A node is { id, type, x, y, title?, params }; an edge is { id, from, fromPort, to, toPort }. onChange runs after each edit: a drag reports once, when it ends; a widget reports as you change it.
run
(job) => Promise<outputs | void>
Defaultsimulated
Does the work of one node. The job has the node, its inputs by port, its params, progress(0..1) and an abort signal. Return { [port]: { value, preview? } }; throw to fail the node. Without it, each type's simulate runs with a short progress.
Run states
idle, queued, running, done, cached, error, skipped
Nodes run in topological order. The running node is lit and shows a progress bar. A node whose type, params and upstream values are unchanged since its last run is marked cached and does not call run. An error shows on the node and every node after it is skipped. Stop ends the run.
Preview
{ kind: "text" | "image" | "audio" }
What a node draws after a run: text, an image (a placeholder gradient from hue, or a src) or audio levels from 0 to 1.
portTypes / compatible
Record<string, string> / (from, to) => boolean
Defaultsee text
portTypes maps a type to a text colour class (the wire and the dots take currentColor, so light, dark and --kn-accent apply). compatible decides which output type may feed which input type; the default is the same type or ANY.
readOnly
boolean
Defaultfalse
View and run only: no moving, wiring, adding or deleting, and the widgets are locked.
mobileBelow
number
Default640
Below this container width the canvas is view and run, with each node's parameters in a bottom sheet when you tap it.
onRunStateChange / label / className
-
Called as nodes change state. Give the root a height: the editor fills it.
Wires
rules
While you drag, inputs that do not fit dim and a hint says why. One input takes one wire: connecting to a wired input moves the wire. Nothing connects to itself, twice, across types or in a loop.
Pan and zoom
pointer
Drag the background to pan. Mouse: Ctrl + wheel zooms at the cursor. Trackpad: pinch zooms, two fingers pan. Touch: pinch and one-finger pan. A plain wheel only moves the canvas while it has focus, so the page still scrolls past it.
Keyboard
canvas
Tab walks every node's controls and ports. Enter on an output dot picks it, Tab to an input dot and Enter connects, Escape cancels. Click or focus the canvas, pick a wire or a node, Delete removes it. + - 0 zoom and fit.
a11y
group
Nodes are named groups with their state; ports say their type, whether they are required, and whether they are connected. Colour is never the only cue: the type is written next to each port. Changes and run results go to a polite status line. With reduced motion the wire flow, bar and fades stop.

When to use

When to use

  • Letting people wire an AI pipeline themselves: prompt, model, image, audio, each node with its own settings.
  • Any flow where data has a type and a wrong connection should be refused before it runs, then shown running node by node.

When not to use

  • Agent workflows made of triggers, agents, tools and conditions: use Workflow Builder.
  • Showing a running team of agents, view only: use Agent Graph.
  • Following when each step of a run happened: use Trace Waterfall.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Node Graph Editor to my app and wire it to my own data.
  • I need letting people wire an AI pipeline themselves: prompt, model, image, audio, each node with its own settings. Set that up with the Knowns UI Node Graph Editor.
  • Which Node Graph Editor props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "node-graph-editor" }) and search_docs({ query: "node graph editor" }). Pro props, full examples and source come back once your license key is in the MCP config.

Need help?

Stuck on Node Graph Editor, or found something off? We read every message.