# Edges & Conditions

Edges are the connections between nodes. They define the flow of execution
through your workflow and can optionally carry conditions.

## Creating edges

### Manual connection

1. Hover over the source node to reveal its **output port** (a small circle).
2. Click the output port and drag to the target node's **input port**.
3. Release to create the edge.

### Automatic connection (quick-add)

When you add a node via the quick-add **+** button, an edge is automatically
created connecting the source node to the new node.

## Edge types

### Simple edges

A direct connection from one node to another with no condition. Execution
always flows through a simple edge.

### Conditional edges

Edges can have a **condition** attached. Conditions evaluate to true or false
during execution:

- If the condition passes, execution continues to the target node.
- If the condition fails, execution does not follow that edge.

Conditional edges display the condition name as a label on the edge.

### Annotated edges

Any edge can have an **annotation** -- a documentation note displayed on the
canvas.

## Adding a condition to an edge

1. Hover over an edge to reveal the **+** (quick-add condition) button.
2. Click the button to open a popup with available conditions.
3. Select a condition. It is attached to the edge.

![Quick-add condition button on an edge](../assets/screenshots/edge-condition.png){ .screenshot }

Alternatively, select an edge by clicking on it and configure the condition
in the Property Panel.

## Configuring edges

Click an edge to select it. The Property Panel shows:

- **Label**: The edge's display label (editable inline).
- **Condition**: The attached condition plugin and its configuration form.
- **Annotation**: An optional documentation note.

## Edge order

When a node has multiple outgoing edges, the order matters -- it determines
the sequence in which conditions are evaluated. Toggle the **#** button in
the toolbar to show edge order numbers on the canvas.

You can reorder edges by dragging the order badges that appear on each edge.

## Deleting edges

Select an edge and press `Delete`. This removes the connection but leaves
both nodes in place.

If a condition is attached, it is also removed with the edge.

## Visual indicators during replay

During execution replay, edges show visual indicators:

- **Green checkmark**: The condition passed and execution flowed through.
- **Red X**: The condition failed and execution did not follow this edge.

See [Replay & Testing](../replay/index.md) for more details.
