Releases: jihadkhawaja/mem0sharp
Release list
v0.2.1
[v0.2.1] - 2026-08-16
Added
- Admission Gate Defense Layer: Added
NoveltyAdmissionGate,PromptInjectionAdmissionGate, andCompositeAdmissionGateto reject duplicate or malicious memory candidates before persistence. - Trajectory Tracking: Extended
MemoryServiceand the public contracts with trajectory persistence support, includingAppendTrajectoryAsync,GetTrajectoriesAsync, and on-demand extraction from stored trajectories. - History Rollback Support: Added rollback and history restoration APIs to in-memory and persistence-backed stores, including
RollbackAsyncandRollbackToHistoryAsync.
Improved
- Memory Lifecycle Safety: Hardened consolidation and stale-memory workflows by combining rollback/trajectory tracking with stricter admission filtering and verification paths.
- Test Coverage: Expanded unit tests for admission gates, consolidation behavior, and memory behavior scenarios to cover the new safeguards and lifecycle features.
Full Changelog: v0.2.0...v0.2.1
v0.2.0
[v0.2.0] - 2026-08-15
⚠️ Breaking Changes
- Storage Interface Consolidation: Merged 8 fragmented storage interfaces (
IVectorMemoryStore,IBulkMemoryStore,IBatchMemoryStore,IAtomicMemoryStore,IBatchVectorMemoryStore,IMemoryHistoryStore,IResettableMemoryStore) into a single cohesiveIMemoryStore. - Embedding Generator Consolidation: Merged
IBatchEmbeddingGeneratorintoIEmbeddingGeneratorwith default interface fallback. - Memory Extractor Consolidation: Merged
IBehaviorAwareMemoryExtractorintoIMemoryExtractorwithExtractAsync(messages, options, ct). - Canonical Service Signatures: Standardized
IMemoryServiceandMemoryServicearound canonical options records (MemoryAddOptions,MemorySearchOptions,MemoryPageOptions,MemoryUpdate).
Added
-
SIMD Hardware Acceleration: Integrated
System.Numerics.Tensorsacross vector cosine similarity (TensorPrimitives.CosineSimilarity), vector normalization (TensorPrimitives.Norm), and vector scaling (TensorPrimitives.Divide). -
Native Qdrant REST Search: Implemented native REST vector search via
POST collections/{name}/points/searchandPOST collections/{name}/points/search/batchwith payload filter translation. -
SQLite SQL Pushdown: Pushed down
user_id,agent_id,run_id,scope,behavior,memory_type, andexpires_atfilters directly into parameterized SQLWHEREclauses, streaming records viaIAsyncEnumerable<Memory>. -
PostgreSQL Graph Store Query Pushdown: Term pattern matching for graph boost calculations pushed down to database index scans with
ILIKE ANY($1)instead of full table scans. -
Concurrent LLM Reranking: Added bounded concurrent scoring with
Parallel.ForEachAsync(MaxDegreeOfParallelism = 8) inLlmReranker. -
Reverse Index in In-Memory Entity Store: Added reverse lookup index (
memoryId -> HashSet<string>) to achieve$O(1)$ memory deletions. -
Resilient JSON Parsing: Added markdown fence stripping (
```json) and JSON array slice extractors inLlmMemoryExtractorandLlmGraphMemoryExtractor. -
Strongly-Typed API DTOs: Migrated
OpenAiCompatibleClient,AnthropicClient, andOllamaClientfrom genericJsonNodeheap allocations to strongly-typed DTO records and safe base URI combining.
Optimized
-
BM25 Hybrid Search Complexity: Precomputed document frequencies reduced BM25 search complexity from
$O(D^2 \cdot T)$ to$O(D \cdot T)$ with zero-allocation span tokenization. -
In-Memory Streaming: Removed unnecessary
Task.Yield()state machine overhead inInMemoryStore.GetAllAsync.
Full Changelog: v0.1.7...v0.2.0
v0.1.7
v0.1.7
Mem0Sharp: Long-term memory lifecycle and evaluation upgrade
This release focuses on making Mem0Sharp behave more like a real long-term memory system instead of a simple fact store.
Highlights
- Added recency-aware retrieval and freshness-window tuning for time-sensitive memory recall.
- Added stale-memory forgetting and consolidation to model evolving preferences and outdated facts.
- Improved evaluation coverage with realistic long-horizon and retention scenarios.
- Strengthened behavior-aware memory support for normal, dreaming, random-thoughts, and personal-memory modes.
- Updated docs and published benchmark results to match the current verified run.
What’s new
- Long-term memory lifecycle:
- recency bias during search
- freshness filtering for newer vs. stale facts
- forgetting of outdated or superseded memories
- consolidation for preference drift and memory refinement
- More realistic benchmark scenarios:
- realistic-long-haul
- stale-forget
- stricter threshold testing
- richer multi-session behavioral memory evaluation
- Improved evaluation fidelity:
- benchmark outputs now reflect real long-term memory behavior
- self-test mode remains deterministic and safe for plumbing validation without provider credentials
Verified evaluation results
Fresh run results from the current benchmark matrix:
- realistic-long-haul: 91% accuracy, 100% retrieval hit rate
- stale-forget: 86% accuracy, 94% retrieval hit rate
- behavior-personal-memory: 100% accuracy, 94% retrieval hit rate
- llm-rerank: 100% accuracy, 100% retrieval hit rate
Why this matters
Mem0Sharp now better handles:
- changing user preferences over time
- stale or outdated memories
- long-running agent memory that must remain relevant across sessions
- behavior-specific memory patterns that feel more human and contextual
Full Changelog: v0.1.6...v0.1.7
v0.1.6
Mem0Sharp 0.1.6
Released: 2026-08-11
Highlights
- Split persistence providers into separate NuGet packages:
Mem0SharpMem0Sharp.PostgreSQLMem0Sharp.SQLite
Mem0Sharpcore is now dependency-free.- Added atomic memory/history persistence for built-in stores.
- Added memory provenance with behavior-aware retrieval.
- Factual search now excludes associative memories by default.
- Added fail-closed entity and graph enrichment.
- Updated OpenAI configuration defaults to
gpt-5.6-luna. - Kept embeddings on
text-embedding-3-small, since Luna does not support embeddings. - Added external evaluation dataset support and confidence intervals.
- Pinned SQLite runtime dependencies to patched versions.
- Release workflow now publishes all three packages with the same version.
Installation
dotnet add package Mem0Sharp --version 0.1.6
dotnet add package Mem0Sharp.PostgreSQL --version 0.1.6
dotnet add package Mem0Sharp.SQLite --version 0.1.6Only install the provider package required by the application. Provider namespaces remain Mem0Sharp, so existing source code remains compatible after adding the provider reference.
Evaluation
The latest 10-scenario evaluation achieved:
96%: infer-off, dreaming, and personal-memory92%: no-hybrid and conflict-resolution88%: no-dedup83%: baseline75%: LLM reranking and strict threshold58%: random thoughts
Detailed results are available in evaluation.md, with raw Markdown and JSON reports.
Full Changelog: v0.1.5...v0.1.6
v0.1.5
What's New?
Added
- Added configurable memory behaviors:
- Normal
- Dreaming
- Random thoughts
- Personal memory
- Added behavior-aware extraction through
IBehaviorAwareMemoryExtractor. - Added behavior and persona prompts for LLM-based memory extraction.
- Added MCP support for
behaviorandpromptoptions inadd_memory. - Added a runnable
MemoryBehaviorssample. - Added unit tests for memory behaviors and MCP integration.
Documentation
- Expanded the README and API documentation with memory behavior details.
- Added getting-started guidance and examples for behavior-shaped memories.
- Clarified Mem0Sharp’s native memory capabilities.
Full Changelog: v0.1.4...v0.1.5
v0.1.4
What's New?
Added
- Qdrant memory store with configurable options.
- Cohere, CrossEncoder, and ZeroEntropy reranker providers.
- Anthropic and Ollama model clients.
- New Getting Started, Ollama, and Postgres/OpenAI samples.
- YAML configuration for OpenAI integration tests.
Improved
- Expanded batch memory operations and history persistence.
- Enhanced PostgreSQL and OpenAI integration coverage.
- Added provider and reranker tests.
- Updated API, provider, persistence, parity, and onboarding documentation.
- Improved solution organization and sample discoverability.
Testing
- Added Qdrant and PostgreSQL history integration tests.
- Added coverage for model providers, rerankers, batch operations, and persisted history.
Full Changelog: v0.1.3...v0.1.4
v0.1.3
Mem0Sharp v0.1.3
Highlights
- Added PostgreSQL memory history tracking for update and delete operations.
- Added batch persistence through
SaveBatchAsync. - Added PostgreSQL entity and graph relationship stores.
- Improved memory retrieval with expiration support and additional
expires_atandhash_valuefields. - Enhanced filtering with nested logical expressions and numeric comparisons.
- Added
LlmMemoryConflictResolverwith more resilient LLM response parsing. - Added unit coverage for LLM conflict resolution and expanded memory service scenarios.
Architecture and Maintainability
- Reorganized the project around clearer application, contracts, domain, infrastructure, intelligence, telemetry, and transport layers.
- Added explicit domain models and service contracts to improve separation of concerns.
- Added architecture documentation and expanded provider, persistence, API, and Python-parity documentation.
Documentation and Security
- Added a contributor guide covering development, testing, and release validation.
- Added SECURITY.md with vulnerability reporting instructions and security guidelines.
- Updated the README with contributor onboarding information.
Full Changelog: v0.1.2...v0.1.3
v0.1.2
v0.1.1
v0.1.0
Full Changelog: https://github.com/jihadkhawaja/mem0sharp/commits/v0.1.0