AgentExperience.Storage.Sqlite 0.1.0-preview.20

This is a prerelease version of AgentExperience.Storage.Sqlite.
dotnet add package AgentExperience.Storage.Sqlite --version 0.1.0-preview.20
                    
NuGet\Install-Package AgentExperience.Storage.Sqlite -Version 0.1.0-preview.20
                    
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="AgentExperience.Storage.Sqlite" Version="0.1.0-preview.20" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AgentExperience.Storage.Sqlite" Version="0.1.0-preview.20" />
                    
Directory.Packages.props
<PackageReference Include="AgentExperience.Storage.Sqlite" />
                    
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 AgentExperience.Storage.Sqlite --version 0.1.0-preview.20
                    
#r "nuget: AgentExperience.Storage.Sqlite, 0.1.0-preview.20"
                    
#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 AgentExperience.Storage.Sqlite@0.1.0-preview.20
                    
#: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=AgentExperience.Storage.Sqlite&version=0.1.0-preview.20&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=AgentExperience.Storage.Sqlite&version=0.1.0-preview.20&prerelease
                    
Install as a Cake Tool

AgentExperience.Storage.Sqlite

Local, durable storage in one SQLite file for memory of what worked, verified by your own checks, for .NET agents: a coding agent, a CLI, an MCP server, a single agent on one machine. Set it up with the quick start in the repository README and .UseSqlite(path).

Preview — not production ready. This is a 0.1.0-preview package, and it claims no production readiness. Public APIs may change between previews. Read Known limits and documented boundaries before you rely on it.

It implements, over one database file, the storage ports the learning loop needs: the Experience Record store with its audited lifecycle (SqliteExperienceRecordStore), full-text search over it with SQLite's FTS5 (SqliteExperienceCandidateSource), failure-signature lookup (SqliteExperienceSignatureSource), the reuse-feedback ledger, and the run store (SqliteExperienceRunStore) that keeps each completed run so it can be finalized in a later process. Each passes the same store conformance suite as the PostgreSQL adapter.

Requires Microsoft.Data.Sqlite 10.0.12 (which brings the bundled native SQLite, built with FTS5) and Microsoft.Extensions.DependencyInjection.Abstractions 10.0.12, or any later release in the same major. Targets net10.0. No dependency on Core, Npgsql or MAF.

Registering it

await ExperienceSqliteSchema.MigrateAsync("experience.db");   // once per start; applies nothing when current

builder.Services
    .AddAgentExperience(...)
    .UseSqlite("experience.db");

Nothing migrates the schema on its own: call ExperienceSqliteSchema.MigrateAsync first, or opt in with .UseSqlite("experience.db", options => options.MigrateSchemaOnFirstUse = true), which migrates the first time a store is resolved. Migrating is journaled (agent_experience_schema_versions), each script in one transaction with its journal row, so it is safe to repeat and safe to run from two processes at once. It puts the file in write-ahead-log mode, so readers never wait for the writer, and creates a missing file owner-only (on Unix, directory 0700, file 0600; the -wal and -shm files take the file's permissions). A store checks the schema version on its first operation and refuses a missing, older or newer one with an error saying what to do.

Without the one-call setup, services.AddAgentExperienceSqliteStorage("experience.db") makes the same registration. It refuses to sit beside another IExperienceRecordStore, because its candidate and signature sources search its own file.

What it keeps

  • The ports' rules. Create-only records with IDs unique across every scope, exact-scope reads that reveal nothing across scopes, idempotent lifecycle commits, the revision, prior-status and supersession guards, the confidence ledger's evidence-ID idempotency and independence key, injection tracking and both holdouts. Every write runs in one BEGIN IMMEDIATE transaction with a busy timeout, so two connections or two processes committing from the same revision have exactly one winner.
  • The PostgreSQL payload. A record's payload is the PostgreSQL store's version-1 JSON.
  • Erasure. SqliteExperienceRecordStore.DeleteAsync leaves a payload-free tombstone and removes the record's search text, signatures, events, evidence, injection summary and holdout rows in one transaction; reads in its own scope then answer Deleted. Connections run with secure_delete on, the FTS5 index is rewritten (optimize) in the erasure's transaction, and the write-ahead log is checkpointed and truncated afterwards (best effort: a reader still on an older snapshot keeps those pages in the -wal file until a later checkpoint). The stored run the record came from becomes a tombstone, so it can never be saved again.

How it searches

A query's terms are read exactly as the in-memory source reads them (distinct words, less English stopwords and one-character terms); each is looked up in an FTS5 index over the task ID, task summary and lesson, tokenized with unicode61 and stemmed with FTS5's Porter stemmer. Stemming makes it closer to the PostgreSQL source than to the in-memory one: "invoices" matches "invoice". A record matches when it holds at least MinimumMatchedTerms of the terms; relevance is the in-memory source's coverage, weighted towards the task summary.

What it leaves out

Sharing grants and the grant access log (a read behaves as if no grant exists), encryption and crypto-shredding, row-level security and database roles (anything that can open the file can read and write all of it), vectors, and retention sweeps. For a team, a shared service or any of those, use AgentExperience.Storage.Postgres.

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

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.1.0-preview.20 100 11/16/2026
0.1.0-preview.19 77 11/13/2026
0.1.0-preview.18 211 11/7/2026

Preview release. Not production ready, and it claims no production readiness: the Known limits table lists every unresolved item, and any unresolved item blocks a production-readiness claim. The Documented boundaries table beside it states exactly what no code change can remove. Public APIs may change between previews. See https://github.com/fabbrik/AgentExperience.NET/blob/main/docs/known-limits.md