# Building a graph

> Add nodes, connect compatible typed pins, run the intended selection, inspect earlier results, and organize reusable parts of a larger workflow.

Source: https://kaitoi.io/docs/studio/graphs/
Section: Kaitoi Studio / Graphs, nodes and blocks
Written for: Anyone assembling or changing a workflow in the graph editor.
Last reviewed: 2026-10-24

---

A graph records the operations and connections that make a result. Use it when
you want to see what feeds each step and change one part of the process.

## Add and connect nodes

Search the node library and add an operation. Edit its unconnected input
widgets, then drag an output pin to a compatible input on another node. Pin
types describe the value being passed: an image, text, number, file, or another
supported type. A connection supplies that input instead of its manual widget.

Build a short chain first. For example, connect an image-producing node to an
image adjustment node, run the chain, and inspect the adjusted result before
adding more operations.

## Run the right work

Select nodes and press **Run Graph**, or use a node's header run button for that
node. Required upstream work is evaluated as part of resolving its inputs.
During execution the graph control becomes **Stop Graph**. A stop request does
not promise to undo a provider request already sent.

Use automatic evaluation deliberately, especially on nodes that spend credits.
A change that seems small can trigger work further down a chain.

## Compare and reuse results

Open a node's **History** to inspect earlier runs. Its current preview and its
earlier history are different selections; confirm the result you are using
before sending it elsewhere.

Lock a node when you want a later graph run to reuse its stored output. Unlock
and rerun it when you need a new result. A missing or unavailable referenced file
still needs to be recovered or made again.

## Organize the graph

Use containers to group related work visually. Use **Create subgraph** to fold a
selection into a reusable component. Expose the input and output pin labels you
want on that component before creating it. Supported wires crossing the
selection boundary become exposed sockets automatically; review any warning
about connections that cannot cross it.

An exposed pin also has uses in collapsed nodes, endpoint setup, and Stations.
[Nodes](/docs/studio/nodes/) explains that shared interface mechanism.

## Recover from a failure

Read the failing node's message, check its required inputs and provider access,
and correct the cause before retrying. Save the project while it is in a useful
state. [Troubleshooting](/docs/reference/troubleshooting/) covers the usual
execution and persistence problems.

## Build one branch at a time


In this example, **Reference** supplies an image to **Crop**, which supplies
an image to **Resize**. Connect each `image` output to the next `image` input;
the resize width remains a manual value. Select **Resize** before Run Graph
to include its required upstream dependencies. An unlocked selected target
can run again even when unchanged. The names and artwork illustrate one
branch; use the actual operations and schemas available in your node library.

*Figure: Add three operations, wire their image pins, then select the intended target.*

## Checks and next steps

Start from the output you want and trace its dependencies back to the
inputs. Select that target before **Run Graph**. An explicit unlocked target
can execute again and spend again even if it looks unchanged; clean upstream
nodes may reuse cached work. A locked node needs a usable saved output.

For a large graph, work on one branch at a time and keep unrelated branches
unchanged. Inspect pin names and required inputs, run the smallest useful
test, then open the actual result. Containers organize space; they do not
change the execution dependency rules. Save before major restructuring.

For conversational construction or a narrow edit, see
[Building and editing graphs with Penny](/docs/studio/penny-graphs/).
