IDs

ID and Session Conventions

Deterministic IDs make provenance, replays, and deletes much easier to reason about.

Base memory ID format

A common convention is `entity_id::session_id::turn_index`. It allows lightweight parsing of ownership and session context without additional joins.

Use immutable IDs. If content changes, create a new memory and link with graph edges instead of mutating IDs.

Examples
user-42::session-7::3
user-42::session-7::1000003   # summary companion

Companion memory IDs

Deterministic companion IDs prevent duplicate expansion when ingest is retried.

  • Summary companions can reserve a high turn-index range.
  • Fact companions can reserve a separate range and include ordinal slot.
  • Keep deterministic mapping from source turn to companions.

Delete and repair implications

When one memory is deleted, deterministic ID layout helps locate related companions and graph edges. Recovery jobs can reconstruct index state using predictable ID neighborhoods.