Persistent, portable memory for LLMs. Compresses text into NMP/2 artifacts, stores them locally, and exposes 2 MCP tools (guide and memory) so agents can remember, search, recall, and load reusable specialist skills across sessions. Built-in semantic search via Model2Vec (384-dim, ~22MB, zero native deps). Cross-process safe via OS-enforced file locks. Zero infrastructure required.
How does a structured memory system compare to simpler approaches? We built a runnable benchmark suite that quantitatively compares three strategies:
| Corpus size | Scrinia | Flat-file | Auto memory | Scrinia savings |
|---|---|---|---|---|
| 10 facts | 162 | 557 | 426 | 71% fewer tokens |
| 50 facts | 281 | 2,735 | 989 | 90% fewer tokens |
| 100 facts | 278 | 5,464 | 1,534 | 95% fewer tokens |
| 500 facts | 274 | 27,324 | 5,905 | 99% fewer tokens |
| System | Growth factor | Pattern |
|---|---|---|
| Scrinia | 1.7x | Near-constant |
| Auto memory | 13.8x | Sublinear |
| Flat-file | 49.1x | Linear |
| System | 10 facts | 100 facts | 500 facts |
|---|---|---|---|
| Scrinia | 0 | 0 | 0 |
| Auto memory | 135 | 440 | 1,780 |
| Flat-file | 557 | 5,464 | 27,324 |
All three systems achieve 100% recall on exact-term and natural-language queries. Scrinia's advantage is not accuracy — it's doing it at 1-5% of the token cost.
| System | Isolation ratio | Meaning |
|---|---|---|
| Scrinia | 100% | Only loads matching memories |
| Auto memory | 80% | Loads index + routed topic |
| Flat-file | 20% | Always loads all 5 topics |
| System | Cold start | Query | Total |
|---|---|---|---|
| Scrinia | 0 | 282 | 282 |
| Auto memory | 440 | 1,564 | 2,004 |
| Flat-file | 5,464 | 5,464 | 10,928 |
| Dimension | Winner | Why |
|---|---|---|
| Very small corpus (<20 facts) | Flat-file | Negligible overhead, everything fits |
| Token efficiency at scale | Scrinia | Selective retrieval, zero cold start |
| Recall on exact terms | Tie | All systems find substring matches |
| Ranked precision | Scrinia | BM25 + weighted fields produce ranked results |
| Cross-topic isolation | Scrinia | Only loads matching memories |
| Setup simplicity | Flat-file | Just a string, no tools needed |
| Staleness management | Scrinia | Only system with review markers |
Run the benchmarks yourself:
dotnet test tests/Scrinia.Tests --filter "FullyQualifiedName~Benchmarks"
Build from source (.NET 10 SDK required):
git clone https://github.com/nickd-scrinia/scrinia
cd scrinia
dotnet build
# Publish trimmed single-file binary
.\publish.ps1 -OutputDir ./dist -Platform win-x64
# Download embedding model for semantic search (~22MB)
scri setup
# Optional: with Vulkan GPU-accelerated embeddings plugin
.\publish.ps1 -OutputDir ./dist -Platform win-x64 -WithVulkan
Add to your MCP client config (Claude Code, Cursor, Copilot, etc.):
{
"mcpServers": {
"scrinia": {
"command": "scri",
"args": ["serve"],
"transport": "stdio"
}
}
}
For HTTP transport via the API server, see Server Administration.
Note: All mcp tools are availabl via cli, so they can be used in hooks, etc.
# Infrastructure
scri serve # start MCP server (stdio); auto-downloads embedding model on first run
scri setup # pre-download embedding model (rarely needed — serve auto-runs it)
scri config # list/get/set workspace settings
# Cold-start / lifecycle
scri guide # print the agent guide (run once per session)
scri restore # resume agent context (profile, patterns, session log)
scri reconcile # scan .scrinia/ for merge conflicts
scri consolidate --auto # deterministic housekeeping (hook-friendly, Tier 1)
scri consolidate --with-llm # add LLM pass: descriptions, summaries, fact extraction (Tier 2)
scri reindex # force rebuild of every vector file (rarely needed; auto-runs on model switch)
# Memory operations (grouped under "memory")
scri memory list # summary view (topics, keywords, stats)
scri memory list --summary=false # full listing
scri memory search "auth" # hybrid BM25 + semantic search
scri memory store notes ./notes.md # store a file as memory
scri memory store api:auth ./auth.md # store under a topic
scri memory show api:auth # display memory content
scri memory forget api:auth # delete a memory
scri memory append notes ./more.md # add a chunk
scri memory compact notes --keep-recent 3 # merge old chunks; keep 3 newest
scri memory link notes api:auth -r "see also" # bidirectional cross-reference
# Bundle files (grouped under "bundle")
scri bundle export api # export topic to .scrinia-bundle
scri bundle import ./bundle.scrinia-bundle # import a bundle
scri bundle pack docs *.md # package raw files into a bundle
All commands accept --workspace-root to override the workspace directory and --json for machine-parseable JSON output. The one-shot scri migrate (v1→v2 store layout) is still callable but hidden from --help.
| Pattern | Scope | Example |
|---|---|---|
subject | Local store | scri memory store session-notes file.md |
topic:subject | Topic group | scri memory store api:auth file.md |
~subject | Ephemeral (in-memory) | Dies with process |
2 tools available via scri serve.
| Tool | Actions | Description |
|---|---|---|
guide | (none — standalone) | Returns the embedded agent guide. Call once per session. |
memory | remember/store, recall/show, forget, search, list, append, compact, link, restore, reconcile | Unified memory dispatcher. Skill paths (/skill/...) are routed through it. |
Eight skills ship with scrinia and load via memory('recall', { path: '/skill/{name}' }):
| Skill | Purpose |
|---|---|
auditor | Systematic code, security, and documentation review with sequenced finding IDs |
qa | Test-and-build verification with command-output evidence |
debugger | Scientific-method debugging: observe, hypothesize, isolate, verify |
chaos-engineer | Probe operational resilience: failure domains, blast radius, recovery gaps |
onboarder | Build a codebase mental model for new agents and developers |
merge-safety | Multi-user .scrinia/ merge conflict prevention and resolution |
evolutionary | Prune stale memories, surface drift, keep skills aligned with practice |
self-reflector | Compare plan vs reality after a unit of work, persist durable lessons |
Projects can override any built-in by writing to /skill/{name} — the on-disk version takes precedence and is reusable across sessions.
Plans, retrospectives, agent norms, and findings are all just memories — searchable via memory('search'), organized via reserved paths (/findings/, /learn/, /agent/, /patterns/, /sessions/). No separate database, no separate tools.
dotnet test tests/Scrinia.Tests # 716 CLI + MCP + storage + embeddings + reindex tests
dotnet test tests/Scrinia.Server.Tests # 63 server tests
dotnet test tests/Scrinia.Merge.Tests # 18 merge-conflict tests
dotnet test tests/Scrinia.Plugin.Embeddings.Tests # 12 Vulkan embeddings plugin tests
dotnet test tests/Scrinia.Plugin.Llm.Tests # 15 Vulkan LLM plugin tests
BenchmarkDotNet is used for measuring hot-path performance (BM25 corpus stats, HNSW search). Run from the repo root:
# Run everything (a full pass takes several minutes)
dotnet run -c Release --project tests/Scrinia.Benchmarks
# Run a subset and emit a machine-readable JSON summary
dotnet run -c Release --project tests/Scrinia.Benchmarks -- \
--filter "*Bm25*" --exporters json
JSON exports land in tests/Scrinia.Benchmarks/BenchmarkDotNet.Artifacts/ and can be diffed
against a committed baseline to gate regressions in CI.
BSD-3-Clause. Copyright (c) 2026 Nick Daniels.
C#
95.8%
TypeScript
3.5%
Persistent, portable memory for LLMs. Compresses text into NMP/2 artifacts, stores them locally, and exposes 2 MCP tools (guide and memory) so agents can remember, search, recall, and load reusable specialist skills across sessions. Built-in semantic search via Model2Vec (384-dim, ~22MB, zero native deps). Cross-process safe via OS-enforced file locks. Zero infrastructure required.
How does a structured memory system compare to simpler approaches? We built a runnable benchmark suite that quantitatively compares three strategies:
| Corpus size | Scrinia | Flat-file | Auto memory | Scrinia savings |
|---|---|---|---|---|
| 10 facts | 162 | 557 | 426 | 71% fewer tokens |
| 50 facts | 281 | 2,735 | 989 | 90% fewer tokens |
| 100 facts | 278 | 5,464 | 1,534 | 95% fewer tokens |
| 500 facts | 274 | 27,324 | 5,905 | 99% fewer tokens |
| System | Growth factor | Pattern |
|---|---|---|
| Scrinia | 1.7x | Near-constant |
| Auto memory | 13.8x | Sublinear |
| Flat-file | 49.1x | Linear |
| System | 10 facts | 100 facts | 500 facts |
|---|---|---|---|
| Scrinia | 0 | 0 | 0 |
| Auto memory | 135 | 440 | 1,780 |
| Flat-file | 557 | 5,464 | 27,324 |
All three systems achieve 100% recall on exact-term and natural-language queries. Scrinia's advantage is not accuracy — it's doing it at 1-5% of the token cost.
| System | Isolation ratio | Meaning |
|---|---|---|
| Scrinia | 100% | Only loads matching memories |
| Auto memory | 80% | Loads index + routed topic |
| Flat-file | 20% | Always loads all 5 topics |
| System | Cold start | Query | Total |
|---|---|---|---|
| Scrinia | 0 | 282 | 282 |
| Auto memory | 440 | 1,564 | 2,004 |
| Flat-file | 5,464 | 5,464 | 10,928 |
| Dimension | Winner | Why |
|---|---|---|
| Very small corpus (<20 facts) | Flat-file | Negligible overhead, everything fits |
| Token efficiency at scale | Scrinia | Selective retrieval, zero cold start |
| Recall on exact terms | Tie | All systems find substring matches |
| Ranked precision | Scrinia | BM25 + weighted fields produce ranked results |
| Cross-topic isolation | Scrinia | Only loads matching memories |
| Setup simplicity | Flat-file | Just a string, no tools needed |
| Staleness management | Scrinia | Only system with review markers |
Run the benchmarks yourself:
dotnet test tests/Scrinia.Tests --filter "FullyQualifiedName~Benchmarks"
Build from source (.NET 10 SDK required):
git clone https://github.com/nickd-scrinia/scrinia
cd scrinia
dotnet build
# Publish trimmed single-file binary
.\publish.ps1 -OutputDir ./dist -Platform win-x64
# Download embedding model for semantic search (~22MB)
scri setup
# Optional: with Vulkan GPU-accelerated embeddings plugin
.\publish.ps1 -OutputDir ./dist -Platform win-x64 -WithVulkan
Add to your MCP client config (Claude Code, Cursor, Copilot, etc.):
{
"mcpServers": {
"scrinia": {
"command": "scri",
"args": ["serve"],
"transport": "stdio"
}
}
}
For HTTP transport via the API server, see Server Administration.
Note: All mcp tools are availabl via cli, so they can be used in hooks, etc.
# Infrastructure
scri serve # start MCP server (stdio); auto-downloads embedding model on first run
scri setup # pre-download embedding model (rarely needed — serve auto-runs it)
scri config # list/get/set workspace settings
# Cold-start / lifecycle
scri guide # print the agent guide (run once per session)
scri restore # resume agent context (profile, patterns, session log)
scri reconcile # scan .scrinia/ for merge conflicts
scri consolidate --auto # deterministic housekeeping (hook-friendly, Tier 1)
scri consolidate --with-llm # add LLM pass: descriptions, summaries, fact extraction (Tier 2)
scri reindex # force rebuild of every vector file (rarely needed; auto-runs on model switch)
# Memory operations (grouped under "memory")
scri memory list # summary view (topics, keywords, stats)
scri memory list --summary=false # full listing
scri memory search "auth" # hybrid BM25 + semantic search
scri memory store notes ./notes.md # store a file as memory
scri memory store api:auth ./auth.md # store under a topic
scri memory show api:auth # display memory content
scri memory forget api:auth # delete a memory
scri memory append notes ./more.md # add a chunk
scri memory compact notes --keep-recent 3 # merge old chunks; keep 3 newest
scri memory link notes api:auth -r "see also" # bidirectional cross-reference
# Bundle files (grouped under "bundle")
scri bundle export api # export topic to .scrinia-bundle
scri bundle import ./bundle.scrinia-bundle # import a bundle
scri bundle pack docs *.md # package raw files into a bundle
All commands accept --workspace-root to override the workspace directory and --json for machine-parseable JSON output. The one-shot scri migrate (v1→v2 store layout) is still callable but hidden from --help.
| Pattern | Scope | Example |
|---|---|---|
subject | Local store | scri memory store session-notes file.md |
topic:subject | Topic group | scri memory store api:auth file.md |
~subject | Ephemeral (in-memory) | Dies with process |
2 tools available via scri serve.
| Tool | Actions | Description |
|---|---|---|
guide | (none — standalone) | Returns the embedded agent guide. Call once per session. |
memory | remember/store, recall/show, forget, search, list, append, compact, link, restore, reconcile | Unified memory dispatcher. Skill paths (/skill/...) are routed through it. |
Eight skills ship with scrinia and load via memory('recall', { path: '/skill/{name}' }):
| Skill | Purpose |
|---|---|
auditor | Systematic code, security, and documentation review with sequenced finding IDs |
qa | Test-and-build verification with command-output evidence |
debugger | Scientific-method debugging: observe, hypothesize, isolate, verify |
chaos-engineer | Probe operational resilience: failure domains, blast radius, recovery gaps |
onboarder | Build a codebase mental model for new agents and developers |
merge-safety | Multi-user .scrinia/ merge conflict prevention and resolution |
evolutionary | Prune stale memories, surface drift, keep skills aligned with practice |
self-reflector | Compare plan vs reality after a unit of work, persist durable lessons |
Projects can override any built-in by writing to /skill/{name} — the on-disk version takes precedence and is reusable across sessions.
Plans, retrospectives, agent norms, and findings are all just memories — searchable via memory('search'), organized via reserved paths (/findings/, /learn/, /agent/, /patterns/, /sessions/). No separate database, no separate tools.
dotnet test tests/Scrinia.Tests # 716 CLI + MCP + storage + embeddings + reindex tests
dotnet test tests/Scrinia.Server.Tests # 63 server tests
dotnet test tests/Scrinia.Merge.Tests # 18 merge-conflict tests
dotnet test tests/Scrinia.Plugin.Embeddings.Tests # 12 Vulkan embeddings plugin tests
dotnet test tests/Scrinia.Plugin.Llm.Tests # 15 Vulkan LLM plugin tests
BenchmarkDotNet is used for measuring hot-path performance (BM25 corpus stats, HNSW search). Run from the repo root:
# Run everything (a full pass takes several minutes)
dotnet run -c Release --project tests/Scrinia.Benchmarks
# Run a subset and emit a machine-readable JSON summary
dotnet run -c Release --project tests/Scrinia.Benchmarks -- \
--filter "*Bm25*" --exporters json
JSON exports land in tests/Scrinia.Benchmarks/BenchmarkDotNet.Artifacts/ and can be diffed
against a committed baseline to gate regressions in CI.
BSD-3-Clause. Copyright (c) 2026 Nick Daniels.
C#
95.8%
TypeScript
3.5%