Encamina.Enmarcha.SemanticKernel.Plugins.Memory 10.0.2

dotnet add package Encamina.Enmarcha.SemanticKernel.Plugins.Memory --version 10.0.2
                    
NuGet\Install-Package Encamina.Enmarcha.SemanticKernel.Plugins.Memory -Version 10.0.2
                    
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="Encamina.Enmarcha.SemanticKernel.Plugins.Memory" Version="10.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Encamina.Enmarcha.SemanticKernel.Plugins.Memory" Version="10.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Encamina.Enmarcha.SemanticKernel.Plugins.Memory" />
                    
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 Encamina.Enmarcha.SemanticKernel.Plugins.Memory --version 10.0.2
                    
#r "nuget: Encamina.Enmarcha.SemanticKernel.Plugins.Memory, 10.0.2"
                    
#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 Encamina.Enmarcha.SemanticKernel.Plugins.Memory@10.0.2
                    
#: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=Encamina.Enmarcha.SemanticKernel.Plugins.Memory&version=10.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Encamina.Enmarcha.SemanticKernel.Plugins.Memory&version=10.0.2
                    
Install as a Cake Tool

Semantic Kernel - Memory Plugin

Nuget package

Memory Plugin is a project that offers functionality as a plugin for searching the memory of the Semantic Kernel. When text is stored in memory within the Semantic Kernel, it is saved in the form of embeddings that can be queried through the Memory Plugin.

Setup

Nuget package

First, install NuGet. Then, install Encamina.Enmarcha.SemanticKernel.Plugins.Memory from the package manager console:

PM> Install-Package Encamina.Enmarcha.SemanticKernel.Plugins.Memory

.NET CLI:

First, install .NET CLI. Then, install Encamina.Enmarcha.SemanticKernel.Plugins.Memory from the .NET CLI:

dotnet add package Encamina.Enmarcha.SemanticKernel.Plugins.Memory

How to use

To use MemoryQueryPlugin, the usual approach is to import it as a plugin within Semantic Kernel. The simplest way to do this is by using the extension method ImportMemoryPlugin, which handles the import of the Plugin into Semantic Kernel.

// Entry point
var builder = WebApplication.CreateBuilder(new WebApplicationOptions
{
   // ...
});

// ... 

builder.Services.AddScoped(sp =>
{
      var kernel = new KernelBuilder()
        .WithAzureTextEmbeddingGenerationService("<YOUR DEPLOYMENT NAME>", "<YOUR AZURE ENDPOINT>", "<YOUR API KEY>")
        //.WithOpenAITextEmbeddingGenerationService("<YOUR MODEL ID>", "<YOUR API KEY>")
        /// ...
        .Build();

    // ...

    kernel.ImportMemoryPlugin(ILengthFunctions.LengthByTokenCount);

    return kernel;
});

Now you can inject the kernel via constructor, and the memory capabilities are already available.

public class MyClass
{
    private readonly Kernel kernel;

    public MyClass(Kernel kernel)
    {
        this.kernel = kernel;
    }

    public async Task TestMemoryQueryAsync()
    {
        var contextVariables = new ContextVariables();
        contextVariables.Set(PluginsInfo.MemoryQueryPlugin.Functions.QueryMemory.Parameters.Query, "What is the weather like in Madrid?");
        contextVariables.Set(PluginsInfo.MemoryQueryPlugin.Functions.QueryMemory.Parameters.CollectionsStr, "collection-1:collection-2");
        contextVariables.Set(PluginsInfo.MemoryQueryPlugin.Functions.QueryMemory.Parameters.CollectionSeparator, ":");
        contextVariables.Set(PluginsInfo.MemoryQueryPlugin.Functions.QueryMemory.Parameters.MinRelevance, "0.8");
        contextVariables.Set(PluginsInfo.MemoryQueryPlugin.Functions.QueryMemory.Parameters.ResponseTokenLimit, "1500");
        contextVariables.Set(PluginsInfo.MemoryQueryPlugin.Functions.QueryMemory.Parameters.ResultsLimit, "2");

        var functionMemoryQuery = kernel.Func(PluginsInfo.MemoryQueryPlugin.Name, PluginsInfo.MemoryQueryPlugin.Functions.QueryMemory.Name);

        var resultContext = await kernel.RunAsync(contextVariables, functionMemoryQuery);
    }
}

Within resultContext, you will find texts that meet the conditions.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (1)

Showing the top 1 NuGet packages that depend on Encamina.Enmarcha.SemanticKernel.Plugins.Memory:

Package Downloads
Encamina.Enmarcha.SemanticKernel.Plugins.QuestionAnswering

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.2 360 12/17/2025
10.0.1 281 12/17/2025
10.0.0 276 12/16/2025
10.0.0-preview-09 422 11/19/2025
10.0.0-preview-08 412 11/18/2025
10.0.0-preview-07 195 10/22/2025
10.0.0-preview-06 324 10/14/2025
10.0.0-preview-05 198 10/8/2025
10.0.0-preview-04 203 10/7/2025
10.0.0-preview-03 328 9/16/2025
10.0.0-preview-02 329 9/16/2025
8.3.0 300 9/10/2025
8.3.0-preview-02 201 9/10/2025
8.3.0-preview-01 200 9/8/2025
8.2.1-preview-08 203 8/18/2025
8.2.1-preview-07 213 8/12/2025
8.2.1-preview-06 206 8/11/2025
8.2.1-preview-05 285 8/5/2025
8.2.1-preview-04 276 7/15/2025
Loading failed