Data

Data Model

The core record is `AgentObservation`, designed for temporal ordering and retrieval interoperability.

Primary record

`entity_id` defines the ownership scope. `created_at_ms` gives deterministic time ordering. `kind` controls decay and retention policy at query time.

Rust shape
pub struct AgentObservation {
    pub entity_id: String,
    pub textual_content: String,
    pub embedding: Vec<f32>,
    pub kind: MemoryKind,
    pub created_at_ms: u64,
}

Field constraints

Store event time instead of processing time when available. This makes replay and timeline queries deterministic across re-ingestion runs.

  • `entity_id` should be stable and tenant-safe
  • `textual_content` should contain normalized text
  • `embedding` dimension must match model output
  • `created_at_ms` should use event time when possible

Why this model works

The model is intentionally compact. Secondary concerns like supersession, deletion lineage, or vector IDs are handled by adjacent tables rather than inflating the main record.

Compact records reduce serialization overhead and simplify consistency checks in recovery tooling.