AgentExperience.Storage.Sqlite
0.1.0-preview.20
dotnet add package AgentExperience.Storage.Sqlite --version 0.1.0-preview.20
NuGet\Install-Package AgentExperience.Storage.Sqlite -Version 0.1.0-preview.20
<PackageReference Include="AgentExperience.Storage.Sqlite" Version="0.1.0-preview.20" />
<PackageVersion Include="AgentExperience.Storage.Sqlite" Version="0.1.0-preview.20" />
<PackageReference Include="AgentExperience.Storage.Sqlite" />
paket add AgentExperience.Storage.Sqlite --version 0.1.0-preview.20
#r "nuget: AgentExperience.Storage.Sqlite, 0.1.0-preview.20"
#:package AgentExperience.Storage.Sqlite@0.1.0-preview.20
#addin nuget:?package=AgentExperience.Storage.Sqlite&version=0.1.0-preview.20&prerelease
#tool nuget:?package=AgentExperience.Storage.Sqlite&version=0.1.0-preview.20&prerelease
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-previewpackage, 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 IMMEDIATEtransaction 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.DeleteAsyncleaves 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 answerDeleted. Connections run withsecure_deleteon, 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-walfile 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 | Versions 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. |
-
net10.0
- AgentExperience.Abstractions (>= 0.1.0-preview.20)
- Microsoft.Data.Sqlite (>= 10.0.12)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
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