isar_agent_memory 0.4.0
isar_agent_memory: ^0.4.0 copied to clipboard
Universal, local-first cognitive memory package for LLMs and AI agents. Graph-based, explainable, LLM-agnostic. Inspired by Cognee/Graphiti.
Changelog #
0.4.0 - 2025-11-25 #
Major Features #
-
HiRAG Phase 2: Complete implementation of advanced hierarchical RAG capabilities.
- Added
LLMAdapterinterface for LLM integration. - Implemented
autoSummarizeLayer()for automatic layer summarization using LLMs. - Implemented
multiHopSearch()for hierarchical context-aware retrieval. - Support for configurable prompt templates and search depth.
- Added
-
Cross-Device Sync Backends: Real-time synchronization infrastructure.
- Added
SyncBackendinterface with pluggable backend architecture. - Implemented
FirebaseSyncBackendfor Firebase Realtime Database. - Implemented
WebSocketSyncBackendfor custom WebSocket servers. - Added
CrossDeviceSyncManagerfor managing sync lifecycle. - Factory pattern for automatic backend selection.
- Stream-based real-time change propagation.
- Added
-
Advanced Re-ranking Strategies: Improve search relevance with multiple algorithms.
- Added
ReRankingStrategyinterface for extensible re-ranking. - Implemented
BM25ReRankerfor term frequency-based ranking. - Implemented
MMRReRankerfor Maximal Marginal Relevance (diversity + relevance). - Implemented
DiversityReRankerfor maximizing result variety. - Implemented
RecencyReRankerfor time-based relevance. - Integrated re-ranking into
semanticSearchWithReRanking()andhybridSearchWithReRanking().
- Added
Improvements #
-
API Enhancements:
- Extended
MemoryGraphwithsemanticSearchWithReRanking()method. - Extended
MemoryGraphwithhybridSearchWithReRanking()method. - Added
createdAtas optional parameter inMemoryNodeconstructor. - Improved query handling in
semanticSearch()for layer filtering.
- Extended
-
Architecture:
- All new classes properly exported in
isar_agent_memory.dart. - Clean separation between interfaces and implementations.
- Factory patterns for extensibility.
- All new classes properly exported in
-
Testing:
- Added
hirag_phase2_integration_test.dartfor LLM-based summarization. - Added
multi_hop_retrieval_test.dartfor hierarchical search. - Added
reranking_strategies_test.dartfor all re-ranking algorithms. - Added
advanced_retrieval_test.dartfor combined features. - Added
cross_device_sync_firebase_test.dartfor Firebase backend. - Added
cross_device_sync_websocket_test.dartfor WebSocket backend. - Added
sync_conflict_resolution_test.dartfor LWW conflict handling. - All core tests passing (13/13 ✅).
- Added
Dependencies #
- Added
firebase_coreandfirebase_databasefor Firebase backend. - Added
web_socket_channelfor WebSocket backend. - Updated
mockitoto ^5.4.4 for improved testing.
Documentation #
- Updated README.md with comprehensive documentation for all new features.
- Added usage examples for HiRAG Phase 2, sync backends, and re-ranking.
- Updated TASKS.md with completed sprint and new priorities.
- Documented
LLMAdapterinterface with implementation examples.
Breaking Changes #
None. All changes are backward compatible with v0.3.0.
Notes #
- WebSocket tests require mock generation via
build_runner. - Firebase backend requires valid Firebase configuration.
- LLM adapter implementations require external API keys (e.g., Gemini).
- All sync operations use AES-256-GCM encryption from v0.3.0.
0.3.0 - 2024-11-24 #
Major Features #
-
Sync Protocol: Implemented secure synchronization with Last-Write-Wins (LWW) conflict resolution using UUIDs.
- Added
SyncManagerclass for encrypted export/import of memory graphs. - Added
EncryptionServiceusing AES-256-GCM for client-side encryption. - Extended
MemoryNodeandMemoryEdgewith sync fields:uuid,modifiedAt,version,deviceId,isDeleted. - Documentation: Added
doc/SYNC_PROTOCOL.mddescribing architecture and reconciliation strategy.
- Added
-
HiRAG (Hierarchical RAG): Foundation for hierarchical knowledge management.
- Added
HierarchicalMemoryGraphextension withcreateSummaryNodeandgetNodesByLayermethods. - Added
layerfield toMemoryNodefor multi-level knowledge organization. - Support for summary and part-of relationships between nodes.
- Added
Improvements #
- Model Updates: Regenerated Isar and ObjectBox models to support new sync and HiRAG fields.
- Testing: Added integration test for sync functionality (
isar_agent_memory_tests/test/sync_integration_test.dart). - Testing: Added unit tests for
EncryptionServiceandSyncManager.
Dependencies #
- Added
cryptography: ^2.9.0for encryption support. - Added
json_annotation: ^4.9.0for JSON serialization.
Documentation #
- Updated
TASKS.mdto mark release 0.2.3 as completed. - Added comprehensive sync protocol documentation.
0.2.3 - 2024-11-24 #
- Fix: Critical bug in
OnDeviceEmbeddingsAdapter- correctedoutputs.values.firsttooutputs.first. - Fix: Corrected invalid Mermaid diagram syntax in README (ASCII art → valid Mermaid).
- Fix: Moved
httpfrom dev_dependencies to dependencies for tool scripts. - Improvement: Replaced
forEachwith for loops in resource cleanup (better Dart practice). - CI/CD: Disabled automatic benchmark workflow trigger (manual only) and added Linux desktop support.
- Chore: Added
test_resources/andtool/to.pubignoreto reduce package size.
0.2.2 - 2025-08-18 #
- New Feature: Added
OnDeviceEmbeddingsAdapterusingonnxruntimefor privacy-first, local embedding generation. - New Feature: Implemented a basic
WordPieceTokenizerfor BERT-based models. - Improvement: Enhanced
MemoryGraphrobustness with a fallback mechanism (linear scan) when vector index operations fail (e.g., dimension mismatch). - Improvement: Added explicit dimension validation in
ObjectBoxVectorIndexto prevent native crashes. - Documentation: Translated
README.mdandTASKS.mdto 100% English. Added instructions for On-Device Embeddings. - Dependencies: Updated
langchainto^0.8.0,objectboxto^5.0.0,langchain_googleto^0.7.0, and addedonnxruntime^1.4.1. - Refactor: Removed deprecated
vector_index_dvdb.dart.
0.2.1 - 2025-08-17 #
- CI/CD: Added
publish-to-pub-dev.ymlworkflow for automated publishing on release creation or manual dispatch. - Credentials: Documented usage of
PUB_CREDENTIALS_JSONsecret. - Maintenance: Minor release preparation and local validation.
0.2.0 - 2025-08-17 #
- Major Cleanup: Removed DVDB as a vector backend.
- Deleted
dvdbdependency and public export. - Retained
vector_index_dvdb.dartas a deprecated stub (now removed in 0.2.2). - Established ObjectBox as the sole supported on-device ANN (HNSW) backend.
- Deleted
- Testing:
- Introduced
InMemoryVectorIndexfor plugin-free unit testing. - Removed
isar_flutter_libsfrom the test subproject. - Fixed similarity metric consistency (cosine/L2/dot) in memory index.
- Introduced
- Documentation:
- Cleaned up references to DVDB in docs.
- Clarified ObjectBox default usage.
- Fixed linting issues.
0.1.2 - 2025-07-10 #
- Fix: Resolved JavaScript error in Isar generated files by integrating
build_runner.
0.1.1 - 2025-07-10 #
- Documentation: Added comprehensive dartdoc comments to public APIs.
- Linting: Fixed various linting and formatting issues.
- Publishing: Corrected pub.flutter-io.cn topics for successful publication.
0.1.0 - 2025-07-09 #
- Initial release: Isar agent memory graph with ANN search, explainability, robust tests, and modern CI/CD automation (Coderabbit, Renovate, Dependabot, Jules).