Table of Contents

Property DataSources

Namespace
LMKit.Agents
Assembly
LM-Kit.NET.dll

DataSources

Gets the collection of data sources currently stored in the agent memory.

public IReadOnlyList<DataSource> DataSources { get; }

Property Value

IReadOnlyList<DataSource>

A read-only list of DataSource instances.

Examples

Example: Inspecting stored memory data sources

using LMKit.Agents;
using LMKit.Model;

using var embeddingModel = new LM("path/to/embedding-model.gguf"); var memory = new AgentMemory(embeddingModel);

// Store some information await memory.SaveInformationAsync("projects", "Project Alpha uses React.", "alpha_tech"); await memory.SaveInformationAsync("projects", "Project Beta uses Vue.", "beta_tech"); await memory.SaveInformationAsync("team", "Alice leads the frontend team.", "alice_role");

// List all data sources Console.WriteLine($"Memory contains {memory.DataSources.Count} data source(s):"); foreach (var ds in memory.DataSources) { Console.WriteLine($" - {ds.Identifier}: {ds.Sections.Count} section(s)"); }

Remarks

Each data source represents a logical grouping of related information, identified by a unique identifier. Data sources contain sections, which in turn contain the actual text partitions used for semantic search.

Use AddDataSource(DataSource) or SaveInformationAsync to add new data sources to the memory.

Share