AgentExperience.Storage.InMemory
0.1.0-preview.10
dotnet add package AgentExperience.Storage.InMemory --version 0.1.0-preview.10
NuGet\Install-Package AgentExperience.Storage.InMemory -Version 0.1.0-preview.10
<PackageReference Include="AgentExperience.Storage.InMemory" Version="0.1.0-preview.10" />
<PackageVersion Include="AgentExperience.Storage.InMemory" Version="0.1.0-preview.10" />
<PackageReference Include="AgentExperience.Storage.InMemory" />
paket add AgentExperience.Storage.InMemory --version 0.1.0-preview.10
#r "nuget: AgentExperience.Storage.InMemory, 0.1.0-preview.10"
#:package AgentExperience.Storage.InMemory@0.1.0-preview.10
#addin nuget:?package=AgentExperience.Storage.InMemory&version=0.1.0-preview.10&prerelease
#tool nuget:?package=AgentExperience.Storage.InMemory&version=0.1.0-preview.10&prerelease
AgentExperience.Storage.InMemory
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.
For development and tests only. Everything these stores hold is lost when the process ends, and none of the PostgreSQL store's guarantees apply: no database-enforced append-only logs, no erasure (so no erasure reach), no backups, no two database roles, no crypto-shredding. Its registration refuses to run in any environment but
Development,TestorTestingunless you override it explicitly.
In-memory storage for AgentExperience.NET, so you can run capture,
finalization, retrieval, injection and reuse feedback without provisioning PostgreSQL. It implements the three core
storage ports: the Experience Record store with its audited lifecycle (InMemoryExperienceRecordStore,
IExperienceRecordStore), word search over that same store (InMemoryExperienceCandidateSource,
IExperienceCandidateSource), and the reuse-feedback ledger (InMemoryExperienceReuseFeedbackStore,
IExperienceReuseFeedbackStore). All three are thread-safe.
Requires Microsoft.Extensions.DependencyInjection.Abstractions 10.0.12 and
Microsoft.Extensions.Hosting.Abstractions 10.0.3, or any later release in the same major. Targets
net10.0. No dependency on Core, Npgsql or MAF.
Registering it
using AgentExperience.Core.DependencyInjection;
using AgentExperience.Storage.InMemory.DependencyInjection;
builder.Services.AddAgentExperienceCore(AgentExperienceDefaults.Sanitization, AgentExperienceDefaults.CaptureLimits);
builder.Services.AddAgentExperienceInMemoryStorageForDevelopment();
Under the one-call setup, choose it on the builder instead:
services.AddAgentExperience(...).UseInMemoryStorageForDevelopment(), which makes the same registration.
That is the only registration, and its name says what it is for. It registers the three ports as singletons, sharing
one record store. A candidate source or feedback store you registered first keeps your implementation, but a
different IExperienceRecordStore registered first is refused at registration, because the in-memory candidate
source would find nothing that store writes. Calling it a second time changes nothing; a second call with an options
delegate throws, because the first call's options are already in force.
The environment guard. The stores run only when the environment is Development, Test or Testing
(case-insensitive); Production, Staging, any other name and a blank one are refused. The name is the registered
IHostEnvironment's; with none registered (a plain console app, a test) it is DOTNET_ENVIRONMENT, else
ASPNETCORE_ENVIRONMENT, and with neither set there is nothing to check. A refused environment is caught twice: a
hosted service the registration adds throws from StartAsync, so a Generic Host refuses to start, and resolving any
of the stores throws InvalidOperationException. A demo that really must run elsewhere opts out explicitly:
builder.Services.AddAgentExperienceInMemoryStorageForDevelopment(options => options.AllowProductionEnvironment = true);
In tests, construct the stores directly; direct construction is not guarded:
var records = new InMemoryExperienceRecordStore();
var candidates = new InMemoryExperienceCandidateSource(records);
var feedback = new InMemoryExperienceReuseFeedbackStore();
What it guarantees
It passes the same store conformance suite as the PostgreSQL store: create-only records with IDs unique across every scope; exact-scope reads that reveal nothing about another scope; idempotent lifecycle commits keyed on the event ID; the optimistic revision, prior-status and supersession guards, under concurrency too; ordered, paged history; and feedback idempotency. It validates every request with the PostgreSQL store's own rules, compiled from the same source file, so it refuses exactly the requests that store refuses. The confidence ledger's rules hold as well: an evidence ID is idempotent, independent evidence is counted once per independence key, and an assessment lands once per record.
Everything is copied on write: a record or feedback submission is stored as a deep copy whose collections are
read-only, so changing your instance afterwards changes nothing stored, and what a read returns is safe to share. As
in PostgreSQL, a record's CreatedAt and UpdatedAt, a lifecycle event's OccurredAt and a submission's
ObservedAt and AttributedAt are stored in UTC, truncated to whole microseconds.
What it does not do
- Search is close to PostgreSQL's, not the same. The candidate source matches words in the task ID, the task
summary and the reflection lesson: text is normalized to Unicode form KC and case-folded, and a word is a run of
letters and digits (a combining mark stays in its word). A query's terms are its distinct words less common English
stopwords (the list PostgreSQL's
englishconfiguration drops) and less terms shorter than two characters, and a record matches only when it contains every term, as PostgreSQL ANDs them; a query with no terms left matches nothing. Only the first 100,000 characters of a record's text are indexed, PostgreSQL's bound. Candidates come strongest first, then by ID, after the scope, status and confidence filters and before the limit. There is no stemming ("invoices" does not match "invoice") and no query syntax, so the two stores can return different records for the same query, and the relevance values still differ from PostgreSQL's: here it is the fraction of the terms a record contains, weighted towards task-summary hits, in (0, 1], so retrieval scores differ between the two stores. - No grants. Sharing grants and the grant access log are not provided: every read behaves as if no grant exists, so a record is readable only in its own exact scope.
- No embedding index, so no hybrid (vector) retrieval.
- No deletion, retention or encryption.
- No durability. Restarting the process empties every store.
Move to AgentExperience.Storage.Postgres for
anything you want to keep.
| 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.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.3)
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.10 | 71 | 10/10/2026 |
| 0.1.0-preview.9 | 114 | 10/10/2026 |
| 0.1.0-preview.8 | 145 | 10/9/2026 |
| 0.1.0-preview.7 | 193 | 10/5/2026 |
| 0.1.0-preview.6 | 52 | 10/1/2026 |
| 0.1.0-preview.5 | 52 | 10/1/2026 |
| 0.1.0-preview.4 | 52 | 9/29/2026 |
| 0.1.0-preview.3 | 53 | 9/29/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