Skip to main content

Crate rig_memvid

Crate rig_memvid 

Source
Expand description

Memvid-backed persistent memory for Rig.

See the crate-level README for a quick-start. The two main types are:

Sharing a single MemvidStore between recall and persistence is the intended pattern: writes through the hook are visible to subsequent searches in the same process.

§Re-exports

memvid_core is re-exported so callers do not need to add it as a direct dependency to construct memvid_core::PutOptions, memvid_core::AclContext, or memvid_core::SearchRequest when reaching for MemvidStore::search / MemvidStore::put_text.

§Platform support

The crate is cfg-gated off on wasm: memvid relies on synchronous file I/O and a process-level file lock that have no analogue under wasm32-unknown-unknown. On wasm targets the crate is intentionally empty so that downstream crates can still depend on it transitively without a build break.

Re-exports§

pub use inmem::InMemoryError;
pub use memvid_core;

Modules§

inmem
Compatibility re-exports for the backend-agnostic in-memory reference store.

Structs§

CardDoc
Wire-format for a single card as projected into agent context.
FollowResult
Re-exports of the memvid-core memory-card surface that MemvidStore returns from MemvidStore::entity_memories and friends. Re-exported here so callers do not need a direct memvid-core dependency just to name the structured-memory types. Result from follow() traversal.
InMemoryHit
A retrieval hit returned by InMemoryStore::retrieve_similar.
InMemoryStore
Append-only in-memory episode store with deterministic lexical retrieval.
LogicMeshStats
Statistics about the logic mesh.
MemoryCard
Re-exports of the memvid-core memory-card surface that MemvidStore returns from MemvidStore::entity_memories and friends. Re-exported here so callers do not need a direct memvid-core dependency just to name the structured-memory types. A structured memory unit extracted from conversation content.
MemoryCardContext
A VectorStoreIndex that returns formatted MemoryCards instead of frame text. Generic over any MemoryGraph backend; defaults to MemvidStore so the common call site MemoryCardContext::new(store, _) continues to work without naming the type parameter.
MemoryConfig
Configuration for MemvidPersistHook.
MemoryConfigBuilder
Fluent builder for MemoryConfig.
MemvidFilter
A filter clause supported by MemvidStore.
MemvidPersistHook
Hook that records every user prompt and assistant response into a MemvidStore.
MemvidStore
A persistent, file-backed vector / lexical index over a memvid .mv2 archive.
MemvidStoreBuilder
Builder for MemvidStore.
MeshEdge
Re-exports of the memvid-core memory-card surface that MemvidStore returns from MemvidStore::entity_memories and friends. Re-exported here so callers do not need a direct memvid-core dependency just to name the structured-memory types. A directed edge in the logic mesh representing a relationship.
MeshNode
Re-exports of the memvid-core memory-card surface that MemvidStore returns from MemvidStore::entity_memories and friends. Re-exported here so callers do not need a direct memvid-core dependency just to name the structured-memory types. A node in the logic mesh representing an entity.
SearchHitEntity
Entity reference in search hit metadata.

Enums§

CardSelection
Strategy for choosing which memory cards to surface as context.
EntityKind
Re-exports of the memvid-core memory-card surface that MemvidStore returns from MemvidStore::entity_memories and friends. Re-exported here so callers do not need a direct memvid-core dependency just to name the structured-memory types. Entity classification.
MemoryKind
Re-exports of the memvid-core memory-card surface that MemvidStore returns from MemvidStore::entity_memories and friends. Re-exported here so callers do not need a direct memvid-core dependency just to name the structured-memory types. The kind of memory being stored.
MemvidError
Errors produced by rig-memvid.
Polarity
Re-exports of the memvid-core memory-card surface that MemvidStore returns from MemvidStore::entity_memories and friends. Re-exported here so callers do not need a direct memvid-core dependency just to name the structured-memory types. Polarity for preferences and boolean facts.
VersionRelation
Re-exports of the memvid-core memory-card surface that MemvidStore returns from MemvidStore::entity_memories and friends. Re-exported here so callers do not need a direct memvid-core dependency just to name the structured-memory types. How this card relates to prior versions of the same slot.
WriteFailure
What the MemvidPersistHook does when a frame fails to write.
WriteFailureAction
Decision returned by a WriteFailure::Custom callback.
WriteFailurePhase
Which stage of frame persistence raised the error.
WritePolicy
Strategy for what to write into the memvid archive on each turn.

Traits§

Episode
User-defined episode payload with a searchable natural-language summary.
MemoryGraph
Read-side abstraction over a structured-memory store.

Type Aliases§

MemoryCardId
Re-exports of the memvid-core memory-card surface that MemvidStore returns from MemvidStore::entity_memories and friends. Re-exported here so callers do not need a direct memvid-core dependency just to name the structured-memory types. Unique identifier for a memory card within an MV2 file.
WriteTransform
A function that decides what (if anything) to persist for a single message. Returning None skips the message.