> ## 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.

# nora edges

> Wire blocks together — connect ports, delete wires, list current wiring.

Edges are the wires between blocks. `edges` lets you draw and remove wires from the terminal — useful for scripting Flow construction and for cleaning up after bulk changes.

## Commands

| Command                           | Description                                    |
| --------------------------------- | ---------------------------------------------- |
| `edges connect <source> <target>` | Draw a wire from source block to target block. |
| `edges delete <edge-id>`          | Remove a wire.                                 |
| `edges list`                      | List current wires (optionally filtered).      |

## `edges connect`

```bash theme={null}
nora edges connect tr_events ag_support
```

Draws a wire from `tr_events` (output) to `ag_support` (input).

Default ports: `right` (source's right edge) → `left` (target's left edge). Override with side flags:

* `--source-side left|right` — which side of the source block the wire leaves.
* `--target-side left|right` — which side of the target block the wire enters.

Right-to-left is the default because Flows are usually laid out left-to-right.

Prints the created edge's ID.

## `edges delete`

```bash theme={null}
nora edges delete edge_abc
```

Removes the wire. Both blocks stay; only the connection is severed.

## `edges list`

```bash theme={null}
nora edges list
```

Prints every wire in the Flow: edge id, source id, target id, sides.

Filter to wires involving a specific block:

```bash theme={null}
nora edges list --source ag_support   # everything leaving ag_support
nora edges list --target tr_events    # everything entering tr_events
```

Add `--json` for structured output.

## Recipes

### Wire a full simple Flow from scratch

```bash theme={null}
# Create blocks
TR=$(nora triggers create --kind api --name entry | jq -r '.id')
AG=$(nora agents create --name assistant --model gpt-4o-mini | jq -r '.id')
AC=$(nora actions create --name log --runtime '{"kind":"http","method":"POST","url":"https://logs.internal/nora"}' | jq -r '.id')

# Wire them
nora edges connect $TR $AG
nora edges connect $AG $AC

nora flows publish --summary "initial version"
```

### Reroute a wire — replace one edge with another

There's no `edges update`; delete and reconnect:

```bash theme={null}
old=$(nora edges list --target ag_old --json | jq -r '.[0].id')
nora edges delete $old
nora edges connect $(nora edges list --json | jq -r '.[0].source_id') ag_new
```

Cleaner: use `flows snapshot` → hand-edit JSON → `flows apply`.

### Audit: find blocks with no incoming wires

```bash theme={null}
comm -23 \
  <(nora flows get support | jq -r '.blocks[].id' | sort) \
  <(nora edges list --json | jq -r '.[].target_id' | sort -u)
```

Prints block IDs that nothing points at — likely unreachable, worth pruning.

### Audit: find blocks with no outgoing wires

```bash theme={null}
comm -23 \
  <(nora flows get support | jq -r '.blocks[].id' | sort) \
  <(nora edges list --json | jq -r '.[].source_id' | sort -u)
```

Blocks that produce output nothing consumes.

## Ports and sides

Every block has ports on its left and right edges. The **default port** on each side is the primary in/out. Blocks with multiple output paths (Router, Agent with parallel branches) expose additional named ports.

Right now the CLI uses side-based wiring (`left`/`right`) — not named ports. For Flows that need named ports, use the app canvas or `flows apply` with a hand-crafted JSON.

## Cycles and validation

Pre-publish checks include acyclicity — you can create a cycle in Draft, but Publish will reject it. Break the cycle first.

The rare exception: bounded loops (Agent → Router → back to Agent for a verify-and-retry pattern). Those pass validation if you set an explicit iteration bound.
