SemanticKernel.Agents.Memory.Core
0.0.1-beta12
This is a prerelease version of SemanticKernel.Agents.Memory.Core.
dotnet add package SemanticKernel.Agents.Memory.Core --version 0.0.1-beta12
NuGet\Install-Package SemanticKernel.Agents.Memory.Core -Version 0.0.1-beta12
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="SemanticKernel.Agents.Memory.Core" Version="0.0.1-beta12" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SemanticKernel.Agents.Memory.Core" Version="0.0.1-beta12" />
<PackageReference Include="SemanticKernel.Agents.Memory.Core" />
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 SemanticKernel.Agents.Memory.Core --version 0.0.1-beta12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SemanticKernel.Agents.Memory.Core, 0.0.1-beta12"
#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 SemanticKernel.Agents.Memory.Core@0.0.1-beta12
#: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=SemanticKernel.Agents.Memory.Core&version=0.0.1-beta12&prerelease
#tool nuget:?package=SemanticKernel.Agents.Memory.Core&version=0.0.1-beta12&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SemanticKernel.Agents.Memory.Core
Overview
This package contains the core implementation of the SemanticKernel Agents Memory pipeline. It provides the orchestration engine, pipeline handlers, and fluent configuration API for building sophisticated memory ingestion and retrieval systems.
Key Features
Pipeline Orchestration
ImportOrchestrator
: Central pipeline orchestrator with dependency injection support- Fluent Configuration API: Intuitive configuration using
services.ConfigureMemoryIngestion()
- Handler Pipeline: Modular text extraction → chunking → embeddings → storage pipeline
Advanced Text Processing
- Semantic Chunking: Structure-aware chunking based on document headings and layout
- Simple Text Chunking: Size-based chunking with configurable overlap
- Text Extraction: Integration with MarkitDown service for document processing
Pipeline Handlers
TextExtractionHandler
: Handles document text extractionSimpleTextChunking
: Basic size-based text chunkingSemanticChunking
: Intelligent structure-aware chunkingGenerateEmbeddingsHandler
: Embedding generation for text chunksSaveRecordsHandler
: Persistent storage of processed chunks
Installation
dotnet add package SemanticKernel.Agents.Memory.Core
Quick Start
using Microsoft.Extensions.DependencyInjection;
using SemanticKernel.Agents.Memory;
// Configure services
var services = new ServiceCollection();
// Add Azure OpenAI services
services.AddAzureOpenAITextEmbeddingGeneration(
deploymentName: "text-embedding-ada-002",
endpoint: "https://your-resource.openai.azure.com/",
apiKey: "your-api-key"
);
// Configure memory ingestion pipeline
services.ConfigureMemoryIngestion(options =>
{
options
.WithMarkitDownTextExtraction("http://localhost:5000")
.WithSemanticChunking(() => new SemanticChunkingOptions
{
MaxChunkSize = 500,
MinChunkSize = 100,
TitleLevelThreshold = 3,
IncludeTitleContext = true,
TextOverlap = 50
})
.WithDefaultEmbeddingsGeneration()
.WithSaveRecords(vectorStore);
});
// Build service provider
var serviceProvider = services.BuildServiceProvider();
// Use the orchestrator
var orchestrator = serviceProvider.GetRequiredService<ImportOrchestrator>();
var request = orchestrator.NewDocumentUpload()
.WithFile("document.pdf")
.WithTag("type", "technical")
.Build();
var pipeline = orchestrator.PrepareNewDocumentUpload("index", request);
await orchestrator.RunPipelineAsync(pipeline, cancellationToken);
Configuration Options
Semantic Chunking
.WithSemanticChunking(() => new SemanticChunkingOptions
{
MaxChunkSize = 500, // Maximum characters per chunk
MinChunkSize = 100, // Minimum chunk size threshold
TitleLevelThreshold = 3, // Heading levels to consider as titles
IncludeTitleContext = true, // Include heading context in chunks
TextOverlap = 50 // Character overlap between chunks
})
Search Client Configuration
services.AddMemorySearchClient(vectorStore, new SearchClientOptions
{
MaxMatchesCount = 10, // Maximum search results
AnswerTokens = 300, // Tokens for AI answers
Temperature = 0.7, // LLM creativity level
MinRelevance = 0.6 // Minimum relevance threshold
});
Dependencies
- Microsoft.Extensions.VectorData.Abstractions
- Microsoft.SemanticKernel.Core
- Microsoft.Extensions.Http
- Microsoft.Extensions.DependencyInjection.Abstractions
- Microsoft.Extensions.Logging.Abstractions
- System.Text.Json
- SemanticKernel.Agents.Memory.Abstractions
Related Packages
- SemanticKernel.Agents.Memory.Abstractions - Core interfaces and models
- SemanticKernel.Agents.Memory.Plugin - Semantic Kernel plugin integration
- SemanticKernel.Agents.Memory.Service - Web service implementation
- SemanticKernel.Agents.Memory.MCP - Model Context Protocol integration
Documentation
For complete documentation, examples, and samples, visit the main repository.
License
This project is licensed under the MIT License - see the LICENSE.txt file for details.
Product | Versions 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.
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Http (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- Microsoft.Extensions.VectorData.Abstractions (>= 9.7.0)
- Microsoft.SemanticKernel.Core (>= 1.64.0)
- SemanticKernel.Agents.Memory.Abstractions (>= 0.0.1-beta12)
- SemanticKernel.Rankers.Abstractions (>= 1.3.1)
- System.Text.Json (>= 8.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.0.1-beta12 | 36 | 9/8/2025 |