LlamaIndex chat store backed by SuperLocalMemory V2 — 100% local, zero cloud
Project description
LlamaIndex Chat Store — SuperLocalMemory V2
A LlamaIndex BaseChatStore implementation backed by SuperLocalMemory V2. All chat history stays 100% local on your machine — zero cloud calls, zero telemetry, zero API keys.
Prerequisites
- Python 3.9+
- SuperLocalMemory V2 installed (
~/.claude-memory/must exist)
# Install SuperLocalMemory V2 (one-time)
curl -fsSL https://raw.githubusercontent.com/varun369/SuperLocalMemoryV2/main/install.sh | bash
Installation
pip install llama-index-storage-chat-store-superlocalmemory
Quick Start
from llama_index.core.memory import ChatMemoryBuffer
from llama_index.core.base.llms.types import ChatMessage, MessageRole
from llama_index.storage.chat_store.superlocalmemory import SuperLocalMemoryChatStore
# Create the chat store (uses default SLM database)
chat_store = SuperLocalMemoryChatStore()
# Use with ChatMemoryBuffer for automatic conversation management
memory = ChatMemoryBuffer.from_defaults(
chat_store=chat_store,
chat_store_key="user-123",
token_limit=3000,
)
# Or use directly for manual message management
chat_store.add_message("session-1", ChatMessage(role=MessageRole.USER, content="Hello!"))
chat_store.add_message("session-1", ChatMessage(role=MessageRole.ASSISTANT, content="Hi there!"))
messages = chat_store.get_messages("session-1")
print(messages) # [ChatMessage(role=user, content="Hello!"), ChatMessage(role=assistant, content="Hi there!")]
# List all session keys
keys = chat_store.get_keys()
# Delete a session
chat_store.delete_messages("session-1")
Features
- 100% Local — All data stored in SQLite at
~/.claude-memory/memory.db - Zero Cloud — No API keys, no subscriptions, no data leaves your machine
- Shared Memory — Chat history is accessible from Claude, Cursor, Windsurf, and 16+ other AI tools via SuperLocalMemory
- Session Isolation — Each chat key is cleanly isolated using SLM tags
- Persistent — Survives process restarts (SQLite-backed, not in-memory)
- Full BaseChatStore API —
set_messages,get_messages,add_message,delete_messages,delete_message,delete_last_message,get_keys - Async Support — Async methods inherited from BaseChatStore (delegates to sync via
asyncio.to_thread)
How It Works
Each chat message is stored as a separate memory entry in SuperLocalMemory V2:
- Content: JSON-serialized
{role, content, additional_kwargs} - Tag:
llamaindex:chat:<session_key>for session isolation - Project:
llamaindexfor easy identification - Importance: 3 (low, since chat messages are transient)
Custom Database Path
# Use a custom database file
chat_store = SuperLocalMemoryChatStore(db_path="/path/to/custom/memory.db")
Links
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 llama_index_storage_chat_store_superlocalmemory-0.1.0.tar.gz.
File metadata
- Download URL: llama_index_storage_chat_store_superlocalmemory-0.1.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16042a58c4714f95486ba5fba63818e94f6b5b8ebb009c90020b5cef83166b4a
|
|
| MD5 |
6b8f6eb3c75faf1a1e6ce0c7787560cd
|
|
| BLAKE2b-256 |
e1878fe1feea2ea9561aa2125aa8d6783b66fd7d39b514111c7a470e30aed193
|
File details
Details for the file llama_index_storage_chat_store_superlocalmemory-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_storage_chat_store_superlocalmemory-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d321ea5dc5059d550ae7dbc70ce07a9c098c35ec0b6bac5b2874cf958cfe1d91
|
|
| MD5 |
81d278a9dc93c4625be4ff49bcd9a2f8
|
|
| BLAKE2b-256 |
e5c4133a0d4bb0621bf21b0c96283cee1af6e349d2ea5eb4ae9a5b20f3662c36
|