Use this file to discover all available pages before exploring further.
Memory cards transform unstructured text into structured knowledge - entity-attribute-value triples that enable O(1) lookups, fact tracking, and relationship queries. Enrichment is the process of automatically extracting these cards from your content.
# Query single entitymemvid state memory.mv2 --entity "John Smith"# JSON outputmemvid state memory.mv2 --entity "John Smith" --json
Output:
Entity: John SmithCurrent State: job_title: Senior Engineer team: Platform reports_to: Jane Doe expertise: Rust, Python location: San Francisco start_date: 2022-03-15Last updated: 2024-12-30T14:22:00ZSource frames: 12
# Infer schema from existing factsmemvid schema infer memory.mv2# List current schemasmemvid schema list memory.mv2# Manually define predicate typememvid schema set memory.mv2 job_title stringmemvid schema set memory.mv2 employee_count integermemvid schema set memory.mv2 is_active boolean
Output:
Predicate Schema: job_title: string (inferred from 45 facts) team: string (inferred from 32 facts) employee_count: integer (inferred from 12 facts) founded: date (inferred from 8 facts) headquarters: string (inferred from 8 facts) is_public: boolean (inferred from 5 facts)
from memvid import usemem = use('basic', 'memory.mv2')# Enrich documentsmem.enrich(engine="groq")# Get current entity state (O(1) lookup)john = mem.get_entity_state("John Smith")print(f"Job: {john['job_title']}")print(f"Team: {john['team']}")# Get all facts for an entityfacts = mem.get_facts(entity="John Smith")for fact in facts: print(f"{fact.slot}: {fact.value} (from {fact.source_frame})")# Get fact history for specific attributetitle_history = mem.get_facts( entity="John Smith", predicate="job_title")for fact in title_history: print(f"{fact.extracted_at}: {fact.value}")# Query preferencesprefs = mem.get_preferences(entity="user")print(f"Preferred language: {prefs.get('preferred_language')}")# Get memory timelinetimeline = mem.get_memory_timeline(entity="Project Alpha")for event in timeline: print(f"{event.timestamp}: {event.slot} = {event.value}")
Frame 001: John Smith → team = "Backend" [SETS]Frame 045: John Smith → team = "Platform" [UPDATES]Frame 089: John Smith → team = "Platform" [no change, skipped]Frame 112: John Smith → team = "Infrastructure" [UPDATES]
Query the current value:
memvid state memory.mv2 --entity "John Smith"# team: Infrastructure
Query the history:
memvid facts memory.mv2 --entity "John Smith" --predicate team# Shows all 3 values with timestamps and sources
Same entity + slot: Keeps highest confidence value
Same value: Skips if already exists
Different sources: Tracks all sources for provenance
# These produce one card, not threemem.put("John works as an engineer") # Extracts: job_title = engineermem.put("John is an engineer at Acme") # Same fact, different sourcemem.put("John Smith - Engineer") # Same fact, skipped
# Ingest your notesmemvid put brain.mv2 --input ~/notes/# Extract knowledgememvid enrich brain.mv2 --engine groq# Query what you know about someonememvid state brain.mv2 --entity "Sarah from Marketing"
# Transcribe and ingestmemvid put meetings.mv2 --input recording.mp3# Enrich with Claude for best accuracymemvid enrich meetings.mv2 --engine claude# Find all action items assigned to Johnmemvid facts meetings.mv2 --entity "John" --predicate assigned_action