Installation
Requirements: Python 3.8+, macOS/Linux/Windows. Native bindings included - no extra dependencies needed.
Quick Start
API Reference
Context Manager
Core Functions
File Operations
Context Manager Support
Auto-Embedding
The SDK automatically enables vector embeddings whenOPENAI_API_KEY is set in your environment:
- If
OPENAI_API_KEYis set andenable_embeddingis not specified, embeddings are auto-enabled - Uses OpenAI’s
text-embedding-3-smallmodel (1536 dimensions) - If no API key is present and no model specified, falls back to local
bge-small(384 dimensions)
Data Ingestion
put() - Add Single Document
put_many() - Batch Ingestion
put_file() - Document Parsing
Ingest documents directly from files. Supports PDF, DOCX, XLSX, PPTX, and more. The SDK automatically extracts text content and creates searchable frames.put_files() - Batch Document Ingestion
Ingest multiple documents at once:Supported Formats:
- PDF - Text extraction with page-aware chunking
- DOCX - Microsoft Word documents
- XLSX - Excel spreadsheets (all sheets, formulas evaluated)
- PPTX - PowerPoint presentations (slide text and notes)
For XLSX files with formulas, the SDK extracts the calculated values, not the formula text. This ensures searchable, meaningful content.
Search & Retrieval
find() - Hybrid Search
Query Syntax: Multi-word queries use OR logic by default for better recall. Use
AND for intersection: "machine AND learning". Use quotes for exact phrases: '"machine learning"'.Permission-Aware Retrieval (ACL)
See Permission-Aware Retrieval (ACL) for the full model. At a high level:- Write per-frame ACL metadata during ingestion (
metadata["acl_*"]) - Pass
acl_context+acl_enforcement_mode="enforce"tofind()/ask()
ask() - LLM Q&A
Grounding & Hallucination Detection
Theask() response includes a grounding object that measures how well the answer is supported by context:
Follow-up Fields:
correct() - Ground Truth Corrections
Store authoritative corrections that take priority in future retrievals:Memory Cards (Entity Extraction)
Automatic Enrichment
Manual Memory Cards
Export Facts
Table Extraction
Time-Travel & Sessions
Timeline Queries
Session Recording
Encryption & Security
Tickets & Capacity
Cloud Project & Memory Management
Programmatically create projects and memories on the Memvid dashboard, then bind local.mv2 files to them.
Configure SDK
Create and List Projects
Create and List Memories
Bind Local File to Cloud Memory
Complete Example
Embedding Providers
External Providers
Local Embeddings (No API Required)
Error Handling
Asset Extraction
Utility Functions
Environment Variables
Next Steps
Quickstart
Build your first AI memory in 5 minutes
Embedding Providers
Compare local and external embedding options
Framework Integrations
LangChain, LlamaIndex, and more
Memory Cards
O(1) entity lookups and fact extraction