# Traffic and deployment history

Traffic determines which published branch version a new production conversation receives. The distribution covers every active branch and must total exactly 100%. A branch at `0%` remains available for drafting and version history but is not selected for new production conversations.

## Set a valid traffic distribution

Open **Edit traffic split** and enter a percentage for every active branch. Each value may use at most two decimal places, must be between `0%` and `100%`, and the complete set must total exactly 100%. A branch receiving positive traffic must have a valid published tip with executable resources. Archived branches cannot receive traffic.

Traffic changes require an owner or admin. Protection does not block an authorized traffic change, but an invalid, archived, unknown, or stale branch blocks the whole request. No percentage changes and no audit snapshot is written on failure.

Existing conversations stay pinned to the branch and version selected when they opened. A new distribution affects only new production conversations. This makes a staged percentage change useful, but it is not a live migration of conversations already in progress.

## Read current behavior and append-only history

The current distribution is the production routing state now in effect. Deployment history is append-only: each real change stores the complete distribution, actor, and creation time. A deployment history item does not contain a change-note field. Submitting the identical canonical distribution is a no-op and does not create a misleading history item.

Production routing chooses one branch deterministically from the distribution and pins its exact version when a conversation is created. If no valid complete distribution exists, the runtime refuses production creation instead of guessing a fallback branch.

Use [Conversation filters](/docs/monitor/conversations) to compare outcomes by agent and branch. The version shown in Conversation detail is the frozen snapshot actually used, not merely the branch's current tip.

## Roll back without erasing history

Select a prior deployment entry and preview rollback. Rollback creates a new deployment snapshot using the old distribution; it does not delete or rewrite later entries. Branches created after the historical snapshot receive `0%`. A missing or archived branch blocks the rollback until the branch is restored or the distribution is corrected.

If a branch cannot accept positive traffic, first publish a valid version or remove it from the intended split. If the total is rejected, correct precision and make the sum exactly `100%`. After saving, confirm the new entry is marked current and start a new test production conversation to verify its branch and version. For branch state rules, see [deployment overview](/docs/deploy/overview-and-branches).
