Repository navigation
v0.3.0 - RAG Synchronization & ACID Consistency
This release marks a major strategic shift for MemState. We are evolving from a "Git-like" tool into a Hybrid Memory Engine that ensures atomicity between your structured data (SQL) and semantic data (Vector DBs).
⚡ Key Feature: Automatic RAG Sync
The biggest pain in AI Agents is "Split-Brain" memory: when the SQL database is updated, but the Vector DB still holds old embeddings, causing hallucinations.
MemState v0.3.0 solves this with ChromaSyncHook:
- Transactional Integrity: Vector embeddings are only created/updated when the transaction
commits. No more "ghost data" from failed or discarded sessions. - Automatic Cleanup: When a fact is deleted via
rollback()ordelete(), it is instantly removed from the vector store. - Zero Boilerplate: No need to manually write
collection.upsert()in your business logic.
🛠 New API
import chromadb
from memstate.integrations.chroma import ChromaSyncHook
# 1. Setup Chroma
chroma_client = chromadb.Client()
# 2. Attach the Hook
# Automatically syncs the 'content' field to ChromaDB on commit
hook = ChromaSyncHook(
client=chroma_client,
collection_name="agent_memory",
text_field="content",
metadata_fields=["role", "created_at"]
)
memory = MemoryStore(storage, hooks=[hook])📦 Installation
To get the new vector capabilities:
pip install memstate[chromadb]🔄 Changes
- Feature: Added
memstate.integrations.chromawith strict Dependency Injection support. - Feature: Added support for custom
text_formatterandmetadata_formatterstrategies for flexible Schema-to-Vector mapping. - Documentation: Rebranded project as an "ACID-like state manager" to emphasize data consistency guarantees.