๐Ÿง  Mnemosyne

August 25, 2026 ยท View on GitHub

"Don't step on the same rake twice. And if you do โ€” at least make sure it doesn't happen a third time."

Mnemosyne is a plugin for DeepSeek Harness that remembers your agent's mistakes and refuses to let it repeat them. It learns from your own screw-ups: catches an error โ†’ remembers it โ†’ comes up with a fix โ†’ simply won't let it happen again.

Why you want this

Agents are people too โ€” they trip over the same things. Wrong path, forgotten argument, a drive that doesn't exist. Mnemosyne watches over this and turns every stumble into a lesson: it records the error, writes the remedy and โ€” the important part โ€” suggests the actual fix, so the agent can just keep going.

This is not "yet another logger". This is a guard dog that actually steps in: a repeated failing call simply never executes.

How it works

  1. Catches. The plugin listens to tool results (tools/result) and agent errors (agent/error). A call fails โ€” it already knows.
  2. Remembers. Every error becomes a signature (tool :: category :: message) with a repeat counter.
  3. Figures out the fix. On the second occurrence an automatic remedy is written: file errors โ†’ "check the path", schema errors โ†’ "validate arguments", and so on. If an LLM is configured, the plugin asks the model for a precise fix.
  4. Suggests the correction. Saying "check the path" is lazy. Mnemosyne says what exactly to fix. It spots a missing M:\ drive? It offers D:\ and shows you the corrected command, ready to copy.
  5. Blocks the repeat. Same tool, same arguments โ€” the call is intercepted before dispatch. The agent gets an explanation and a fix instead of another error.
  6. Learns from success. Once the agent finally nails it, the lesson flips to fixed ("the remedy worked").

Feature list

FeatureWhat it does
๐ŸŽฏ Auto-learningcatches, remembers, classifies (fs / schema / parse / timeout / guard / runtime)
๐Ÿฉน Auto-remedya recipe for every repeat + a concrete fix (a ready-to-use command)
๐Ÿ›ก๏ธ Guarda repeated failing call is blocked before it runs
โฑ๏ธ Time windowonly blocks recent repeats (5 minutes by default)
๐Ÿ•Š๏ธ Amnestyafter 3 blocks the guard backs off โ€” it won't choke a tool forever
๐Ÿค– LLM remediesthe model writes the fix (when a provider is configured), otherwise a template
๐Ÿ’พ Persistencelessons survive Harness restarts
๐Ÿงน Rules/mnemosyne forbid <tool> / allow โ€” manual bans
๐Ÿ“Š Reports/mnemosyne status and /mnemosyne report โ€” stats and top lessons
๐Ÿ–ฅ๏ธ Live panela card in the Run view: counters, categories, recent blocks

Install

Drop src/host.js and src/client.js into your project and wire them in via an overlay:

# cordis.yml
- insert:
    - id: mnemosyne
      name: './src/host.js'
      config: {}
pnpm dsh web --patch ./cordis.yml

The panel shows up in the Run card and the /mnemosyne command becomes available in chat.

Commands

/mnemosyne status              โ€” list lessons (error + remedy + fix)
/mnemosyne report              โ€” summary: categories, top lessons, blocks, timeline
/mnemosyne forbid <tool>       โ€” ban a tool entirely
/mnemosyne allow <tool>        โ€” lift the ban
/mnemosyne clear               โ€” wipe the memory

The model also gets mnemosyne_status and mnemosyne_learn tools.

Live example

$ Get-Content "M:\autofix\data.txt"
  โ†’ Cannot find drive. A drive with the name 'M' does not exist.

$ Get-Content "M:\autofix\data.txt"        # again
  โ†’ Mnemosyne remembered the lesson: recurring + remedy

$ Get-Content "M:\autofix\data.txt"        # third time
  โ†’ โ›” Mnemosyne: blocked โ€” the same failing call to 'pwsh' recurs (2x).
    Suggested fix: Replace M:\ with D:\ in the command โ€” e.g. Get-Content "D:\autofix\data.txt"

The agent copies the fix, runs it successfully โ€” and the lesson closes as fixed.

Under the hood

  • Host (src/host.js) โ€” the brain: lesson registry, classifier, autofix, guard, persistence, command, RPC.
  • Client (src/client.js) โ€” a live browser panel (React, no JSX).
  • Plain JavaScript, no build step โ€” a stock Cordis plugin for Harness.

License

MIT โ€” take it, tweak it, share it. If you build something cool on top of it, tell us!


Made for DeepSeek Harness. Questions, ideas, bugs โ€” Issues are welcome.