nav.groups.storage

Backend: Memory

The default in-process store backend for all five store traits.

Backend: Memory

The default in-process store backend.

The memory backend is the default for all five store traits. It stores everything in HashMaps behind RwLocks, with no persistence across restarts. It is used in tests and as the default for Extensions::default().

Implementations

TypeTraitStorage
MemorySessionStoreSessionStoreHashMap<Uuid, Session> + Vec<MessageRecord>
MemoryEmbeddingStoreEmbeddingStoreVec<EmbeddingRecord> (brute-force search)
MemoryExecutionStoreExecutionStoreHashMap<Uuid, Vec<ToolExecution>>
MemoryArtifactStoreArtifactStoreHashMap<Uuid, Artifact>
MemoryRunStoreRunStoreHashMap<RunId, RunRecord> + Vec<RunEventRecord>

Characteristics

  • No persistence — data is lost on restart.
  • No network — no connection strings, no auth, no TLS.
  • Brute-force searchMemoryEmbeddingStore::search computes cosine similarity against every stored vector. Fine for <10k vectors.
  • Single Mutex per storeMemoryRunStore uses a single Mutex for atomic event append + projection update.

When to use

  • Tests and examples.
  • Local development.
  • Single-process deployments where persistence is handled externally (e.g. the caller serialises sessions).

When not to use

  • Multi-process deployments.
  • Production with durability requirements.
  • More than ~10k embedding vectors (use Qdrant).

See also

Related components

Edit this page on GitHub →