@ssheleg/agent-stack 0.14.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.15.0 — memory architecture, and the axes the layer table does not have
|
|
4
|
+
|
|
5
|
+
- **`agent-orchestrator/references/memory-architecture.md`** — form, function and dynamics
|
|
6
|
+
as the three axes of a memory decision, with the layer table demoted to what it is: one
|
|
7
|
+
property of the answer. Source pinned with a read date — *Memory in the Age of AI Agents:
|
|
8
|
+
A Survey*, arXiv:2512.13564v2, 13 Jan 2026, read 2026-08-27.
|
|
9
|
+
- **Retrieval was two mentions across 1,938 lines of references**, and it is four decisions:
|
|
10
|
+
whether to retrieve at all and from which store, what query to retrieve with, which
|
|
11
|
+
strategy runs the search, what reaches the prompt. The first is the one nobody
|
|
12
|
+
instruments — an agent that overestimates its own knowledge and skips retrieval answers
|
|
13
|
+
confidently from nothing, with **no error, no empty result and no latency spike**.
|
|
14
|
+
- **Facts are now separated from experience, and by entity.** Layers 3 and 4 are
|
|
15
|
+
experiential; nothing in them is a factual store. A stale fact about the USER makes the
|
|
16
|
+
agent rude, a stale fact about the ENVIRONMENT makes it wrong — one expiry rule for both
|
|
17
|
+
is wrong twice.
|
|
18
|
+
- **Forgetting gains the long-tail trap.** Frequency-based eviction is the easy policy and
|
|
19
|
+
the one that deletes the rarely-read entry preventing the rare expensive mistake. Where
|
|
20
|
+
storage is not the binding constraint: demote, not delete.
|
|
21
|
+
- Also carried: forms beyond token-level and what each costs (parametric memory cannot be
|
|
22
|
+
selectively deleted; latent memory cannot be inspected), why `agent-sync`'s leases are
|
|
23
|
+
coordination rather than shared memory, and abstention under low-confidence retrieval —
|
|
24
|
+
which needs a similarity floor, because semantic search always returns K results and an
|
|
25
|
+
empty store looks identical to an irrelevant one.
|
|
26
|
+
- **§7 was split rather than trimmed.** The house auditor refused the first attempt at
|
|
27
|
+
4981 tokens against a 4750 working limit and named the remedy itself. The context-budget
|
|
28
|
+
trap, layer 0 carryover and workspace scale moved into the new reference; the body is now
|
|
29
|
+
**4659 tokens — below the 4708 it sat at before any of this**.
|
|
30
|
+
- Discoverability, measured: against *"agent memory architecture: forms, functions,
|
|
31
|
+
dynamics, retrieval, forgetting"* this skill ranked **8th** among installed skills and now
|
|
32
|
+
ranks **1st**. The description is 965 chars, inside the 970-char working limit.
|
|
33
|
+
|
|
3
34
|
## v0.14.1 — the workforce axis: provider lifecycle and workspace-scale memory
|
|
4
35
|
|
|
5
36
|
(v0.14.0 was burned during release engineering: its tag landed on a commit a
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "agent-stack",
|
|
3
3
|
"displayName": "Agent Stack",
|
|
4
4
|
"description": "Two skills: agent-orchestrator — tool-calling loops, multi-stage pipelines with checkpoints, provider routing with fallback, four-layer memory, context engineering, plus the wallet side of reselling LLM access; and agent-evals — run/trace/thread evals, judges, and fixtures grown from production.",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.15.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "ssheleg",
|
|
8
8
|
"url": "https://x.com/sshlg93"
|
|
@@ -3,8 +3,8 @@ name: agent-orchestrator
|
|
|
3
3
|
description: >-
|
|
4
4
|
Use when building an agent system — an orchestrator, an LLM-powered tool, a chatbot with tool
|
|
5
5
|
use, an AI pipeline — or metering and billing the LLM access it burns. Covers tool-calling
|
|
6
|
-
loops, pipelines with human checkpoints, provider routing with fallback/retry,
|
|
7
|
-
|
|
6
|
+
loops, pipelines with human checkpoints, provider routing with fallback/retry, memory
|
|
7
|
+
architecture, retrieval and decay, context budgets, sub-agent coordination, error hierarchies; the
|
|
8
8
|
work as a graph — parallel layers, fake edges, a checker before convergence; for resale:
|
|
9
9
|
tiered wallets, one markup boundary, two-phase commit across database and provider API,
|
|
10
10
|
spend-delta polling, budget and loop guards, per-tenant keys. Triggers - "agent",
|
|
@@ -232,23 +232,19 @@ Four layers, each with a different lifetime and a different reason to exist:
|
|
|
232
232
|
| 3 Long-term learnings | per resource | months | what worked, with a confidence score |
|
|
233
233
|
| 4 Insights | per project | permanent | conclusions that outlived their resource |
|
|
234
234
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
mechanisms that decide what actually enters layers 3 and 4.
|
|
235
|
+
What enters layers 3 and 4 is decided by `references/patterns.md` — **Confidence
|
|
236
|
+
Management**, **Learning Extraction Heuristics**, **Fuzzy Deduplication**, **Conflict
|
|
237
|
+
Resolution**.
|
|
239
238
|
|
|
240
|
-
**
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
239
|
+
**These four are lifetimes, and lifetime is not the taxonomy.** Layers 3 and 4 are
|
|
240
|
+
*experiential*; **nothing here is a factual store**, and a stale fact about the USER makes
|
|
241
|
+
the agent rude while one about the ENVIRONMENT makes it wrong. Retrieval is absent here and
|
|
242
|
+
is four decisions, the first of which — whether to retrieve at all — fails as a confident
|
|
243
|
+
answer built from nothing, in no error log.
|
|
245
244
|
|
|
246
|
-
**
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
**Workspace scale.** Managing persistent workspaces rather than sessions shifts
|
|
250
|
-
the scopes — run, workspace, global, doctrine — and adds the journal-spine
|
|
251
|
-
rules: `references/patterns.md` → **Workspace-scale memory**.
|
|
245
|
+
**Design a memory layer from
|
|
246
|
+
[`references/memory-architecture.md`](references/memory-architecture.md)**, not from this
|
|
247
|
+
table. It also carries the context-budget trap, layer 0 carryover and workspace scale.
|
|
252
248
|
## 8. Self-Learning Feedback Loops
|
|
253
249
|
|
|
254
250
|
Three cycles feed the memory layers, and they differ by what supplies the signal: a failed
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
# Memory architecture — deciding what the agent remembers before deciding where to put it
|
|
2
|
+
|
|
3
|
+
**Load this when** an agent is being given memory for the first time, when an existing
|
|
4
|
+
memory layer is being extended, or when memory is present and behaving badly — recall that
|
|
5
|
+
misses, a store that grows without bound, an agent confidently answering from nothing.
|
|
6
|
+
|
|
7
|
+
**Spec pinned:** *Memory in the Age of AI Agents: A Survey — Forms, Functions and
|
|
8
|
+
Dynamics*, Hu et al., `https://arxiv.org/abs/2512.13564` (arXiv:2512.13564v2, 13 Jan 2026;
|
|
9
|
+
NUS / RUC / Fudan / PKU / NTU and others) · read 2026-08-27. Paper list:
|
|
10
|
+
`https://github.com/Shichun-Liu/Agent-Memory-Paper-List`.
|
|
11
|
+
|
|
12
|
+
`SKILL.md` §7 owns the four **layers** and their lifetimes, and §8 the loops that feed
|
|
13
|
+
them. Both answer *how long does this live*. **This file is upstream of that**: it decides
|
|
14
|
+
what kind of memory is being built at all, and lifetime is one property of the answer
|
|
15
|
+
rather than the taxonomy. The survey's own position, and the reason this file exists:
|
|
16
|
+
*"traditional taxonomies such as long/short-term memory have proven insufficient to capture
|
|
17
|
+
the diversity and dynamics of contemporary agent memory systems."*
|
|
18
|
+
|
|
19
|
+
## Contents
|
|
20
|
+
|
|
21
|
+
- [The source, and what this file adds](#the-source-and-what-this-file-adds)
|
|
22
|
+
- [1. Three axes, and lifetime is not one of them](#1-three-axes-and-lifetime-is-not-one-of-them)
|
|
23
|
+
- [2. Form — what physically carries it](#2-form--what-physically-carries-it)
|
|
24
|
+
- [3. Function — what it is for](#3-function--what-it-is-for)
|
|
25
|
+
- [4. Dynamics — formation, evolution, retrieval](#4-dynamics--formation-evolution-retrieval)
|
|
26
|
+
- [5. Retrieval is four decisions, not one](#5-retrieval-is-four-decisions-not-one)
|
|
27
|
+
- [5.5 The budget, layer 0, and workspace scale](#55-the-budget-layer-0-and-workspace-scale)
|
|
28
|
+
- [6. Forgetting, and the long-tail trap](#6-forgetting-and-the-long-tail-trap)
|
|
29
|
+
- [7. Shared memory when there is more than one agent](#7-shared-memory-when-there-is-more-than-one-agent)
|
|
30
|
+
- [8. Trustworthy memory](#8-trustworthy-memory)
|
|
31
|
+
- [9. What this pack does NOT claim](#9-what-this-pack-does-not-claim)
|
|
32
|
+
- [10. The checklist](#10-the-checklist)
|
|
33
|
+
|
|
34
|
+
## The source, and what this file adds
|
|
35
|
+
|
|
36
|
+
The survey is a map of published work, not a build guide: it classifies roughly two
|
|
37
|
+
hundred systems and states open problems. What is taken from it here is the **taxonomy and
|
|
38
|
+
the named failure modes**, because those are what an architect needs before writing a
|
|
39
|
+
schema. What is added is the decision order — form, then function, then dynamics — and the
|
|
40
|
+
wiring to what this pack already owns: §7's layers, §8's learning loops, `patterns.md`'s
|
|
41
|
+
confidence arithmetic, `context-engineering.md`'s budget, and `agent-evals` for judging
|
|
42
|
+
whether any of it helped.
|
|
43
|
+
|
|
44
|
+
**Where the survey and this pack disagree, the pack says so rather than quietly adopting.**
|
|
45
|
+
§7's four layers are a *deployment* shape that has survived contact with real systems; the
|
|
46
|
+
survey's three functions are an *analytical* shape. They are not rivals — the mapping is in
|
|
47
|
+
§3 below — and a schema built from either alone is missing what the other sees.
|
|
48
|
+
|
|
49
|
+
## 1. Three axes, and lifetime is not one of them
|
|
50
|
+
|
|
51
|
+
Every memory decision is three independent questions. Answer them in this order; answering
|
|
52
|
+
the third first is how a vector store arrives before anyone has said what it holds.
|
|
53
|
+
|
|
54
|
+
| Axis | The question | Answered in |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| **Form** | what physically carries it | §2 |
|
|
57
|
+
| **Function** | what it is FOR | §3 |
|
|
58
|
+
| **Dynamics** | how it is formed, evolved and retrieved | §4, §5, §6 |
|
|
59
|
+
|
|
60
|
+
Long-term and short-term are **not** a fourth axis. They are a consequence: the survey's
|
|
61
|
+
formulation is that short- and long-term effects *"emerge not from discrete architectural
|
|
62
|
+
modules but from the temporal patterns with which formation, evolution and retrieval are
|
|
63
|
+
engaged."* A single store read once per task behaves as short-term; the same store read
|
|
64
|
+
across tasks behaves as long-term. Design the patterns, and the lifetimes follow.
|
|
65
|
+
|
|
66
|
+
## 2. Form — what physically carries it
|
|
67
|
+
|
|
68
|
+
Three realizations. Most agent work uses the first and never learns the other two exist,
|
|
69
|
+
which is fine until the first one's costs bite.
|
|
70
|
+
|
|
71
|
+
| Form | What it is | Reach for it when | What it costs |
|
|
72
|
+
|---|---|---|---|
|
|
73
|
+
| **Token-level** | text, key-value, documents, graphs — anything the model reads as tokens | almost always; it is legible, auditable and editable by hand | every read spends context, and the store competes with the task for the window |
|
|
74
|
+
| **Parametric** | the knowledge is in weights — fine-tuning, model editing, adapters | a behaviour must hold with no retrieval step and no context cost, and it changes rarely | not auditable, not selectively deletable, and **wrong entries are expensive to remove** — which collides with §8's right to be forgotten |
|
|
75
|
+
| **Latent** | compressed internal states — KV reuse, latent tokens | throughput or privacy dominates and the content need not be read by a person | opaque: nobody can inspect what it holds, so a defect in it is invisible until behaviour is wrong |
|
|
76
|
+
|
|
77
|
+
Token-level splits further by structure — flat (1D), planar/tabular (2D), hierarchical or
|
|
78
|
+
graph (3D). Structure is a **retrieval** decision, not a storage one: a graph is worth its
|
|
79
|
+
cost when queries are multi-hop, and is overhead when they are lookups.
|
|
80
|
+
|
|
81
|
+
**The default, stated so it is a choice and not an accident:** token-level, flat, until a
|
|
82
|
+
measured retrieval failure justifies structure. Structure added before that is a schema
|
|
83
|
+
maintained for a query nobody runs.
|
|
84
|
+
|
|
85
|
+
## 3. Function — what it is for
|
|
86
|
+
|
|
87
|
+
Three pillars. The name matters because **the update rule and the trust level differ per
|
|
88
|
+
pillar**, and a store that mixes them applies one rule to all three.
|
|
89
|
+
|
|
90
|
+
| Function | Answers | Subtypes | Update rule |
|
|
91
|
+
|---|---|---|---|
|
|
92
|
+
| **Factual** | *what does the agent know* | **user** facts (identity, stable preferences, task constraints, commitments) · **environment** facts (document state, resource availability, what other agents can do) | corrected on contradiction; the newest assertion usually wins |
|
|
93
|
+
| **Experiential** | *how does the agent improve* | case-based (whole solutions and trajectories) · strategy-based (insights, workflows, patterns) · skill-based (functions, code, tools it wrote) | earned from a **contrast** — see §8 of `SKILL.md`; never from a single success |
|
|
94
|
+
| **Working** | *what is it thinking about now* | single-turn (input condensation, observation abstraction) · multi-turn (state consolidation, hierarchical folding) | discarded at the task boundary unless promoted |
|
|
95
|
+
|
|
96
|
+
**The split this pack was missing, and why it matters.** §7's layers do not separate *user*
|
|
97
|
+
facts from *environment* facts, and the two have opposite failure modes. A user fact that
|
|
98
|
+
goes stale makes the agent **rude** — it addresses a person by a preference they abandoned.
|
|
99
|
+
An environment fact that goes stale makes the agent **wrong** — it acts on a file that
|
|
100
|
+
moved, a budget that was spent, a tool that was removed. So environment facts need a
|
|
101
|
+
freshness policy and a re-check on use; user facts need a correction path and a way for the
|
|
102
|
+
person to see and edit what is held about them. One TTL for both is wrong twice.
|
|
103
|
+
|
|
104
|
+
**Mapping to §7's layers**, so the two shapes can be held at once:
|
|
105
|
+
|
|
106
|
+
| §7 layer | Function it actually serves |
|
|
107
|
+
|---|---|
|
|
108
|
+
| 1 Chat history | working, multi-turn |
|
|
109
|
+
| 2 Working memory (per resource) | working promoted to factual-about-this-task |
|
|
110
|
+
| 3 Long-term learnings | experiential — strategy-based |
|
|
111
|
+
| 4 Insights | experiential — strategy-based, cross-resource |
|
|
112
|
+
| *(missing)* | **factual: user and environment** — add it as its own store, not as a learning |
|
|
113
|
+
|
|
114
|
+
## 4. Dynamics — formation, evolution, retrieval
|
|
115
|
+
|
|
116
|
+
Three operators, and a system is defined by which of them it runs and how often.
|
|
117
|
+
|
|
118
|
+
- **Formation** — what becomes a memory candidate at all. Selective, never the whole
|
|
119
|
+
transcript: *"extracting information with potential future utility rather than storing
|
|
120
|
+
the entire interaction history verbatim."* Owned here by §8 and
|
|
121
|
+
`patterns.md` → **Learning Extraction Heuristics**.
|
|
122
|
+
- **Evolution** — consolidation, updating, forgetting. Owned by `patterns.md` →
|
|
123
|
+
**Confidence Management**, **Fuzzy Deduplication**, **Conflict Resolution**. Forgetting is
|
|
124
|
+
under-specified there; §6 below closes it.
|
|
125
|
+
- **Retrieval** — this pack had almost nothing on it. §5 is the whole of it.
|
|
126
|
+
|
|
127
|
+
## 5. Retrieval is four decisions, not one
|
|
128
|
+
|
|
129
|
+
*"Memory retrieval is not a static search operation but a dynamic cognitive process."* Four
|
|
130
|
+
stages, in execution order. A system that implements only the third — the usual case — is
|
|
131
|
+
running one of four.
|
|
132
|
+
|
|
133
|
+
### 5.1 Timing and intent — whether to retrieve at all, and from which store
|
|
134
|
+
|
|
135
|
+
**The failure this stage exists to prevent has a name and it is silent.** When an agent
|
|
136
|
+
overestimates its own knowledge and does not retrieve, there is no error, no empty result
|
|
137
|
+
and no latency spike — there is a confident answer built from nothing. It is invisible to
|
|
138
|
+
every health check that watches for failures.
|
|
139
|
+
|
|
140
|
+
- **Always-on retrieval** is the safe default and it is not free: it spends context on
|
|
141
|
+
every turn and injects noise into questions that needed none.
|
|
142
|
+
- **Model-decided** retrieval is cheaper and introduces exactly the silent mode above.
|
|
143
|
+
- **Fast–slow** is the compromise worth the wiring: answer, self-assess, and retrieve
|
|
144
|
+
deeper only when the first answer is judged insufficient.
|
|
145
|
+
|
|
146
|
+
**Instrument it or do not ship it.** Log retrieval decisions including the negatives —
|
|
147
|
+
*asked, decided not to retrieve* — and give `agent-evals` a fixture where the answer is
|
|
148
|
+
only obtainable from memory. A memory that is never queried scores the same as a memory
|
|
149
|
+
that is empty, and only the log tells them apart.
|
|
150
|
+
|
|
151
|
+
### 5.2 Query construction — what to retrieve with
|
|
152
|
+
|
|
153
|
+
The user's words are not a good query against your index, and this stage is the one most
|
|
154
|
+
often skipped entirely. Two techniques, and they compose:
|
|
155
|
+
|
|
156
|
+
- **Decomposition** — break a compound question into sub-queries, retrieve per part.
|
|
157
|
+
Use when the question spans several facts that no single entry holds.
|
|
158
|
+
- **Rewriting** — restate the query in the index's own language, or generate a hypothetical
|
|
159
|
+
answer and search with *that* (HyDE). Use when user phrasing and stored phrasing diverge
|
|
160
|
+
— which is most of the time for a store written by the agent itself.
|
|
161
|
+
|
|
162
|
+
### 5.3 Strategy — how the search runs
|
|
163
|
+
|
|
164
|
+
| Strategy | Strong at | Weak at |
|
|
165
|
+
|---|---|---|
|
|
166
|
+
| **Lexical** (BM25, TF-IDF) | exact identifiers, tool names, error strings, precision | paraphrase, synonyms |
|
|
167
|
+
| **Semantic** (embeddings) | paraphrase, fuzzy match — the usual default | drift and forced top-K, which return *something* however irrelevant |
|
|
168
|
+
| **Graph** | multi-hop, relational, temporal constraints | cost, and a schema to maintain |
|
|
169
|
+
| **Hybrid** | lexical precision plus semantic reach | two systems to tune |
|
|
170
|
+
|
|
171
|
+
**Semantic-only retrieval always returns K results.** There is no "nothing matched" unless
|
|
172
|
+
a similarity floor is set, so an empty store and an irrelevant store look identical to the
|
|
173
|
+
model. Set the floor, and make "nothing relevant" a value the caller can act on.
|
|
174
|
+
|
|
175
|
+
### 5.4 Post-retrieval — what actually reaches the prompt
|
|
176
|
+
|
|
177
|
+
Raw hits are redundant, stale and mutually contradictory. Two operations:
|
|
178
|
+
|
|
179
|
+
- **Re-rank and filter** — drop low-relevance and expired items. Temporal validity is a
|
|
180
|
+
filter, not a tiebreak: a fact with a validity window that has closed is wrong, not
|
|
181
|
+
merely old.
|
|
182
|
+
- **Aggregate and compress** — merge duplicates and reconstruct one coherent context.
|
|
183
|
+
|
|
184
|
+
This is where `context-engineering.md`'s budget applies. §7's warning holds at every stage:
|
|
185
|
+
every layer competes for one window, so give working memory a floor or a large set of old
|
|
186
|
+
generalities will quietly evict what the user said a minute ago.
|
|
187
|
+
|
|
188
|
+
## 5.5 The budget, layer 0, and workspace scale
|
|
189
|
+
|
|
190
|
+
Moved here from `SKILL.md` §7 when that file reached its body budget: these are memory
|
|
191
|
+
*architecture*, and this is the file about it.
|
|
192
|
+
|
|
193
|
+
**The trap is the budget, not the storage.** Every layer competes for the same context
|
|
194
|
+
window, so allocation is decided per call rather than per layer. A session that trims chat
|
|
195
|
+
history to fit a large set of learnings has quietly chosen old generalities over what the
|
|
196
|
+
user said sixty seconds ago. **Give layer 1 a floor.** This is the same window
|
|
197
|
+
`context-engineering.md` governs, and §5.4's post-retrieval stage is where a retrieval
|
|
198
|
+
that ignores it does its damage.
|
|
199
|
+
|
|
200
|
+
**Layer 0 — carryover state.** Goal, artifacts, verified work and restrictive mode cross a
|
|
201
|
+
compaction boundary as copied typed blocks, not prose (`SKILL.md` §12). It is a memory
|
|
202
|
+
layer whose whole job is surviving one specific event.
|
|
203
|
+
|
|
204
|
+
**Workspace scale.** Managing persistent workspaces rather than sessions shifts the scopes
|
|
205
|
+
— run, workspace, global, doctrine — and adds the journal-spine rules:
|
|
206
|
+
`patterns.md` → **Workspace-scale memory**.
|
|
207
|
+
|
|
208
|
+
## 6. Forgetting, and the long-tail trap
|
|
209
|
+
|
|
210
|
+
Three policies, and they are orthogonal — a system usually needs more than one:
|
|
211
|
+
|
|
212
|
+
- **Time-based decay** — natural aging. `patterns.md` → Confidence Management.
|
|
213
|
+
- **Frequency-based** — LRU/LFU, evict what is not read.
|
|
214
|
+
- **Importance-driven** — score on temporal, frequency and semantic signals together, and
|
|
215
|
+
increasingly let a model judge salience rather than a counter.
|
|
216
|
+
|
|
217
|
+
**The trap, stated because frequency-based forgetting is the easy one to reach for:**
|
|
218
|
+
LRU-style eviction *"may eliminate long-tail knowledge, which is seldom accessed but
|
|
219
|
+
essential for correct decision-making."* The rarely-read entry is often the one that
|
|
220
|
+
prevents a rare and expensive mistake — the incident, the exception, the one customer whose
|
|
221
|
+
setup differs. **When storage is not the binding constraint, do not delete: demote.** Move
|
|
222
|
+
it out of the default retrieval path and keep it reachable by explicit query.
|
|
223
|
+
|
|
224
|
+
Deletion is also a **correctness** operation, not only a capacity one — see §8.
|
|
225
|
+
|
|
226
|
+
## 7. Shared memory when there is more than one agent
|
|
227
|
+
|
|
228
|
+
The progression, and both ends are wrong:
|
|
229
|
+
|
|
230
|
+
- **Isolated memories with message passing** — no interference, but redundancy, fragmented
|
|
231
|
+
context and communication overhead that grows with team size.
|
|
232
|
+
- **A naive global store** — every agent reads and writes one space. This buys joint
|
|
233
|
+
attention and costs **memory clutter, write contention, and no role- or permission-aware
|
|
234
|
+
access control**.
|
|
235
|
+
|
|
236
|
+
**What this pack already has, and what it is not.** `agent-sync` gives leases, race-free id
|
|
237
|
+
reservation and a run journal: it decides *who may write this file right now*. That is
|
|
238
|
+
coordination, and it is not shared memory — it says nothing about what an agent should be
|
|
239
|
+
allowed to *read*, or whose experiential memory is trustworthy enough to act on. An agent
|
|
240
|
+
system that needs both needs both.
|
|
241
|
+
|
|
242
|
+
**The design rule:** make shared writes **attributed and scoped**. An entry carries who
|
|
243
|
+
wrote it and under what role, and a reader may weigh it accordingly. Unattributed shared
|
|
244
|
+
memory means one agent's wrong conclusion becomes every agent's premise, with nothing in
|
|
245
|
+
the record to trace it back.
|
|
246
|
+
|
|
247
|
+
## 8. Trustworthy memory
|
|
248
|
+
|
|
249
|
+
Three pillars, and the survey's position is that these stop being features and become
|
|
250
|
+
requirements once an agent is deployed and persistent.
|
|
251
|
+
|
|
252
|
+
**Privacy.** Agent memory holds user-specific, persistent and potentially sensitive content
|
|
253
|
+
— a different risk class from a document index. Memory modules have been shown to **leak
|
|
254
|
+
private data through indirect prompt injection**: text the agent read becomes text the
|
|
255
|
+
agent stored becomes text the agent will repeat. Three controls: do not store what the task
|
|
256
|
+
does not need (the same rule `error-tracking` applies before events reach a third party),
|
|
257
|
+
scope reads, and make **verifiable forgetting** possible — which is exactly what parametric
|
|
258
|
+
memory (§2) cannot offer, and the strongest argument for keeping deletable knowledge in
|
|
259
|
+
token-level form.
|
|
260
|
+
|
|
261
|
+
**Explainability.** *"Users and developers still lack tools to trace which memory items
|
|
262
|
+
were retrieved, how they influenced generation, or whether they were misused."* Minimum
|
|
263
|
+
bar, and it is cheap if built in from the start: every retrieval is logged with the ids it
|
|
264
|
+
returned, and every answer that used memory can name the entries it used. Retrofitted, it
|
|
265
|
+
is a rewrite.
|
|
266
|
+
|
|
267
|
+
**Hallucination robustness.** The point of memory is fewer invented answers, and a memory
|
|
268
|
+
layer can add them: a confidently retrieved stale entry is worse than an empty store,
|
|
269
|
+
because it carries authority. **Abstention under low-confidence retrieval** — say *"I do not
|
|
270
|
+
have this"* rather than answer from the best of a bad set — is the single highest-value
|
|
271
|
+
behaviour here, and it needs the similarity floor from §5.3 to be expressible at all.
|
|
272
|
+
|
|
273
|
+
## 9. What this pack does NOT claim
|
|
274
|
+
|
|
275
|
+
Named so a reader does not take this file for more than it is:
|
|
276
|
+
|
|
277
|
+
- **No benchmark numbers are reproduced here.** The survey tabulates benchmarks (LoCoMo,
|
|
278
|
+
LongMemEval, MemBench, StreamBench and others, §6.1); which of them fits a given system
|
|
279
|
+
is an `agent-evals` question and none of them is quoted as a result.
|
|
280
|
+
- **The frontier sections are frontiers.** RL-trained memory management, latent/generative
|
|
281
|
+
memory, and offline consolidation are stated in the survey as open directions, not
|
|
282
|
+
settled practice. They are in §2 as forms with costs, and nothing here recommends
|
|
283
|
+
building on them.
|
|
284
|
+
- **This file was written from the survey, not from running these systems.** Where the pack
|
|
285
|
+
has its own measured experience — §7's layers, `patterns.md`'s confidence arithmetic —
|
|
286
|
+
that is marked as the pack's and is not attributed to the paper.
|
|
287
|
+
|
|
288
|
+
## 10. The checklist
|
|
289
|
+
|
|
290
|
+
Before an agent gets memory, answer these. An unanswered row is a decision that will be
|
|
291
|
+
made by accident:
|
|
292
|
+
|
|
293
|
+
1. **Which functions does it need?** Factual-user, factual-environment, experiential,
|
|
294
|
+
working — name each one you are building. Not all four are always needed; the ones you
|
|
295
|
+
skip should be skipped on purpose.
|
|
296
|
+
2. **What form carries each?** Default token-level and flat. Any other answer names the
|
|
297
|
+
cost it is paying for (§2).
|
|
298
|
+
3. **What forms a memory?** The contrast rule for experiential (§8 of `SKILL.md`); an
|
|
299
|
+
explicit write path for factual. Never "log the transcript".
|
|
300
|
+
4. **When is it retrieved, and is that decision logged — including the negatives?** (§5.1)
|
|
301
|
+
5. **What is the query?** Raw user text is the answer only if you have checked it works.
|
|
302
|
+
(§5.2)
|
|
303
|
+
6. **Is there a relevance floor, so "nothing relevant" is expressible?** (§5.3)
|
|
304
|
+
7. **What expires, what decays, what is demoted rather than deleted?** (§6)
|
|
305
|
+
8. **If more than one agent writes it: who wrote this entry, under what role?** (§7)
|
|
306
|
+
9. **Can a person see, correct and delete what is held about them?** (§8)
|
|
307
|
+
10. **What eval fails if memory is silently disabled?** If none, the memory layer is
|
|
308
|
+
unmeasured and its value is a belief. (`agent-evals`)
|