> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xpander.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows

> A workflow is an agent whose behavior is a graph of nodes rather than a single loop: node types, branching, human steps, retries, triggers, staged versus live, and how runs are monitored.

Workflows are listed under **Workflows** in the left column of Xpander Chat, and can be hidden per user group.

A workflow is an agent of type orchestration. It has a name, a model and skills like any agent, but instead of one reasoning loop its behavior is a graph of nodes that xpander walks one by one, so you decide the order, the branches and where a person steps in. Each run is a task like any other, with the same record, budget and approvals.

## Nodes

| Node | What it does |
| - | - |
| **Agent** | Runs one of your agents on the current input |
| **Workflow** | Runs another workflow |
| **Action** | Calls one skill action directly |
| **Custom action**, **Code** | Runs a custom action or a code snippet |
| **Send email** | Sends an email |
| **OCR** | Extracts text from an image |
| **Classifier** | Sorts the input into groups; downstream nodes attach to a group |
| **Guardrail** | Checks the input against a rule and routes to **pass** or **fail** |
| **Condition** | Routes on a rule |
| **Wait** | Pauses the run for a webhook or for a person, for days if needed, then continues |
| **Parallel** | Runs branches at the same time |
| **Summarizer**, **Send to end** | Shape or short-circuit the final answer |
| **Schedule** | Books the run's next step for later, forward or back in the graph, up to a set number of times |

The node picker also offers two routing choices that add no node: **Go to existing node** continues at a step already in the workflow, and **Pick on canvas** lets you click that step on the graph.

Edges are ordered lists of next nodes; the first regular node is the entry, and a special end summarizer produces the output. Branching conditions are regex, contains, equals, greater or less than, not empty, and else. Each node can carry a retry strategy (up to a set number of retries), an iterative strategy (repeat until a condition), a stop strategy (stop on failure or on a condition) and duplicate prevention (ignore the same input again within a window).

![Node picker shown in two parts: Routing (Go to existing node, Pick on canvas), Agents (Agent, Workflow), Actions (Action, Custom action, Code, Send email, OCR) and Flow (Classifier, Guardrail, Summarizer, Parallel, Wait, Condition, Schedule, Send to end)](https://mintcdn.com/xpanderai-099931d1/wqIIXSsh0kqA2hZ_/images/verify/reach-workflow-addnode.png?fit=max\&auto=format\&n=wqIIXSsh0kqA2hZ_\&q=85\&s=f96ec637bf77b564b931667d40d6b07a)

The node picker in the workflow editor, grouped as Routing, Agents, Actions and Flow. The list scrolls; shown here in two parts. Shown with sample data.

## Triggers

The Start node lists four triggers and whether each is live: **API** (always, at the workflow's id), **Webhook** (a URL that is itself the credential), **Slack** (the channels routed to the workflow) and **Schedule** (a cron in UTC). Triggers publish the moment they are switched on. An incoming email can also start a workflow run.

## Staged and live

Edits to a workflow are staged: the API's `PATCH /v1/workflows/{workflow_id}` changes the draft, `PUT` deploys it, and `?version=draft` runs the draft on `POST /v1/workflows/{workflow_id}/invoke`. In Xpander Chat an applied change marks the workflow **DRAFT** and opens a bar reading "1 pending change, Staged for review": **Review** shows the diff, **Publish** makes it live, and **Discard** deletes the draft and returns the editor to the live workflow. The **Runs** menu next to the name lists past runs behind a search box. A workflow is not listed among agents; `GET /v1/workflows` lists workflows, and asking the workflow endpoint for an agent id says so.

![Workflow editor with a DRAFT badge, the Runs dropdown listing past runs behind a search box, and a 1 pending change bar with Review, Discard and Publish](https://mintcdn.com/xpanderai-099931d1/wqIIXSsh0kqA2hZ_/images/verify/reach-workflow-runsdropdown.png?fit=max\&auto=format\&n=wqIIXSsh0kqA2hZ_\&q=85\&s=7eba7b79f53c996da0de142512b7e251)

A staged workflow with a pending change, ready to publish.

## Runs

Every run of the workflow appears under **Runs** in the editor as it happens, with its status. Each node shows its recent runs. Opening a run shows its task record: the execution log, the files and the cost. A run paused at a wait node holds its state for up to thirty days. It resumes when the webhook arrives or the person decides.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.