Shared memory creates consistency questions
When several agents read and update the same context, order, identity, and merge policy matter. Two agents may add aliases, correct a date, revoke access, or derive competing facts at the same time. A generic last-write-wins map can silently erase one observation.
The system needs a clear authoritative write boundary, idempotent requests, typed conflict semantics, and query snapshots that expose progress.
Attribute every operation
Record tenant, authenticated principal, agent, session, request, idempotency key, source, region, sequence, schema generation, and trace identity in an integrity-covered envelope. This supports authorization, audit, replay, and incident investigation.
Agent identity should not be trusted because it appears in a request body; it must be bound by the authenticated credential and policy gateway.
Choose merge behavior by field
Scalar presentation fields may use last-write-wins. Alias and membership sets need observed-remove semantics. Concurrent claims may use a multi-value register. Counts use counters. Revocation and suspension need deny-wins or immutable events.
The type registry must version these choices because changing merge policy changes the meaning of historical operations and semantic digests.
Give agents bookmarks and freshness
A successful mutation returns a regional bookmark. A later query can require results after that bookmark. If vector or lexical indexes lag, the query overlays authoritative recent writes or reports which component cannot yet satisfy the boundary.
Cross-region or cross-shard reads state the materialization watermark used, allowing an orchestrator to wait, degrade gracefully, or request authoritative paths.
Test races as product behavior
Fault tests should interleave concurrent writes, delayed delivery, duplicate requests, region restarts, projection lag, policy revocation, and future clock values. The expected result is not merely “eventual convergence”; it is deterministic query-visible semantics with no silent loss.
Application evaluation should also measure whether agents make better decisions with shared memory, how often conflicts require review, and how much context and latency the coordination adds.