BlazorMemory 0.1.0

dotnet add package BlazorMemory --version 0.1.0
                    
NuGet\Install-Package BlazorMemory -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlazorMemory" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlazorMemory" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="BlazorMemory" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlazorMemory --version 0.1.0
                    
#r "nuget: BlazorMemory, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BlazorMemory@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlazorMemory&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=BlazorMemory&version=0.1.0
                    
Install as a Cake Tool

BlazorMemory

AI memory layer for .NET — LLM-powered fact extraction, vector search, and persistent memory for Blazor and ASP.NET Core apps.

NuGet License: MIT

BlazorMemory gives your AI assistant a persistent, searchable memory. It automatically extracts facts from conversations, stores them as vector embeddings, and injects relevant memories into future prompts — so your assistant actually remembers the user.

How it works

User message → Extract facts → Embed → Store
                                         ↓
Next message → Embed query → Vector search → Inject memories → LLM

Quickstart

dotnet add package BlazorMemory
dotnet add package BlazorMemory.Storage.IndexedDb      # Blazor WASM (browser)
dotnet add package BlazorMemory.Embeddings.OpenAi
dotnet add package BlazorMemory.Extractor.OpenAi

Blazor WASM (Program.cs)

builder.Services
    .AddBlazorMemory()
    .UseIndexedDbStorage()
    .UseOpenAiEmbeddings(apiKey)
    .UseOpenAiExtractor(apiKey);

Server-side / EF Core (Program.cs)

dotnet add package BlazorMemory.Storage.EfCore
builder.Services
    .AddBlazorMemory()
    .UseEfCoreStorage<YourDbContext>()
    .UseOpenAiEmbeddings(apiKey)
    .UseOpenAiExtractor(apiKey);

Use in a component or service

public class ChatService(IMemoryService memory)
{
    public async Task<string> ChatAsync(string userMessage, string userId)
    {
        // 1. Retrieve relevant memories
        var memories = await memory.QueryAsync(userMessage, userId,
            new QueryOptions { Limit = 5, Threshold = 0.65f });

        // 2. Build system prompt with memories
        var context = string.Join("\n", memories.Select(m => $"- {m.Content}"));
        var systemPrompt = $"You are a helpful assistant.\n\nWhat you know:\n{context}";

        // 3. Call your LLM (OpenAI, Anthropic, etc.)
        var reply = await CallLlm(systemPrompt, userMessage);

        // 4. Extract and store new memories from the exchange
        await memory.ExtractAsync($"User: {userMessage}\nAssistant: {reply}", userId);

        return reply;
    }
}

Packages

Package Description
BlazorMemory Core library — interfaces, MemoryService, vector math
BlazorMemory.Storage.IndexedDb Browser IndexedDB — zero backend, Blazor WASM
BlazorMemory.Storage.InMemory In-memory — testing and prototyping
BlazorMemory.Storage.EfCore EF Core — SQL Server, PostgreSQL, SQLite
BlazorMemory.Embeddings.OpenAi OpenAI text-embedding-3-small embeddings
BlazorMemory.Extractor.OpenAi OpenAI gpt-4o-mini fact extraction
BlazorMemory.Extractor.Anthropic Anthropic Claude fact extraction

Features

  • Automatic fact extraction — LLM pulls structured facts from raw conversation
  • Intelligent consolidation — deduplicates and updates existing memories instead of storing redundant facts
  • Vector similarity search — finds semantically relevant memories for any query
  • Staleness scoring — surfaces fresh memories over stale ones
  • Zero backend option — IndexedDB adapter keeps everything in the user's browser
  • Provider agnostic — swap OpenAI for Anthropic or any future provider

License

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on BlazorMemory:

Package Downloads
BlazorMemory.Storage.IndexedDb

Browser IndexedDB storage adapter for BlazorMemory. Zero-backend persistent memory for Blazor WebAssembly apps — everything stays in the user's browser.

BlazorMemory.Extractor.Anthropic

Anthropic Claude-powered fact extractor and memory consolidator for BlazorMemory. Uses claude-haiku by default.

BlazorMemory.Storage.InMemory

In-memory storage adapter for BlazorMemory. Ideal for testing, prototyping, and development.

BlazorMemory.Extractor.OpenAi

OpenAI-powered fact extractor and memory consolidator for BlazorMemory. Uses gpt-4o-mini by default for fast, cheap extraction.

BlazorMemory.Storage.EfCore

Entity Framework Core storage adapter for BlazorMemory. Supports SQL Server, PostgreSQL, and SQLite for server-side Blazor and ASP.NET Core apps.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 223 3/15/2026