LLM agents do not learn from corrections across sessions. A user fixes the same mistake at the start of every conversation. Existing agent memory systems primarily handle facts — preferences, entities, conversational history — rather than procedural knowledge.
We present Forge Decision Context (forge_dc), a system that captures behavioral signals from human corrections and self-assessed tool-call failures, compiles them into imperative RULE directives, and injects them at the decision points where they apply. We evaluate forge_dc alongside four predecessor approaches on DC-Bench, a new benchmark of 71 scenarios across nine behavioral dimensions, built from real executed agent traces in a deterministic mocked-tool environment. forge_dc reaches 95% compliance, up from 55% with naive retrieval, while injecting approximately 10x fewer tokens per query.
Across the five-stage progression, the strongest systems represent behavioral memory as explicit directives and deliver it at the decision points where it applies. The results identify representation, activation, and placement as central design choices for persistent behavioral learning.
| Dimension | ctrl | mem0 | zep | awm | memp | naive | chunk | hybrid | lucid | forge | Δ |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Behav. Change (7) | 14 | 14 | 14 | 43 | 71 | 71 | 71 | 86 | 86 | 86 | +15 |
| Cond. Activation (12) | 8 | 0 | 12 | 49 | 40 | 53 | 76 | 80 | 84 | 95 | +42 |
| Exception (3) | 67 | 67 | 67 | 67 | 100 | 67 | 100 | 87 | 87 | 100 | +33 |
| Generalize (3) | 67 | 33 | 33 | 33 | 100 | 67 | 67 | 67 | 67 | 100 | +33 |
| Implicit Learn. (10) | 0 | 0 | 0 | 0 | 10 | 10 | 20 | 0 | 78 | 90 | +80 |
| Persistence (10) | 8 | 2 | 5 | 41 | 21 | 21 | 37 | 82 | 83 | 100 | +79 |
| Recall (9) | 0 | 0 | 6 | 33 | 89 | 89 | 89 | 89 | 89 | 100 | +11 |
| Scope Precision (8) | 50 | 45 | 57 | 39 | 45 | 65 | 70 | 81 | 78 | 96 | +31 |
| Temporal Coh. (9) | 7 | 11 | 0 | 25 | 47 | 81 | 69 | 75 | 79 | 97 | +16 |
| Overall (71) | 10 | 12 | 15 | 34 | 49 | 55 | 63 | 70 | 82 | 95 | +40 |
ctrl = no injection. mem0 / zep are factual-memory baselines; awm / memp are procedural-memory baselines, given the identical seed traces and injection channel so any difference reflects what each system learns. Δ = forge − naive. Agent backbone: Opus 4.7; judge: GPT-4; embeddings: text-embedding-3-small; 5 runs per scenario–approach pair.
| Approach | Storage | Self-assess | Compilation | Per-tool | Avg. |
|---|---|---|---|---|---|
| doc_naive | Chunk | — | — | — | 55% |
| doc_chunk | Annot. chunk | — | — | — | 63% |
| hybrid_raw | Graph | — | — | Evidence | 70% |
| lucid_dc | Graph | Sonnet 4 | — | Evidence | 82% |
| forge_dc | Graph | Sonnet 4 | Sonnet 4 | Re-retrieval | 95% |
Each stage adds one mechanism to the one before it. The jump from lucid_dc to forge_dc is rule compilation plus re-retrieval between tool calls — representation and placement, not more storage.
| Approach | Mean injection tokens | Efficacy rate |
|---|---|---|
| mem0 | 25 | 4.2% |
| zep | 4 | 16.1% |
| awm | 1,207 | 39.7% |
| memp | 1,545 | 52.1% |
| doc_naive | 1,705 | 59.4% |
| doc_chunk | 1,063 | 64.8% |
| hybrid_raw | 1,651 | 72.4% |
| lucid_dc | 1,641 | 84.5% |
| forge_dc | 159 | 90.7% |
Compiled directives are both the smallest payload among the approaches that work and the most effective one. forge_dc's one-time capture cost (25,185 LLM tokens) is offset by the lowest per-run agent cost (5,621 tokens) — cheaper end-to-end than doc_naive after roughly four queries.
Directive-form memory produces a recurring compliance advantage — the "Only Rules Rule"
Agents follow compiled behavioral directives more consistently than retrieved descriptive corrections. Behavioral memory has to be optimized for action, not retrieval alone. Consideration: evaluate whether retrieved memory changes behavior, not only whether the correct text was retrieved.
Format and content rules retrieve differently
Formatting rules ("include USD") have no embedding similarity to the queries they apply to, so pure semantic retrieval misses them at scale. Consideration: tag rules by type at capture and route them differently at retrieval — embedding similarity is the right primitive for content rules and the wrong one for format rules.
Data-conditional rules need to fire at the decision point
Rules that depend on tool data cannot be evaluated at query time; they have to surface when the triggering data appears. Consideration: re-retrieve as the agent accumulates context and add newly triggered rules to the system prompt between tool calls.
Adding reasoning to a rule does not help, and sometimes hurts
A variant attaching a one-sentence justification to each rule scored flat or slightly lower than the bare directive on every model tested — given the reason, the model evaluates the directive and sometimes overrides it. Consideration: do not try to convince the model; extra judgment material invites second-guessing.
The injection channel is part of the design
Channels carry different trust profiles, compete differently with the task for attention, and dilute when several instruction streams share one slot. What works on one model generation is not guaranteed to work on the next. Consideration: treat each stage's channel as a first-class design decision and re-validate when the model changes.
A memory must not regress the base
Injected guidance can make an agent worse than no memory — a rule that surfaces on a case it does not fit degrades an output that needed no change. Consideration: learn only from failures and corrections, and default to staying silent when nothing needs to change.
All five approaches as self-contained packages — each with its own dependencies, database and docker-compose. Copy one folder out and it runs on its own.
github →DC-Bench: 71 scenarios across 9 behavioral dimensions, control vs. treatment runs, LLM-judged lift. Approach- and provider-agnostic — bring your own memory system with one Python Protocol.
github →@misc{vahdat2026decisioncontext,
title = {Decision Context: Persistent Behavioral Learning for AI Agents},
author = {Nima Vahdat and Pashootan Vaezipoor},
year = {2026},
eprint = {2611.08644},
archivePrefix = {arXiv},
primaryClass = {cs.AI},
note = {NeurIPS 2026 Workshop on Personalized, Aligned, Long-Term Memory for AI Systems (PALM)},
url = {https://arxiv.org/abs/2611.08644}
}
The PALM workshop is non-archival, so the arXiv preprint is the citable version. Workshop page: openreview.