Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.5.1] - 2025-12-29
Fixed
- LangGraph Subgraph Support: Previously,
MemStateCheckpointerignored thecheckpoint_ns(namespace) parameter. This caused state collisions when using nested graphs (subgraphs) within the same thread. Now, checkpoints are strictly isolated by boththread_idandcheckpoint_ns.
Performance
- New Indexes: Added functional indexes for
payload.checkpoint_nsin both PostgreSQL (B-Tree on JSONB path) and SQLite. This ensures fast state retrieval for complex agent workflows without full table scans.
Changed
- Checkpointer Logic: Updated
putandaputmethods in LangGraph integrations to explicitly persist thecheckpoint_nsfield within the fact payload.
[0.5.0] - 2025-12-23
Major Feature: Hybrid Structured-Semantic Search
MemState moves beyond just storing data to retrieving it intelligently. This release adds a unified search API that combines Vector Similarity with SQL-like strict filtering.
- New
store.search()API: Finds relevant IDs in the Vector DB and hydrates them with fresh data from the SQL Storage (Source of Truth).- Supports
query(text for embedding). - Supports
filters(metadata filtering). - Supports
score_threshold(cutoff for relevance).
- Supports
- Safety First: Search results are cross-referenced with the Storage backend. If a vector index finds a "ghost" ID (deleted in SQL), MemState automatically filters it out, preventing hallucinations.
Integrations
- Qdrant Search: Implemented search using the modern
query_pointsAPI.- DX Magic: Added automatic translation of simple dictionary filters (
{"role": "user"}) into Qdrant's complexmodels.Filtersyntax.
- DX Magic: Added automatic translation of simple dictionary filters (
- ChromaDB Search: Implemented semantic search with metadata filtering.
Breaking Changes (for Custom Hooks)
- The
MemoryHookandAsyncMemoryHookprotocols now require asearchmethod.- If you have implemented custom hooks, you must add a
searchmethod (it can return an empty list[]if retrieval is not supported).
- If you have implemented custom hooks, you must add a
Documentation
- Added Hybrid Search section to Core Concepts.
[0.4.0] - 2025-12-18
Major: Async Support & Beta Release
This release marks the transition to Beta. The API is stable, and MemState is now ready for high-concurrency production workloads (FastAPI).
- Full Async Support: Added
AsyncMemoryStoreand async versions of all backends and hooks. - New Storage Backends:
- PostgreSQL: Native support using
SQLAlchemy+psycopgwith efficient JSONB querying. - Redis: Added
AsyncRedisStorage. - SQLite: Added
AsyncSQLiteStorage(viaaiosqlite).
- PostgreSQL: Native support using
- New Vector Integration: Added Qdrant support (Sync & Async) with built-in FastEmbed generation.
Changed (Architectural Improvements)
- Surgical Rollback: Completely rewrote
rollbacklogic to be safe in multi-user environments.- Added
session_idisolation to transaction logs. - Rollback now removes specific transactions by UUID instead of truncating the log tail, preventing "Groundhog Day" bugs.
- Added
- Safe Updates: The
update()method now enforces Schema Re-validation. Applying a patch that breaks the Pydantic schema will now raiseValidationFailedinstead of corrupting the DB. - Session Optimization: Added
get_session_factsto backends to utilize DB indexes for session operations (O(1) vs O(N) previously).
Added
- LangGraph Async: Added
AsyncMemStateCheckpointerfor non-blocking graph persistence. - DX Improvements: Added
session_idargument toquery()for easier context filtering. - Documentation: Launched comprehensive documentation site.
Dependencies
- Added optional dependencies:
postgres,qdrant,sqlite-async.
[0.3.3] - 2025-12-12
Added
- New
commit_modelAPI: You can now pass Pydantic instances directly to memory. - No more manual dictionary dumping:
mem.commit_model(user)instead ofmem.commit(Fact(type="user", payload=user.dict())). - Automatically resolves registered schema types.
- Supports both INSERT (auto ID) and UPDATE (explicit
fact_id).
Documentation
- README Overhaul: rewritten to focus on the "Mental Model" of transactional memory and the physical physics of "Data Drift".
- Refactored Examples: All examples (
examples/) updated to use the cleanercommit_modelsyntax.
Fixed
- Lifecycle Logic: Ensured
commit_modelcorrectly handles updates whenfact_idis provided (previously defaulted to creating duplicates).
[0.3.2] - 2025-12-04
Fixed
- Critical Atomicity Fix: The
commit()method now implements a proper "Compensating Transaction" pattern.- Previously, if a vector sync hook (e.g., ChromaDB) failed, the SQL data remained committed, breaking the "ACID-like" promise.
- Now, if a hook fails, the SQL transaction is automatically rolled back (or restored to the previous state).
- Singleton Logic: Fixed a bug where updating a Singleton fact (e.g., "One User Profile") would return early and skip vector synchronization.
Documentation
- New Positioning: Updated README to focus on "Transactional Memory" and "Predictability" rather than generic agent state.
- Demo: Added a video demonstration (GIF) showing MemState preventing hallucinations vs Manual Sync.
[0.3.1] - 2025-12-04
Changed
- DX Improvement: Exposed main classes (
MemoryStore,Fact,Operation, etc.) directly in the top-level package. - Now you can use:
from memstate import MemoryStoreinstead of importing from submodules. - Internal: Switched to dynamic versioning (single source of truth in
pyproject.toml).
[0.3.0] - 2025-12-03
Added
- RAG Synchronization: Introduced
ChromaSyncHookto keep structured state and Vector DBs in perfect sync. - Transactional Vector Ops: Vector embeddings are now atomic — they are only updated/deleted upon
COMMIT, preventing "ghost data" from draft sessions. - Flexible Mapping: Added support for custom
text_formatterandmetadata_formatterto control how Pydantic models map to vector documents. - New installation extras:
pip install memstate[chromadb].
Changed
- Positioning: Rebranded documentation to focus on ACID-like atomicity for hybrid memory (SQL + Vector), moving away from the generic "Git for memory" messaging.
[0.2.0] - 2025-11-26
Added
- LangGraph Integration: Added
MemStateCheckpointerfor persisting agent graphs. - New installation extras:
pip install memstate[langchain](includeslanggraph).
[0.1.0] - 2025-11-25
Added
- Initial release of MemState.
- Core transactional memory engine (
MemoryStore). - Strict schema validation using Pydantic (
register_schema). - Backends:
InMemoryStorage,RedisStorage,SQLiteStorage(with JSON1 query support). - Feature: Time Travel / Rollback (
memory.rollback). - Feature: Constraints (
Singleton,Immutable).