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

# Staged agent update waves

> Update node agents in waves sized by a count or a percent, with a health gate between waves and pause, resume and abort from the CLI or API.

Node agents can update themselves ([multi-node setup](https://docs.levelrail.com/multi-node.md)). Without waves, every node updates as soon as it is allowed. A staged rollout updates a few nodes first and lets the rest wait until those are healthy on the new version.

## What it does

* Wave size is a count (`nodes.agent_update_wave_size`) or a percent of the fleet (`nodes.agent_update_wave_percent`, rounded up). When both are set the larger wave wins. Both at 0 means staging is off.
* `nodes.agent_update_wave_count` sets how many waves are used (2 to 20, default 2). The last wave takes every remaining node.
* Each wave waits until every earlier wave is online on the new version. `nodes.agent_update_wave_soak_seconds` adds a minimum time on the new version before the next wave starts (default 0).
* If a node in a wave rolls back to its previous binary, the rollout pauses by itself, writes an audit entry and notifies the enabled notification channels that are not project scoped.

## Turn it on

Staged rollout only applies to agents that update automatically, so turn that on first.

```bash theme={"dark"}
levelrail-cli settings runtime set nodes.agent_auto_update true
levelrail-cli settings runtime set nodes.agent_update_wave_percent 25
levelrail-cli settings runtime set nodes.agent_update_wave_soak_seconds 600
```

Control and read the current rollout:

```bash theme={"dark"}
levelrail-cli nodes agent-update rollout status
levelrail-cli nodes agent-update rollout pause
levelrail-cli nodes agent-update rollout resume
levelrail-cli nodes agent-update rollout abort
```

The API is `GET /api/v1/agent-update/rollout` and `POST /api/v1/agent-update/rollout/pause`, `resume` and `abort` (root token). Resume continues without the failed node. Abort stops the rollout for that version, and a new release starts clean. `GET /api/v1/nodes/version-skew` shows the failed node and the reason.

## Worked example

A fleet of 8 nodes with `nodes.agent_update_wave_percent` at 25 and 2 waves updates 2 nodes first (25 percent of 8). When both are online on the new version for 10 minutes, the other 6 update. If one of the first 2 rolls back, the other 6 stay on the old version and the rollout shows as paused until you resume or abort it. This describes the intended behavior from the unit tests, not a run on real nodes.

Hold single nodes out of automatic updates with `lrail nodes agent-update hold <id>`, or update one anyway with `lrail nodes agent-update apply <id> --force`.

## Status and limits

* Covered by unit tests with a simulated fleet. It has not been run on real nodes.
* The rollback notice reuses the existing notification sender and has no channel toggle of its own.
* Package managed agent installs are left to their package manager and are not part of a rollout.

Tracked in [issue 1849](https://github.com/glincker/levelrail/issues/1849).


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