explaingit

jihadkhawaja/mem0sharp

Analysis updated 2026-05-18

8C#Audience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A .NET library that gives AI applications long-term memory, letting them save and search facts about users using meaning based search.

Mindmap

mindmap
  root((Mem0Sharp))
    What it does
      Saves user memories
      Searches by meaning
      Updates and deletes memories
    Tech stack
      C sharp
      .NET
      PostgreSQL pgvector
    Use cases
      Remember user preferences
      Search past conversation facts
      Build AI agents with memory
    Audience
      .NET developers
      AI agent builders
    Setup
      Install via NuGet
      Start with in-memory store

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Give a .NET AI chatbot the ability to remember user preferences across sessions.

USE CASE 2

Search saved memories by meaning instead of exact keyword matches.

USE CASE 3

Store long-term AI memories permanently in a PostgreSQL database.

USE CASE 4

Prototype memory features locally using the zero-dependency in-memory store before deploying.

What is it built with?

C#.NETNuGetPostgreSQLpgvector

How does it compare?

jihadkhawaja/mem0sharpautofac/autofac.extras.fakeiteasyavbiswas/shadow-rogue-self-play
Stars889
LanguageC#C#C#
Last pushed2026-07-09
MaintenanceActive
Setup difficultymoderateeasy
Complexity3/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

In-memory mode works instantly, production use with PostgreSQL pgvector requires extra database setup.

Use freely for any purpose, including commercial use, as long as you follow the Apache 2.0 license terms and attribution.

In plain English

Mem0Sharp gives AI applications built with .NET a way to remember things about users over time, instead of forgetting everything as soon as a conversation ends. It is a C# implementation inspired by an existing open source project called Mem0, though it is built independently and is not officially connected to that project. In plain terms, this library lets a program save short pieces of information, like a user's preferences or facts mentioned in a conversation, and later search for the most relevant ones using meaning based search rather than exact keyword matching. For example, an application could save that a user prefers dark mode, and later ask what editor settings that user likes, getting back the relevant saved memory even though the wording is different. The library supports adding, searching, updating, and deleting these memories, and lets developers organize them by user, session, or agent. Each memory can also carry extra metadata. For getting started quickly, it includes a simple in-memory storage option with no external dependencies, useful for testing or local development. For real production use, it also supports connecting to an OpenAI-compatible AI service for generating the underlying search embeddings, and can store memories permanently in a PostgreSQL database using a special extension called pgvector, which is designed for fast similarity search. Installing it is straightforward for a .NET developer: it is distributed as a NuGet package, the standard way to add libraries to .NET projects, and can be added with a single command. The project also includes documentation covering getting started, configuring providers, and a full API reference, along with a test suite that can be run with the standard dotnet test command. Mem0Sharp is licensed under the Apache License 2.0, a permissive license that allows free use, modification, and redistribution, including for commercial purposes, as long as license terms and attribution are respected.

Copy-paste prompts

Prompt 1
Add Mem0Sharp to my .NET project and show me how to save a user memory.
Prompt 2
Explain how semantic memory search works in Mem0Sharp compared to keyword search.
Prompt 3
Help me configure Mem0Sharp with PostgreSQL and pgvector for persistent storage.
Prompt 4
Show me how to connect Mem0Sharp to an OpenAI-compatible embedding provider.

Frequently asked questions

What is mem0sharp?

A .NET library that gives AI applications long-term memory, letting them save and search facts about users using meaning based search.

What language is mem0sharp written in?

Mainly C#. The stack also includes C#, .NET, NuGet.

What license does mem0sharp use?

Use freely for any purpose, including commercial use, as long as you follow the Apache 2.0 license terms and attribution.

How hard is mem0sharp to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is mem0sharp for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.