DEV Community

Alex Day
Alex Day

Posted on

Crisp-Engine: *sodic memory for ai agents

I got tired of explaining context to my AI coding assistant every single session.

So I built Crisp Engine - an episodic memory layer for AI coding agents.

Not RAG. Not a vector store wrapper. A structured memory system that watches what your agent actually does - every file edit, git commit, bash failure - and builds a record that persists across sessions.

Crisp remembers:

  • what you've tried and why it didn't work
  • patterns in your frustration (yes, really)
  • what files you keep touching and what broke near them
  • lessons extracted from your own commit messages

The architecture is agent-agnostic. Claude Code, OpenCode, Pi - same memory layer, adapter pattern handles the differences.

implements the full academic memory stack:

  • CoALA 4-layer taxonomy (working → episodic → semantic → procedural)
  • MemGPT-style hierarchical paging (L0 raw → L1 summaries → L2 clusters → L3 arcs)
  • Ebbinghaus decay per layer, access-frequency promotion, conflict detection
  • A-MEM Zettelkasten links between episodes (similar/caused/contradicts/corrected_by)
  • 5-layer zoom retrieval with reranking (vector + recency + importance + access freq)

The interesting parts:

-> Tool Watchers: pluggable observers that turn tool calls into memory episodes. Git push rejected? Frustration score goes up. Hard reset? Flagged as destructive. Write your own watcher in ~30 lines.

-> Instinct distillation: repeated patterns graduate into named instincts. High-confidence instincts can generate new watchers automatically.

-> Embedding fallback chain: Ollama flaky? Crisp falls through to HuggingFace, then word2vec. Never silently drops your data.

Still building. Open to collaborators who think agents should get smarter the longer you work with them.

repo

N.B. I don't know how much its working, still measuring.
N.B. Before you ask, how its different from hernia-agent, its very different, the last thing I want in life rn is another md file.

Top comments (0)