The procedural wedge
The wedge is the part of mnesio that has no equivalent in storage-shaped memory systems: the agent doesn’t just remember facts, it compiles its own behavior into something measurably better — and the only way that better thing ships is by passing an eval gate.
The procedural-memory compiler
Section titled “The procedural-memory compiler”The primary loop (mnesio-procedural) turns batches of agent Outcomes into
improved, versioned PolicyArtifacts — system prompts, heuristics, skills, and
retrieval rules. It’s a GEPA-style reflective loop:
-
Reflect. Read a batch of outcomes; diagnose what went wrong and why.
-
Propose K candidates. Generate K improved artifact variants from the reflection.
-
Shadow-evaluate. Run each candidate against an
EvalSuiteof benchmark tasks plus canaries and a safety probe, producing anEvalReport. -
Pareto-select. Pick the winner on the Pareto front of objective score vs. safety — never trading a probe regression for a higher score.
-
Gated commit. Only if
EvalReport::is_committable()holds does the winner become the new active version, via an atomic hot-swap of the active-version pointer. Otherwise it’s rejected and logged.
Credit assignment is multi-prompt: when several prompts contribute to an outcome, the compiler attributes the delta across them rather than crediting one blindly.
The “done when” bar
Section titled “The “done when” bar”Phase 2 is only considered done when there’s a positive learning curve on an ALFWorld-style suite with no safety-probe regression — a real curve, dashboarded live, not a claim.
Memory evolution (the supporting loop)
Section titled “Memory evolution (the supporting loop)”When a memory is written, a bounded async worker runs three A-MEM-style LLM steps to retroactively re-tag and re-link related memories — keeping the knowledge graph the compiler learns from adaptive. It is:
- Async — never on the write path (Hard Rule #5).
- Bounded —
EvolveConfigcapsmax_evolve_per_write, cooldown, and a lifetime limit (Hard Rule #6). A-MEM has no convergence guarantee; the bounds replace it. - Non-destructive — every evolution invalidates-and-supersedes with a
parentpointer; history is kept (Hard Rule #2).
Beyond the base loop
Section titled “Beyond the base loop”The wedge extends into the frontier phases, all behind the same gate:
- Causal credit assignment (Phase 10) scores each memory’s counterfactual contribution by replaying outcome evaluation with it masked, then GCs by provable zero contribution.
- Self-falsifying memory (Phase 11) re-runs acceptance probes and, on
Refuted, auto-supersedes the memory with no human in the loop. - Negative memory + dreaming (Phase 14) compiles bad outcomes into gated suppression rules and runs bounded offline consolidation that prunes provable dead weight and re-anchors drifted notes.
Next: see the measured results in Benchmarks.