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

# Wiring blocks

> Connect blocks so data flows through them, and branch on the Agent's decisions.

Blocks don't do anything until you wire them. Wires define the order things run and how data moves between them.

## Making a connection

Every block has one or more **output ports** on its right edge and **input ports** on its left. Drag from an output to an input to create a wire.

* Ports have colors that match the type of data they carry (payload, error, control flow).
* A port only accepts a wire from a compatible port type — mismatches are rejected in real time.
* Delete a wire by clicking it and pressing `Delete`.

## Output shapes

Each block produces a typed output:

* **Trigger** → the incoming payload.
* **Agent** → an object with `answer`, `tool_calls`, `citations`, and any structured fields you asked the Agent to extract.
* **Tool** → the tool's response JSON.
* **Router** → routes to one of its labeled outputs.
* **Action** → a status object (success, error, skipped).

You can pipe any output into a downstream input as long as the shapes are compatible. Otherwise, drop a **Transform** step between them.

## Branching

Two ways to branch:

### Router block

An explicit branch. Give it labeled outputs (e.g., `refund`, `escalate`, `answer`) and an expression that maps Agent output → label. The Flow follows the matched output only.

Great when the Agent's answer implies which downstream Action to take.

### Conditional Actions

Every Action has an optional **run when** expression. If it evaluates false, that Action is skipped and later ones still run.

Use Router when the branches are meaningfully different. Use conditional Actions when you're filtering a couple of Actions inside a mostly-linear Flow.

## Loops

Loops are rare in a Flow — because the Agent already loops internally over tool calls. The two loop patterns you might use:

* **Agent → Router → Agent (self)** — a second-pass verify-and-retry step.
* **List Fanout** — process each item in a list in parallel through the same downstream sub-flow, then merge results.

Guardrails: Flows have a hard cap on wire traversals per run (defaults to 100) to prevent runaway loops. Adjustable in Flow settings.

## Missing wire warnings

If you leave a required input unwired, the block shows a red dot. The Publish check refuses to ship until all required inputs are wired.

## Visual tips

* Right-click a wire to add a **waypoint** — makes complex Flows easier to read.
* Use **auto-layout** (top toolbar) to snap the whole Flow into a tidy left-to-right arrangement.
