Release Date: December 23, 2025
This is a major release featuring significant architectural improvements, enhanced type safety, and comprehensive test coverage. It also includes the tool description optimizations from v0.11.13.
- 81% Test Coverage - Up from 70%, with 1,578 tests passing
- Type-Safe Backend Interface - New
MemoryOperationsProtocol - Cleaner Tool Handlers - 40% less boilerplate with
@handle_tool_errorsdecorator - Optimized Tool Descriptions - Better LLM guidance for
recall_memoriesvssearch_memories
A new type-safe interface (src/memorygraph/protocols.py) that defines the common operations all backends must support. This enables better IDE support, type checking, and clearer API contracts.
from memorygraph.protocols import MemoryOperations
def process_memories(backend: MemoryOperations):
# Type-safe operations across any backend
await backend.store_memory(memory)
await backend.search_memories(query)New centralized registry (src/memorygraph/tools/registry.py) that maps tool names to handlers, replacing the previous if/elif dispatch chain. This improves maintainability and makes adding new tools easier.
The @handle_tool_errors decorator (src/memorygraph/tools/error_handling.py) provides consistent error handling across all tool handlers, reducing boilerplate by ~40%.
@handle_tool_errors("store memory")
async def handle_store_memory(memory_db, arguments):
# Just the happy path - errors handled by decorator
...New validation utilities (src/memorygraph/utils/validation.py) including:
- Content size limits (50KB max)
- Tag normalization with Pydantic field validators
- Consistent validation across all inputs
All backends now implement is_cypher_capable() for runtime capability checking:
- Graph backends (Neo4j, Memgraph, FalkorDB): Returns
True - REST backends (Cloud): Returns
False - SQLite: Returns
False
Updated MCP tool descriptions to guide LLMs on when to use each search tool:
recall_memories - Best for:
- Conceptual queries ("how does authentication work")
- Fuzzy matching and natural language
search_memories - Best for:
- Acronyms (DCAD, JWT, API)
- Proper nouns and technical terms
- Known tags
- Exact matching
store_memory - New guidance:
- Tag acronyms explicitly for reliable retrieval
- Example: A memory about "DCAD - Dallas County Appraisal District" should have tags:
["dcad", "dallas-county", "property-lookup"]
- Renamed internally to
CloudRESTAdapterto reflect its REST API nature - Backwards-compatible
CloudBackendalias maintained - Documented in ADR-018
All code now uses datetime.now(timezone.utc) instead of the deprecated datetime.utcnow(), ensuring timezone-aware datetime handling throughout.
- LSP Violation: CloudBackend no longer violates Liskov Substitution Principle
- Timezone Safety: Fixed naive vs aware datetime comparison issues
- SDK Model Sync: SDK models now properly synchronized with server models
- Neo4j Optional Dependency: Tests properly skip when neo4j package not installed
| Module | Before | After |
|---|---|---|
cli.py |
6% | 92% |
backends/factory.py |
20% | 99% |
tools/activity_tools.py |
12% | 98% |
tools/error_handling.py |
- | 100% |
tools/registry.py |
- | 100% |
tools/validation.py |
- | 100% |
analytics/advanced_queries.py |
29% | 96% |
cloud_database.py |
44% | 100% |
sqlite_database.py |
5% | 85% |
tests/test_cli_coverage.pytests/backends/test_factory_coverage.pytests/tools/test_activity_tools_coverage.pytests/tools/test_temporal_tools_coverage.pytests/tools/test_error_handling.pytests/tools/test_registry.pytests/tools/test_validation.pytests/analytics/test_advanced_queries_coverage.pytests/test_cloud_database_coverage.pytests/test_sqlite_database_coverage.py
- 1,578 tests passing
- 139 skipped (neo4j optional dependency)
- 3 warnings (minor async mock warnings)
None. All changes are backwards compatible.
No migration required. Existing code will continue to work without changes.
-
Use the new Protocol for type hints:
from memorygraph.protocols import MemoryOperations
-
Check backend capabilities at runtime:
if backend.is_cypher_capable(): # Use Cypher-specific features
-
Update tag strategy for acronyms:
- Add acronyms as explicit tags when storing memories
- Use
search_memorieswith tag filters for acronym lookups
- ADR-018: Architecture Decision Record for CloudBackend type hierarchy
- WORKPLAN-24: Detailed implementation plan for architectural fixes
- Gregory Dickson
- Claude Opus 4.5 (AI pair programmer)
See CHANGELOG.md for the complete list of changes.