Documentation
Table of Contents

Class SqliteSemanticMemory

Namespace
IntentSharp.Memory
Assembly
IntentSharp.dll

SQLite-backed memory that survives restarts. Embeddings are stored as little-endian float32 blobs. Recall ranks the most recent RecallCandidateLimit entries in process. A failed embedding is logged at Warning and the entry is kept without one; only the caller's cancellation propagates.

public sealed class SqliteSemanticMemory : ISemanticMemory
Inheritance
object
SqliteSemanticMemory
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Extension Methods

Constructors

SqliteSemanticMemory(string, IAIProvider?, ILogger?)

Opens the database file, creating the file and its table when they are missing. Without an embedding provider, or with one that does not support embeddings, recall uses word overlap only.

Properties

RecallCandidateLimit

How many of the most recent entries recall considers. Older entries are kept but never recalled. Default 2000.

Methods

ClearAsync(CancellationToken)

Deletes every entry from the database file. The file and its table stay.

GetStatsAsync(CancellationToken)

Returns counts over every stored entry.

RecallAsync(string, int, CancellationToken)

Returns up to maxResults of the most recent RecallCandidateLimit entries, most similar to query first and newer first among equal scores. Uses embedding similarity for entries that have an embedding when the query can be embedded, and word overlap otherwise; entries with no similarity are left out.

RecordAsync(MemoryEntry, CancellationToken)

Writes the entry to the database, first embedding its intent when an embedding provider is set and the entry has no embedding.