wafle-anamnesis: autonomous memory pipeline built on top of Engram
I built wafle-anamnesis as an autonomous memory layer on top of Engram, and I believe it could be a valuable addition to the Engram ecosystem.
What it does
wafle-anamnesis closes the loop between AI agents and Engram with zero agent effort:
MCP ERROR -> mcp-launcher.ps1 -> engram save CLI -> .engram DB -> cloud sync
|
NEXT SESSION -> engram-context.ps1 -> loads continuity -> agent knows context
Three components
-
mcp-launcher.ps1 - MCP server wrapper that:
- Kills only true orphans by checking parent process (not by name or age)
- On MCP crash: auto-saves to Engram via CLI (no MCP connection needed)
- Format:
engram save "mcp-error: ..." "**What**..." --type bugfix --project <name>
-
engram-context.ps1 - Pre-flight loader (~5 lines output at session start)
- Loads continuity state, cloud sync status
- Does NOT load past errors (saves context tokens) - queried on-demand
-
Agent protocol - Instructions for any AI agent:
- Session start -> load continuity
- Debugging -> search Engram for past fixes
- After each task -> save to Engram
- Session close -> summary to Engram
Why this matters for Engram
Engram provides the infrastructure (save, search, sync, MCP tools), but does not automate when to save or when to search. wafle-anamnesis proves that:
- Auto-save is possible: using Engram CLI directly from any script (no MCP dependency)
- Context pre-load is practical: 5-line output at session start for continuity
- On-demand search is efficient: query Engram only when debugging - no context inflation
- CLI fallback is essential: when MCP drops, CLI save and search keep working
What Engram could add natively
engram watch or engram webhook - lightweight process that monitors events and auto-saves
engram context command - emit compact context summary in a single call
--attach / --parent flag on save - link memory to parent process for orphan detection
Technical
- Uses Engram's native CLI: same flags (--type, --project, --scope)
- Content format matches Engram: "What | Why | Where | Learned"
- Zero new long-running processes - no conflict with Engram daemon
- ~14 KB total - minimal footprint
- Published at: https://github.com/creandoaldia/wafle-anamnesis
The vision
Engram is the database layer for agent memory. wafle-anamnesis is the automation layer that makes agents use it consistently. Together they form a complete stack: database -> automation -> protocol.
I'd love to hear your thoughts on this direction.
wafle-anamnesis: autonomous memory pipeline built on top of Engram
I built wafle-anamnesis as an autonomous memory layer on top of Engram, and I believe it could be a valuable addition to the Engram ecosystem.
What it does
wafle-anamnesis closes the loop between AI agents and Engram with zero agent effort:
MCP ERROR -> mcp-launcher.ps1 -> engram save CLI -> .engram DB -> cloud sync
|
NEXT SESSION -> engram-context.ps1 -> loads continuity -> agent knows context
Three components
mcp-launcher.ps1 - MCP server wrapper that:
engram save "mcp-error: ..." "**What**..." --type bugfix --project <name>engram-context.ps1 - Pre-flight loader (~5 lines output at session start)
Agent protocol - Instructions for any AI agent:
Why this matters for Engram
Engram provides the infrastructure (save, search, sync, MCP tools), but does not automate when to save or when to search. wafle-anamnesis proves that:
What Engram could add natively
engram watchorengram webhook- lightweight process that monitors events and auto-savesengram contextcommand - emit compact context summary in a single call--attach/--parentflag on save - link memory to parent process for orphan detectionTechnical
The vision
Engram is the database layer for agent memory. wafle-anamnesis is the automation layer that makes agents use it consistently. Together they form a complete stack: database -> automation -> protocol.
I'd love to hear your thoughts on this direction.