<!--
Full-page Markdown export (rendered HTML → GFM).
Source: https://neotoma.io/ca/deterministic-state-evolution
Generated: 2026-04-28T13:35:46.857Z
-->
# Deterministic state evolution
Given the same set of observations, the system always produces the same entity state regardless of when or in what order they are processed. This removes ordering bugs and makes agent state testable.
## Before vs after
Before: two agents report conflicting values and whichever write arrives last wins. After: both observations are preserved and a deterministic merge rule resolves the canonical value reproducibly.
◆
## CLI example
\# Agent A writes one value
neotoma store --json='\[{"entity\_type":"contact","name":"Ana Rivera","city":"Barcelona"}\]'
# Agent B writes a conflicting value
neotoma store --json='\[{"entity\_type":"contact","name":"Ana Rivera","city":"San Francisco"}\]'
# Deterministic reducer computes one canonical snapshot
neotoma entities search --query "Ana Rivera" --entity-type contact
Late-arriving observations are folded in deterministically. If the merge rule prefers stronger provenance or recency, it behaves identically on replay, which is required for [reproducible state reconstruction](/reproducible-state-reconstruction). See [versioned history](/versioned-history), [replayable timeline](/replayable-timeline), and [architecture](/architecture).