engram integrates MemPalace as a decision provider — surfaces decisions during AI coding file reads #798
NickCirv
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Built an integration between engram and MemPalace that I wanted to share.
engram is an open-source tool that hooks into AI coding assistants (Claude Code today) and intercepts file reads, serving structural summaries instead of full file contents.
In v0.5, I added MemPalace as one of 6 context providers. Here's what it does:
At session start, engram queries MemPalace for decisions, learnings, and project context via the MCP CLI wrapper (mcp-mempalace mempalace-search)
Results are cached locally in SQLite with a 1-hour TTL
When a file read is intercepted, relevant MemPalace findings are included alongside the structural summary
The result: when an AI agent reads a file, it gets not just the code structure but also the decisions that shaped that code. "JWT chosen over session cookies — 2026-01-20, security + stateless APIs" shows up right when the agent is looking at the auth middleware.
This means the agent doesn't need to make a separate MemPalace query to understand why code is structured a certain way. The decisions are pre-assembled into the context packet.
Example output:
[engram] Structural summary for src/auth/middleware.ts
Nodes: 5 | avg extraction confidence: 0.85
NODE validateToken() [function] L42-67
[engram] Additional context (2 providers, ~72 tokens)
DECISIONS (mempalace, cached 2h ago):
JWT chosen over session cookies (2026-01-20, security + stateless)
Refresh token rotation added (2026-03-05, compliance)
CHANGES (engram:git):
Last modified: 3 days ago by nick
The integration uses MemPalace's existing MCP server interface — no modifications needed. engram queries via mcp-mempalace mempalace-search --query "..." and caches the results.
I've been running both tools together on my projects. MemPalace handles the semantic memory (what you decided and why). engram handles the structural context (what's in the code and how it connects). They complement each other well.
npm: engramx
GitHub: NickCirv/engram
Beta Was this translation helpful? Give feedback.
All reactions