Memory Vault AI
Persistent, context-aware memory for any AI assistant.
Memory Vault AI is an open-source Python library and REST API that gives AI models the ability to remember users across sessions — automatically, efficiently, and with full privacy control.
import asyncio
from memory_vault import MemoryLayer
async def main() -> None:
memory = MemoryLayer(user_id="user-123")
# Save a conversation turn
await memory.save("I'm building a FastAPI app using PostgreSQL")
# Later — in a new session — recall relevant context
result = await memory.recall("What database is the user using?")
print(result.prompt_block)
asyncio.run(main())
Why Memory Vault AI?
| Problem | Memory Vault AI |
|---|---|
| AI forgets everything between sessions | Persistent memory across unlimited sessions |
| Context window fills up with history | Smart compression and retrieval, not raw history dump |
| Tied to one model or cloud vendor | Model-agnostic: Claude, GPT, Ollama, any LLM |
| No privacy control | User-scoped memory, full delete support, local-first option |
| Black-box memory | Introspectable: view and edit what the system knows |
Features
- Four memory types — episodic, semantic, working, procedural
- Semantic retrieval — vector similarity search, not keyword matching
- Token-budget-aware — never overflows your LLM's context window
- Auto-compression — old memories summarized, not deleted
- Local-first — runs fully offline with ChromaDB + local embedding models
- MCP-compatible — plug directly into Claude, Cursor, and any MCP-enabled tool
- REST API + Python SDK — use as a service or import as a library
- CLI debug tools — inspect, search, compress, and manage memories from the terminal
- Custom memory type plugins — extend ingestion routing with pluggable classifiers
Quick Start
pip install "memory-vault[all]"
import asyncio
from memory_vault import MemoryLayer
async def main() -> None:
# Embedded mode (no server needed)
memory = MemoryLayer(user_id="alice")
await memory.save("My name is Alice, I'm a backend engineer.")
await memory.save("I prefer concise answers with code examples.")
context = await memory.recall("Tell me about the user")
print(context.prompt_block)
asyncio.run(main())
Or run as an API server:
uvicorn memory_vault.api.main:app --port 8000
Memory introspection UI is available at http://localhost:8000/ui.
Or run with Docker Compose (API + Qdrant):
docker compose up --build
Then open:
http://localhost:8000/v1/healthhttp://localhost:8000/docshttp://localhost:8000/ui
Documentation
Documentation Website
Build and run the docs as a simple website:
pip install -e ".[docs]"
python -m mkdocs serve
Then open http://127.0.0.1:8000.
To build static HTML output:
python -m mkdocs build
Publish Documentation to GitHub Pages
This repository includes an automated Pages workflow at .github/workflows/docs-pages.yml.
To make docs publicly accessible without local setup:
- Push to branch
main. - Open GitHub repository settings.
- Go to Pages.
- Set source to
GitHub Actions. - Wait for workflow
Docs Pagesto complete.
Public URL format:
https://zidanmubarak.github.io/Memory-Vault-AI/
| Document | Description |
|---|---|
| Architecture | System design and component overview |
| Memory Logic | How ingestion, retrieval and compression work |
| API Reference | REST endpoint contracts |
| SDK Guide | Using Memory Vault as a Python library |
| MCP Integration | Connecting to Claude Code, Cursor, etc. |
| Benchmarking Guide | Running performance benchmark suite and baselines |
| Plugin System Guide | Building and registering custom memory type plugins |
Tech Stack
- Python 3.11+ · FastAPI · Pydantic v2
- ChromaDB (local) / Qdrant (production)
- SQLite via SQLModel for metadata
- sentence-transformers for local embeddings
- Typer + Rich for CLI
- AsyncIO for background jobs
Project Status
v0.1 — Active development. Core ingestion and retrieval being built. See milestone tracking in the GitHub repository issues/projects.
Contributing
Contributions are welcome. Use GitHub Issues and Pull Requests in this repository.
License
MIT — see LICENSE.
Metadata
Release files for memory-vault 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| memory_vault-0.1.2.tar.gz | 127.7 kB | Without provenance | Details for memory_vault-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| memory_vault-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for memory_vault-0.1.2-py3-none-any.whl |
Total release size: 203.9 kB
Release files / memory_vault-0.1.2.tar.gz
| Download URL | memory_vault-0.1.2.tar.gz |
|---|---|
| Size | 127.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8d156b382edba4b3fe465b7dd278cf6c30606eac36bfa063a87b2c34b5bf55f
|
|
BLAKE2b-256 checksum How to use checksums |
b862be97791038c98d93ad00c2427b9c7228eb81289fa438e9ee5f7fdc06df30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|
Release files / memory_vault-0.1.2-py3-none-any.whl
| Download URL | memory_vault-0.1.2-py3-none-any.whl |
|---|---|
| Size | 76.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45991ff7deafdb3ea80fe180ecbf66ad774e8d8efe90c78ad4f96d79f2469fbb
|
|
BLAKE2b-256 checksum How to use checksums |
b63b5dcd860b52ee66a0624c1cda732b8174871fb86bf88ed3b7d29612ea97b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|
Security for memory-vault 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.