Technical Preview / Early Access. Local-first decision memory for AI agents that stores choices, rejected alternatives and their reasons, failed attempts, outcomes, provenance, and caller-invoked review conditions in a local file. Stdio MCP server; install from GitHub with Node.js 20+.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Local-first decision memory for AI agents. ShadowGraph remembers what an agent decided, what it rejected, why it rejected it, and when that decision should be reconsidered.
Status: Technical Preview / Early Access. Install from GitHub β it is not on npm. See Limitations and Technical Preview status.
Chat memory remembers the conversation. It loses the decision.
Ask an agent three months later why the project uses SQLite and the useful part is already gone:
ShadowGraph stores that reasoning as structured, inspectable data instead of prose: what was chosen, what was rejected, why, the assumptions and evidence behind it, failed attempts, outcomes, provenance, confidence history, and the conditions that should trigger a rethink.
The promise is deliberately narrow: important AI decisions should survive sessions and stay explainable, reviewable, and reconsiderable.
Who it is for: developers building agents on MCP, a CLI, or a local HTTP API who need consequential decisions to outlive a session. It is a decision store, not a transcript store, and it keeps everything on your machine.
node:sqlite)ShadowGraph is not published to npm. During the Technical Preview, install it from this
repository. A global install puts shadowgraph on your PATH, which is what MCP clients need:
Replace shadowgraph with node src/cli.js in every command below.
npm install shadowgraph-unified-plugindoes not work and fails withE404. The package isprivate: trueand unpublished, and the registry name is not reserved. This README will change if publication is ever approved.
Every ShadowGraph command takes a single JSON argument, so quoting depends on your shell. Pick the row for the shell you are actually using β this is the most common reason a first command fails:
| Shell | Form | Example |
|---|---|---|
| bash / zsh / Git Bash (macOS, Linux, WSL) | single quotes, plain JSON | shadowgraph recall '{"project":"demo"}' |
| Windows PowerShell | single quotes, \" inside | shadowgraph recall '{\"project\":\"demo\"}' |
Windows cmd.exe | double quotes, \" inside | shadowgraph recall "{\"project\":\"demo\"}" |
The examples below use the bash form. All three are tested on every command in this README.
setup creates .shadowgraph/data.json in the current directory, so run it where you want the
store to live. It never rewrites an existing store. doctor then checks Node compatibility, storage
readability and writability, graph validity, and the MCP entry point.
Run setup before doctor: on a fresh directory doctor reports Storage is not initialized
and exits 1 until a store exists. That is expected, not a failed install.
Each command runs in a new process and reopens the store from disk, so the search result comes
back across a real restart, not from in-memory state. You now have a decision that carries its
rejected alternative, the reason it was rejected, and the condition that should reopen it.
This is the whole point of ShadowGraph, in three commands. Continue in the same directory.
The decision is settled, so there is nothing to reconsider yet:
Now the world changes. The deployment becomes multi-user:
Restart and ask again β passing only the project, never the triggering fact:
ShadowGraph read the stored fact, matched it against the rule saved with the decision, and surfaced the alternative that had been rejected for a reason that no longer holds. Your decision IDs will differ; nothing else does.
That is decision memory: not "what did we talk about", but "what did we decide, what did we rule out, and does that still hold?"
For the same story through MCP, the HTTP API, and the JavaScript API β plus recording failed attempts and outcomes β see the decision-memory demo.
Decision memory. Decisions carry the chosen approach, rejected alternatives with their reasons,
assumptions, evidence, and structured reopenWhen rules. Outcomes (successful, mixed, failed,
unknown) feed back into confidence.
Reconsideration. review() evaluates reopen rules against stored facts, so it works after a
restart without the caller re-supplying what changed. Review signals are persisted and
acknowledgeable.
Failed-attempt memory. Attempts record the approach, the result, the environment, and the lesson, so an agent can discover that something was already tried and why it did not work.
Provenance you can audit. Every claim carries a sourceClass β agent_claimed,
tool_observed, human_confirmed, or production_verified β which records what was claimed
about an observation's origin, never proof of it. Ordinary tool input cannot create verified; that
requires a separately configured Ed25519 verifier.
Scoped memory and temporal recall. remember() / recall() store preferences, profiles, goals,
instructions, procedures, episodes, and notes under a project plus optional userId / agentId /
runId. Facts, memories, and relations are bi-temporal, so you can ask what was true asOf a past
moment. Retrieval fuses lexical, vector, graph-distance, and temporal signals and declares which
signals were unavailable rather than silently degrading.
Project and scope isolation. Omitted project and scope mean the default project and all-null
scope β never every project or every user. Purge is previewable, logical by default, and explicitly
irreversible in hard mode.
Explainable retrieval. Results expose raw scores, ranks, and reasons, and every bounded response declares its total, pages, and omitted scope. Nothing is silently summarized away.
Everything is a local file. The HTTP server binds to 127.0.0.1 and rejects non-local browser
origins. There is no cloud service, no account, no telemetry, and no analytics β ShadowGraph makes
no outbound network request unless you explicitly configure one.
The two opt-ins that can send data off the machine are both off by default:
SHADOWGRAPH_ALLOW_REMOTE_EMBEDDINGS=1,
because that means memory and query text leave your machine.markdown-sync writes plaintext copies you control. ShadowGraph cannot find
or delete those copies later β see Storage, backup, and deletion.For shared local use, set a Bearer token:
Then send Authorization: Bearer use-a-random-token-at-least-16-characters with every request. This
is defense in depth for a local deployment, not a public-internet security model. See
SECURITY.md.
Compact mode is recommended: it advertises 12 workflow tools while the full graph, memories, facts, alternatives, and outcomes stay stored at full fidelity. Compact mode is a tool-advertisement choice, not lossy storage.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/lilara-ai-shadowgraph)<a href="https://allmcps.com/mcp/lilara-ai-shadowgraph"><img src="https://allmcps.com/api/badge/lilara-ai-shadowgraph?style=directory" alt="Shadowgraph on AllMCPs" /></a>