Skip to content

Releases: jihadkhawaja/mem0sharp

v0.2.1

Choose a tag to compare

@jihadkhawaja jihadkhawaja released this 16 Aug 13:17

[v0.2.1] - 2026-08-16

Added

  • Admission Gate Defense Layer: Added NoveltyAdmissionGate, PromptInjectionAdmissionGate, and CompositeAdmissionGate to reject duplicate or malicious memory candidates before persistence.
  • Trajectory Tracking: Extended MemoryService and the public contracts with trajectory persistence support, including AppendTrajectoryAsync, 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 RollbackAsync and RollbackToHistoryAsync.

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

Choose a tag to compare

@jihadkhawaja jihadkhawaja released this 15 Aug 10:20

[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 cohesive IMemoryStore.
  • Embedding Generator Consolidation: Merged IBatchEmbeddingGenerator into IEmbeddingGenerator with default interface fallback.
  • Memory Extractor Consolidation: Merged IBehaviorAwareMemoryExtractor into IMemoryExtractor with ExtractAsync(messages, options, ct).
  • Canonical Service Signatures: Standardized IMemoryService and MemoryService around canonical options records (MemoryAddOptions, MemorySearchOptions, MemoryPageOptions, MemoryUpdate).

Added

  • SIMD Hardware Acceleration: Integrated System.Numerics.Tensors across 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/search and POST collections/{name}/points/search/batch with payload filter translation.
  • SQLite SQL Pushdown: Pushed down user_id, agent_id, run_id, scope, behavior, memory_type, and expires_at filters directly into parameterized SQL WHERE clauses, streaming records via IAsyncEnumerable<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) in LlmReranker.
  • 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 in LlmMemoryExtractor and LlmGraphMemoryExtractor.
  • Strongly-Typed API DTOs: Migrated OpenAiCompatibleClient, AnthropicClient, and OllamaClient from generic JsonNode heap 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 in InMemoryStore.GetAllAsync.

Full Changelog: v0.1.7...v0.2.0

v0.1.7

Choose a tag to compare

@jihadkhawaja jihadkhawaja released this 15 Aug 07:05

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

Choose a tag to compare

@jihadkhawaja jihadkhawaja released this 11 Aug 03:58

Mem0Sharp 0.1.6

Released: 2026-08-11

Highlights

  • Split persistence providers into separate NuGet packages:
    • Mem0Sharp
    • Mem0Sharp.PostgreSQL
    • Mem0Sharp.SQLite
  • Mem0Sharp core 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.6

Only 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-memory
  • 92%: no-hybrid and conflict-resolution
  • 88%: no-dedup
  • 83%: baseline
  • 75%: LLM reranking and strict threshold
  • 58%: 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

Choose a tag to compare

@jihadkhawaja jihadkhawaja released this 01 Aug 06:20

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 behavior and prompt options in add_memory.
  • Added a runnable MemoryBehaviors sample.
  • 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

Choose a tag to compare

@jihadkhawaja jihadkhawaja released this 01 Aug 05:27

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

Choose a tag to compare

@jihadkhawaja jihadkhawaja released this 26 Jul 14:35

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_at and hash_value fields.
  • Enhanced filtering with nested logical expressions and numeric comparisons.
  • Added LlmMemoryConflictResolver with 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

Choose a tag to compare

@jihadkhawaja jihadkhawaja released this 14 Jul 02:22

Full Changelog: v0.1.1...v0.1.2

v0.1.1

Choose a tag to compare

@jihadkhawaja jihadkhawaja released this 13 Jul 16:57

Full Changelog: v0.1.0...v0.1.1

v0.1.0

Choose a tag to compare

@jihadkhawaja jihadkhawaja released this 13 Jul 16:33