Governed correction memory for AI systems
Correct once. Improve every interaction.
AI makes mistakes. Humans fix them. But the fix lives and dies in one session — tomorrow, the same mistake comes back. MemoSprout captures those corrections and retrieves the relevant ones for later questions.
What makes it different from a memory file: a correction is approved by a human before it counts, every approval leaves an audit trail, and it stops being served when the document it came from changes. Plain files, any model, no database.
npm install memosproutThe same mistake, every session
Your chatbot tells an employee that annual leave is 12 days. It has been 15 days since January. The employee corrects it — and the correction vanishes. Next week, another employee asks the same question and gets the same wrong answer.
This happens everywhere: chatbots with stale knowledge, coding agents that repeat the same error, AI reports with outdated figures. The fix is always the same — a human corrects it — and the fix is always lost.
One correction, end to end
Follow a single mistake from the moment it is corrected to the moment it stops reaching users.
1 · Wrong answer — The AI answers from stale knowledge.
How it works
Step 1
Capture the correction
When AI gets it wrong and a human fixes it — in a chatbot, a code review, a report — MemoSprout records what was wrong and what is right. One call detects the correction in a message and extracts the fields.
Step 2
Gate it before it counts
Not every correction is correct. Corrections from customers wait for approval, and extracted ones need high confidence to go live. A correction that contradicts an active one quarantines the old record. You can also validate against a domain oracle — source documents, test suites, regulations.
Step 3
Store it as portable knowledge
Active corrections are stored as Markdown with structured metadata — human-readable, git-versionable, and portable across any AI platform. No database, no lock-in.
Step 4
Deliver it just-in-time
When a similar question appears, the relevant correction is injected into the AI's context — and known-wrong answers are blocked before they reach the user, including reworded and translated ones.
What you get
Catches rewording, not just exact matches
Blocking uses normalized, word-boundary matching plus token overlap, so reordered and repunctuated wrong answers are caught without an LLM. Enable semantic checking and paraphrases and translations are caught too. Numbers must match exactly, so an already-corrected answer is not blocked by mistake.
Eleven LLM providers, one interface
OpenAI, Anthropic, DeepSeek, Qwen, Kimi, Xiaomi MiMo, MiniMax, Groq, Together AI, OpenRouter, and local Ollama — plus any OpenAI- or Anthropic-compatible endpoint. Every provider returns the same shape and the same actionable errors.
Safe by default
Customer corrections wait for approval. LLM-extracted corrections need high confidence to go live. Prompts treat user text as data, not instructions. Conflicting corrections are quarantined automatically.
Works from any language
A built-in REST API brings the full feature set to Python, PHP, Go, or anything that speaks HTTP — authenticated, rate limited, and bound to localhost unless you say otherwise.
Any domain where AI meets human judgment
Enterprise chat & RAG
A chatbot answers a leave-policy question with outdated numbers. Someone corrects it once, and that correction is injected into every future answer on the topic.
Coding agents
An agent edits a generated file directly. A reviewer corrects it, and the correction travels with the codebase — not with one model or one session.
Finance & compliance
An analyst catches a wrong tax rate in an AI-generated report. The correction records the regulation it came from, and later reports are checked against it.
Customer support
A supervisor corrects a refund timeline, citing the current SOP. Agents' suggested responses carry the corrected answer from then on.
The core engine is domain-agnostic. Each domain plugs in an adapter that defines how corrections are captured, validated, and delivered. Build your own adapter for any domain.
Principles
Corrections are verified, not blindly trusted
A user correction could be wrong or malicious. Customer corrections wait for approval, extracted ones need high confidence, and contradictions are quarantined — plus you can validate against a domain oracle: source documents, test suites, regulations.
A correction stops being served when its source changes
Give a correction a fingerprint of the document it came from, and MemoSprout re-checks it on every read. If the document changed, the correction is quarantined rather than deleted — because once its basis moves, it may have become right, wrong, or redundant, and serving it anyway is worse than serving nothing. A stale fact is the failure mode most knowledge stores never notice.
Every approval leaves a record
audit() returns the full lifecycle of a correction: who submitted it, who approved it, when it was validated, and why it was quarantined. Not a log you have to grep — a queryable history per correction, kept because serving a fact you cannot account for is its own kind of failure.
Runs on your infrastructure
Corrections are Markdown files on your server. The library never phones home — no telemetry, and by default no network calls at all: storing corrections, retrieving them, and blocking wrong answers need no LLM and no API key. Outbound calls happen only when you switch on an optional LLM feature, and then only to the endpoint you configured. One of those, semantic retrieval, sends correction text to your embedding provider; point it at a local model, or leave it off. MemoSprout Cloud is a separate, opt-in remote for teams — the library never depends on it.
Domain-agnostic core, pluggable adapters
The correction engine works the same way in every domain. What changes is the adapter: how corrections are captured, what validates them, and how they are delivered.
Portable and open
Corrections are Markdown files with YAML frontmatter — not locked in a database or a platform. Version them with git, move them between tools, use them with any AI system.
A different question than most memory tools
Most agent-memory work is about storing more and recalling better — more context, smarter retrieval, less forgetting. That is genuinely useful, and a crowded field. MemoSprout is built around a different question, the one that comes after storage: not did we store it, but is it still true, who approved it, and where did it come from.
The storage question
- How much can we remember
- How well can we retrieve it
- How little do we forget
The question MemoSprout asks
- Is this fact still true
- Who reviewed it, and when
- What source is it traceable to
Less a competitor than a different layer: a memory store holds what was said, while MemoSprout governs which facts are trustworthy enough to serve. The two can compose.
The governance a knowledge base needs, in a library
Regulations like the EU AI Act now ask RAG systems to trace a retrieved fact to an authoritative source, show it was reviewed before use, and prove it was current at the time. Those are the three things a vector database cannot answer — and the three MemoSprout was built around. It does not make you compliant; it gives you the record to work from.
Traceable to a source
Each correction carries the document it came from and a fingerprint of it, so a served fact points back to where it was decided.
Reviewed before use
A correction is served only after a human approves it, and audit() returns who submitted it, who approved it, and when.
Current, or withdrawn
When the source document changes, the correction is quarantined instead of served — so a fact that is no longer certifiable stops being asserted.
MemoSprout is a library, not legal advice or a certified compliance product. It produces the provenance and approval record; whether that satisfies a given regulation is a question for your own review.
Open source, local-first
MemoSprout is MIT-licensed and runs entirely on your infrastructure. Corrections are stored as Markdown files — human-readable, git-versionable, and portable. The library has no telemetry and no vendor lock-in. Audit the code yourself.
npm install memosproutWorking as a team?
MemoSprout Cloud is an optional hosted remote — like a git remote for your corrections. It adds a shared approval inbox, an audit ledger, a staleness watcher, and regression tests, so one approval reaches every agent. Your app keeps working offline; the cloud never sits in its request path. The library stays free and local-first.
The demo runs the dashboard on sample data entirely in your browser — no account, nothing saved.