---
title: "How Graph Builder works"
type: EXPLANATION
updated: 2026-09-28
---

# How Graph Builder works

Graph Builder shows an agent’s work as a graph: the steps it takes, the order it takes them in, and what happens when a step fails. Open a built-in graph to see how it works, or build your own.

Last updated 2026-09-28

## Agent graphs

An agent graph is the complete structure of an agent’s steps and connections. Every graph starts at **Start** and finishes at **Done** or **Failed**. When a step succeeds, the graph follows its green connection; when it fails, the red one.

![A graph in Graph Builder. Start leads to an agent step called My custom task, then to a script step called Print message, then to Done. Red connections run from both steps to Failed.](/docs/graph-builder/starter-graph.png)

This is the graph that opens when you choose New Graph in Graph Builder.

## Steps

Each card on the canvas is a step. Add steps from the palette on the left, and change the selected step in the panel on the right.

- **Agent steps** hand work to an agent. Choose a classification, such as researcher, coder, or reviewer, and write the instructions for that step.
- **Script steps** run a program. Its exit code decides which connection the graph follows.
- **Your graphs** are graphs you have saved. Add one to another graph as a single step.

![Graph Builder with the palette of steps on the left, the graph on the canvas, and the graph’s settings on the right.](/docs/graph-builder/new-graph.png)

## Connections

To connect two steps, drag from a step’s port to the step that runs next. A green port leads to the next step after a success; a red port leads to what handles a failure, such as Failed or a step that recovers.

![Dragging a new connection from the Print message step to Done.](/docs/graph-builder/connect-steps.png)

A connection back to an earlier step creates a loop: repeated behavior within the graph, which runs up to a set limit. Graph Builder warns you when a step has no failure route.

## Guides

[Build your first graph](/docs/graphs/first-graph) walks through creating, connecting, saving, and running a graph. [Publish to the Marketplace](/docs/graphs/publish) covers sharing a graph as an agent or submitting a plugin repository. Creating agents does not require a Panolayer subscription.

## Continue learning

- [Build your first graph](/docs/graphs/first-graph)

- [Publish to the Marketplace](/docs/graphs/publish)
