LangChain implementation for MemVid (video-based vector storage)
Project description
Langchain Memvid
A Langchain implementation for Memvid, enabling efficient video-based document storage and retrieval using vector embeddings.
Memvid revolutionizes AI memory management by encoding text data into videos, enabling lightning-fast semantic search across millions of text chunks with sub-second retrieval times. Unlike traditional vector databases that consume massive amounts of RAM and storage, Memvid compresses your knowledge base into compact video files while maintaining instant access to any piece of information.
Saleban Olow, author of memvid, 5th of June, 2025
Overview
Langchain Memvid is a powerful tool that combines the capabilities of Langchain with video-based document storage. It allows you to store text chunks in video frames using QR codes and retrieve them efficiently using vector similarity search. This approach provides a unique way to store and retrieve information while maintaining visual accessibility.
Features
- Vector Store Integration: Seamless integration with Langchain's vector store interface
- Video-based Storage: Store text chunks in video frames using QR codes
- Efficient Retrieval: Fast similarity search using FAISS indexing
- Flexible Configuration: Customizable settings for encoding, indexing, and retrieval
- Multiple Embedding Models: Support for various embedding models through Langchain
- Granular Control: Access to low-level components for fine-tuned control
- Comprehensive Testing: Extensive test suite with performance benchmarks
Installation
pip install langchain-memvid
For development and testing:
pip install -e ".[test]"
Quick Start
For a complete quick start guide, see our quickstart.py example.
For detailed explanations and interactive examples, check out quickstart.ipynb.
IPython Extension (Optional)
For enhanced Jupyter notebook and IPython experience, use the optional IPython extension:
%pip install langchain-memvid
%load_ext ipykernel_memvid_extension
The extension provides magic commands for:
- Displaying data as bullet lists and tables (
%as_bullet_list,%as_table) - Automatic cleanup of temporary files (
%cleanup) - Package installation with visual feedback (
%pip_install) - Sound notifications for cell completion
- Enhanced progress bars
For detailed usage instructions, see IPYTHON_EXTENSION.md.
Examples
We provide comprehensive examples in multiple formats to help you get started:
📓 Jupyter Notebooks (Interactive)
The most detailed examples with explanations and visual outputs:
- quickstart.ipynb - Basic tutorial demonstrating core functionality
- advanced.ipynb - Advanced features and customization options
📄 Python Scripts (Executable)
Auto-generated Python files from the notebooks:
- quickstart.py - Basic usage example
- advanced.py - Advanced usage example
Running the Examples
- Interactive (Recommended): Open the
.ipynbfiles in Jupyter - Script: Run the
.pyfiles directly with Python
The Python files are automatically generated when notebooks are executed, ensuring they stay in sync.
Testing
For comprehensive testing information, including unit tests, test coverage, and continuous integration details, see TESTING.md.
Benchmarking
For detailed benchmarking information, including performance tests, benchmark categories, and result interpretation, see BENCHMARKING.md.
Advanced Usage
For comprehensive advanced usage examples, see our advanced.py example.
For detailed explanations and interactive examples, check out advanced.ipynb.
Requirements
- Python >= 3.12
- OpenCV or/and ffmpeg
- FAISS
- Langchain
- Other dependencies as specified in pyproject.toml
License
This project is licensed under the BSD-3-Clause License - see the LICENSE file for details.
For information about third-party licenses, see LICENSES.md.
Acknowledgments
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_memvid-0.1.11.tar.gz.
File metadata
- Download URL: langchain_memvid-0.1.11.tar.gz
- Upload date:
- Size: 58.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22d9df9674e7195e0ddb55019bda91a2afa9dbb9608913bb58036ae4df86b870
|
|
| MD5 |
6d008f7fa021353a74ea4b46023bdfec
|
|
| BLAKE2b-256 |
f7ac80fcee47837fb227a55f5d3fa33e0fa3d67718e75aca207d646b59cd7757
|
File details
Details for the file langchain_memvid-0.1.11-py3-none-any.whl.
File metadata
- Download URL: langchain_memvid-0.1.11-py3-none-any.whl
- Upload date:
- Size: 40.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d46ccf2d7ff4587c19c3d1a3e4babfa633a82ff50c9ad5b83dfe1668846265e
|
|
| MD5 |
2e45945c58e434d48b78ce05531d1eec
|
|
| BLAKE2b-256 |
cbe8772ad8769828f0765a4f67e1d2aa6bb25e7c0f189721e8ed658d5c75c4f8
|