agent-working-memory 0.4.0 → 0.4.2
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/README.md +187 -170
- package/dist/cli.js +41 -14
- package/dist/cli.js.map +1 -1
- package/dist/hooks/sidecar.d.ts.map +1 -1
- package/dist/hooks/sidecar.js +61 -2
- package/dist/hooks/sidecar.js.map +1 -1
- package/dist/mcp.js +10 -11
- package/dist/mcp.js.map +1 -1
- package/package.json +1 -1
- package/src/cli.ts +42 -14
- package/src/hooks/sidecar.ts +58 -2
- package/src/mcp.ts +10 -11
package/README.md
CHANGED
|
@@ -1,135 +1,205 @@
|
|
|
1
1
|
# AgentWorkingMemory (AWM)
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Persistent working memory for AI agents.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
AWM helps agents retain important project knowledge across conversations and sessions. Instead of storing everything and retrieving by similarity alone, it filters for salience, builds associative links between related memories, and periodically consolidates useful knowledge while letting noise fade.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Use it through Claude Code via MCP or as a local HTTP service for custom agents. Everything runs locally: SQLite + ONNX models + Node.js. No cloud, no API keys.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### Without AWM
|
|
10
|
+
- Agent forgets earlier architecture decision
|
|
11
|
+
- Suggests Redux after project standardized on Zustand
|
|
12
|
+
- Repeats discussion already settled three days ago
|
|
13
|
+
- Every new conversation starts from scratch
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
### With AWM
|
|
16
|
+
- Recalls prior state-management decision and rationale
|
|
17
|
+
- Surfaces related implementation patterns from past sessions
|
|
18
|
+
- Continues work without re-asking for context
|
|
19
|
+
- Gets more consistent the longer you use it
|
|
12
20
|
|
|
13
|
-
|
|
14
|
-
|---------|------------------------|-----|
|
|
15
|
-
| **What gets stored** | Everything | Only salient events (salience scoring filters 77% of noise at write time) |
|
|
16
|
-
| **Retrieval** | Single-signal cosine similarity | 10-phase pipeline: BM25 + vectors + cross-encoder reranking + graph walk + temporal decay |
|
|
17
|
-
| **Connections** | None | Hebbian associative edges that strengthen when memories are co-retrieved |
|
|
18
|
-
| **Over time** | Grows forever, gets noisier | Sleep cycle consolidation: strengthens clusters, prunes noise, builds cross-topic bridges |
|
|
19
|
-
| **Forgetting** | Manual cleanup or TTL | Cognitive forgetting: unretrieved memories fade, confirmed knowledge persists for months |
|
|
20
|
-
| **Feedback** | None | Explicit useful/not-useful signals tune confidence, affecting retrieval rank and forgetting resistance |
|
|
21
|
-
| **Self-correction** | Delete and re-insert | Retraction system: wrong memories get invalidated, corrections link back, confidence penalties propagate |
|
|
21
|
+
---
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
## Quick Start
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
**Node.js 20+** required — check with `node --version`.
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
| A/B Test | **AWM 100% vs Baseline 83%** | 100 project events, 24 recall questions |
|
|
32
|
-
| Self-Test | **97.4% EXCELLENT** | 31 pipeline component checks |
|
|
33
|
-
| Workday | **86.7% GOOD** | 43 memories across 4 simulated work sessions |
|
|
34
|
-
| Real-World | **93.1% EXCELLENT** | 300 code chunks from a 71K-line production monorepo |
|
|
35
|
-
| Token Savings | **64.5% savings** | Memory-guided context vs full conversation history |
|
|
27
|
+
```bash
|
|
28
|
+
npm install -g agent-working-memory
|
|
29
|
+
awm setup --global
|
|
30
|
+
```
|
|
36
31
|
|
|
37
|
-
|
|
32
|
+
Restart Claude Code. That's it — 13 memory tools appear automatically.
|
|
38
33
|
|
|
39
|
-
|
|
34
|
+
First conversation will be ~30 seconds slower while ML models download (~124MB, cached locally). After that, everything runs on your machine.
|
|
40
35
|
|
|
41
|
-
|
|
36
|
+
> For isolated memory per folder, see [Separate Memory Pools](#separate-memory-pools). For team onboarding, see [docs/quickstart.md](docs/quickstart.md).
|
|
42
37
|
|
|
43
|
-
|
|
38
|
+
---
|
|
44
39
|
|
|
45
|
-
|
|
40
|
+
## Who this is for
|
|
46
41
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
- **Long-running coding agents** that need cross-session project knowledge
|
|
43
|
+
- **Multi-agent workflows** where specialized agents share a common memory
|
|
44
|
+
- **Local-first setups** where cloud memory is not acceptable
|
|
45
|
+
- **Teams using Claude Code** who want persistent context without manual notes
|
|
50
46
|
|
|
51
|
-
|
|
47
|
+
## What this is not
|
|
52
48
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
- Not a chatbot UI
|
|
50
|
+
- Not a hosted SaaS
|
|
51
|
+
- Not a generic vector database
|
|
52
|
+
- Not a replacement for your source of truth (code, docs, tickets)
|
|
56
53
|
|
|
57
|
-
|
|
54
|
+
---
|
|
58
55
|
|
|
59
|
-
|
|
56
|
+
## Why it's different
|
|
60
57
|
|
|
61
|
-
|
|
58
|
+
Most "memory for AI" projects are vector databases with a retrieval wrapper. AWM goes further:
|
|
62
59
|
|
|
63
|
-
|
|
60
|
+
| | Typical RAG / Vector Store | AWM |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| **Storage** | Everything | Only novel, salient events (77% filtered at write time) |
|
|
63
|
+
| **Retrieval** | Cosine similarity | 10-phase pipeline: BM25 + vectors + reranking + graph walk + decay |
|
|
64
|
+
| **Connections** | None | Hebbian edges that strengthen when memories co-activate |
|
|
65
|
+
| **Over time** | Grows forever, gets noisier | Consolidation: strengthens clusters, prunes noise, builds bridges |
|
|
66
|
+
| **Forgetting** | Manual cleanup | Cognitive forgetting: unused memories fade, confirmed knowledge persists |
|
|
67
|
+
| **Feedback** | None | Useful/not-useful signals tune confidence and retrieval rank |
|
|
68
|
+
| **Correction** | Delete and re-insert | Retraction: wrong memories invalidated, corrections linked, penalties propagate |
|
|
64
69
|
|
|
65
|
-
|
|
66
|
-
cd your-project
|
|
67
|
-
awm setup
|
|
68
|
-
```
|
|
70
|
+
The design is based on cognitive science — ACT-R activation decay, Hebbian learning, complementary learning systems, and synaptic homeostasis — rather than ad-hoc heuristics. See [How It Works](#how-it-works) for details.
|
|
69
71
|
|
|
70
|
-
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Benchmarks
|
|
75
|
+
|
|
76
|
+
| Eval | Score | What it tests |
|
|
77
|
+
|------|-------|---------------|
|
|
78
|
+
| Edge Cases | **100% (34/34)** | 9 failure modes: hub toxicity, flashbulb distortion, narcissistic interference, identity collision, noise forgetting benefit |
|
|
79
|
+
| Stress Test | **92.3% (48/52)** | 500 memories, 100 sleep cycles, catastrophic forgetting, adversarial spam |
|
|
80
|
+
| A/B Test | **AWM 100% vs Baseline 83%** | 100 project events, 24 recall questions |
|
|
81
|
+
| Self-Test | **97.4%** | 31 pipeline component checks |
|
|
82
|
+
| Workday | **86.7%** | 43 memories across 4 simulated work sessions |
|
|
83
|
+
| Real-World | **93.1%** | 300 code chunks from a 71K-line production monorepo |
|
|
84
|
+
| Token Savings | **64.5% savings** | Memory-guided context vs full conversation history |
|
|
85
|
+
|
|
86
|
+
All evals are reproducible: `npm run test:self`, `npm run test:edge`, `npm run test:stress`, etc. See [Testing & Evaluation](#testing--evaluation) for full details.
|
|
87
|
+
|
|
88
|
+
---
|
|
71
89
|
|
|
72
|
-
|
|
90
|
+
## Features
|
|
73
91
|
|
|
74
|
-
|
|
92
|
+
### Memory Tools (13)
|
|
75
93
|
|
|
76
|
-
| Tool |
|
|
77
|
-
|
|
78
|
-
| `memory_write` | Store a memory
|
|
94
|
+
| Tool | Purpose |
|
|
95
|
+
|------|---------|
|
|
96
|
+
| `memory_write` | Store a memory (salience filter decides disposition) |
|
|
79
97
|
| `memory_recall` | Retrieve relevant memories by context |
|
|
80
|
-
| `memory_feedback` |
|
|
81
|
-
| `memory_retract` |
|
|
82
|
-
| `memory_stats` | View memory health metrics |
|
|
98
|
+
| `memory_feedback` | Report whether a recalled memory was useful |
|
|
99
|
+
| `memory_retract` | Invalidate a wrong memory with optional correction |
|
|
100
|
+
| `memory_stats` | View memory health metrics and activity |
|
|
83
101
|
| `memory_checkpoint` | Save execution state (survives context compaction) |
|
|
84
|
-
| `memory_restore` | Recover state + relevant context at
|
|
102
|
+
| `memory_restore` | Recover state + relevant context at session start |
|
|
85
103
|
| `memory_task_add` | Create a prioritized task |
|
|
86
104
|
| `memory_task_update` | Change task status/priority |
|
|
87
105
|
| `memory_task_list` | List tasks by status |
|
|
88
106
|
| `memory_task_next` | Get the highest-priority actionable task |
|
|
107
|
+
| `memory_task_begin` | Start a task — auto-checkpoints and recalls context |
|
|
108
|
+
| `memory_task_end` | End a task — writes summary and checkpoints |
|
|
109
|
+
|
|
110
|
+
### Separate Memory Pools
|
|
111
|
+
|
|
112
|
+
By default, all projects share one memory pool. For isolated pools per folder, place a `.mcp.json` in each parent folder with a different `AWM_AGENT_ID`:
|
|
89
113
|
|
|
90
|
-
|
|
114
|
+
```
|
|
115
|
+
C:\Users\you\work\.mcp.json → AWM_AGENT_ID: "work"
|
|
116
|
+
C:\Users\you\personal\.mcp.json → AWM_AGENT_ID: "personal"
|
|
117
|
+
```
|
|
91
118
|
|
|
92
|
-
|
|
119
|
+
Claude Code uses the closest `.mcp.json` ancestor. Same database, isolation by agent ID.
|
|
93
120
|
|
|
94
|
-
|
|
121
|
+
### Incognito Mode
|
|
95
122
|
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
You have persistent memory via the agent-working-memory MCP server.
|
|
99
|
-
- At conversation start: call memory_restore to recover previous context
|
|
100
|
-
- When you learn something important: call memory_write
|
|
101
|
-
- When you need past context: call memory_recall
|
|
102
|
-
- Before long operations: call memory_checkpoint to save your state
|
|
103
|
-
- After using a recalled memory: call memory_feedback (useful/not-useful)
|
|
123
|
+
```bash
|
|
124
|
+
AWM_INCOGNITO=1 claude
|
|
104
125
|
```
|
|
105
126
|
|
|
106
|
-
|
|
127
|
+
Registers zero tools — Claude doesn't see memory at all. All other tools and MCP servers work normally.
|
|
128
|
+
|
|
129
|
+
### Auto-Checkpoint Hooks
|
|
107
130
|
|
|
108
|
-
|
|
131
|
+
Installed by `awm setup --global`:
|
|
109
132
|
|
|
110
|
-
|
|
133
|
+
- **Stop** — reminds Claude to write/recall after each response
|
|
134
|
+
- **PreCompact** — auto-checkpoints before context compression
|
|
135
|
+
- **SessionEnd** — auto-checkpoints and consolidates on close
|
|
136
|
+
- **15-min timer** — silent auto-checkpoint while session is active
|
|
111
137
|
|
|
112
|
-
###
|
|
138
|
+
### Activity Log
|
|
113
139
|
|
|
114
140
|
```bash
|
|
115
|
-
npm
|
|
116
|
-
awm serve
|
|
141
|
+
tail -f "$(npm root -g)/agent-working-memory/data/awm.log"
|
|
117
142
|
```
|
|
118
143
|
|
|
119
|
-
|
|
144
|
+
Real-time: writes, recalls, checkpoints, consolidation, hook events.
|
|
145
|
+
|
|
146
|
+
### Activity Stats
|
|
120
147
|
|
|
121
148
|
```bash
|
|
122
|
-
|
|
123
|
-
cd agent-working-memory
|
|
124
|
-
npm install
|
|
125
|
-
npx tsx src/index.ts
|
|
149
|
+
curl http://127.0.0.1:8401/stats
|
|
126
150
|
```
|
|
127
151
|
|
|
128
|
-
|
|
152
|
+
Returns daily counts: `{"writes": 8, "recalls": 9, "hooks": 3, "total": 25}`
|
|
129
153
|
|
|
130
|
-
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Memory Invocation Strategy
|
|
157
|
+
|
|
158
|
+
AWM combines deterministic hooks for guaranteed memory operations at lifecycle transitions with agent-directed usage during active work.
|
|
159
|
+
|
|
160
|
+
### Deterministic triggers (always happen)
|
|
161
|
+
|
|
162
|
+
| Event | Action |
|
|
163
|
+
|-------|--------|
|
|
164
|
+
| Session start | `memory_restore` — recover state + recall context |
|
|
165
|
+
| Pre-compaction | Auto-checkpoint via hook sidecar |
|
|
166
|
+
| Session end | Auto-checkpoint + full consolidation |
|
|
167
|
+
| Every 15 min | Silent auto-checkpoint (if active) |
|
|
168
|
+
| Task start | `memory_task_begin` — checkpoint + recall |
|
|
169
|
+
| Task end | `memory_task_end` — summary + checkpoint |
|
|
170
|
+
|
|
171
|
+
### Agent-directed triggers (when these situations occur)
|
|
172
|
+
|
|
173
|
+
**Write memory when:**
|
|
174
|
+
- A project decision is made or changed
|
|
175
|
+
- A root cause is discovered
|
|
176
|
+
- A reusable implementation pattern is established
|
|
177
|
+
- A preference, constraint, or requirement is clarified
|
|
178
|
+
- A prior assumption is found to be wrong
|
|
179
|
+
|
|
180
|
+
**Recall memory when:**
|
|
181
|
+
- Starting work on a new task or subsystem
|
|
182
|
+
- Re-entering code you haven't touched recently
|
|
183
|
+
- After context compaction
|
|
184
|
+
- After a failed attempt (check if there's prior knowledge)
|
|
185
|
+
- Before refactoring or making architectural changes
|
|
186
|
+
|
|
187
|
+
**Retract when:**
|
|
188
|
+
- A stored memory turns out to be wrong or outdated
|
|
189
|
+
|
|
190
|
+
**Feedback when:**
|
|
191
|
+
- A recalled memory was used (useful) or irrelevant (not useful)
|
|
131
192
|
|
|
132
|
-
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## HTTP API
|
|
196
|
+
|
|
197
|
+
For custom agents, scripts, or non-Claude-Code workflows:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
awm serve # From npm install
|
|
201
|
+
npx tsx src/index.ts # From source
|
|
202
|
+
```
|
|
133
203
|
|
|
134
204
|
Write a memory:
|
|
135
205
|
|
|
@@ -146,7 +216,7 @@ curl -X POST http://localhost:8400/memory/write \
|
|
|
146
216
|
}'
|
|
147
217
|
```
|
|
148
218
|
|
|
149
|
-
Recall
|
|
219
|
+
Recall:
|
|
150
220
|
|
|
151
221
|
```bash
|
|
152
222
|
curl -X POST http://localhost:8400/memory/activate \
|
|
@@ -157,60 +227,31 @@ curl -X POST http://localhost:8400/memory/activate \
|
|
|
157
227
|
}'
|
|
158
228
|
```
|
|
159
229
|
|
|
160
|
-
### Configuration
|
|
161
|
-
|
|
162
|
-
- **Change the port:** `awm serve --port 3000` or `AWM_PORT=3000`
|
|
163
|
-
- **Custom database:** `AWM_DB_PATH=/path/to/memory.db`
|
|
164
|
-
- **API key auth:** Set `AWM_API_KEY=your-secret` in `.env` — requests need `Authorization: Bearer your-secret` or `x-api-key: your-secret`
|
|
165
|
-
- **Run tests:** `npx vitest run` (65 tests)
|
|
166
|
-
- **Run eval suite:** `npm run test:self`
|
|
167
|
-
- **Data is a single file:** `data/memory.db` (SQLite). Back it up, move it, delete it to start fresh.
|
|
168
|
-
- **Models cached locally:** First run downloads to `models/`. No network after that.
|
|
169
|
-
|
|
170
230
|
---
|
|
171
231
|
|
|
172
|
-
## Docker (Quick Alternative)
|
|
173
|
-
|
|
174
|
-
If you'd rather not install Node.js locally:
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
docker build -t awm .
|
|
178
|
-
docker run -p 8400:8400 -v awm-data:/data -v awm-models:/models awm
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
This gives you the HTTP server on port 8400. The `-v` flags persist your database and models across container restarts. For MCP integration with Docker, point your `.mcp.json` to the HTTP API instead of the MCP script.
|
|
182
|
-
|
|
183
232
|
## How It Works
|
|
184
233
|
|
|
185
234
|
### The Memory Lifecycle
|
|
186
235
|
|
|
187
|
-
1. **Write** —
|
|
236
|
+
1. **Write** — Salience scoring evaluates novelty, surprise, causal depth, and effort. High-salience memories go active; borderline ones enter staging; noise is discarded.
|
|
188
237
|
|
|
189
|
-
2. **Connect** —
|
|
238
|
+
2. **Connect** — Vector embedding (MiniLM-L6-v2, 384d). Temporal edges link to recent memories. Hebbian edges form between co-retrieved memories.
|
|
190
239
|
|
|
191
|
-
3. **Retrieve** —
|
|
240
|
+
3. **Retrieve** — 10-phase pipeline: BM25 + semantic search + cross-encoder reranking + temporal decay (ACT-R) + graph walks + confidence gating.
|
|
192
241
|
|
|
193
|
-
4. **Consolidate** —
|
|
194
|
-
- **Replay** — Find clusters of semantically similar memories
|
|
195
|
-
- **Strengthen** — Reinforce edges within clusters (access-weighted)
|
|
196
|
-
- **Bridge** — Create cross-cluster shortcuts between related topics
|
|
197
|
-
- **Decay** — Weaken unused edges (confidence-modulated half-life)
|
|
198
|
-
- **Homeostasis** — Normalize outgoing edge weights to prevent hub explosion
|
|
199
|
-
- **Forget** — Archive unretrieved, weakly-connected memories (age-gated, access-scaled)
|
|
200
|
-
- **Prune redundancy** — Archive semantically duplicate low-quality memories
|
|
201
|
-
- **Sweep staging** — Promote staging memories that resonate with active ones
|
|
242
|
+
4. **Consolidate** — 7-phase sleep cycle: replay clusters, strengthen edges, bridge cross-topic, decay unused, normalize hubs, forget noise, sweep staging.
|
|
202
243
|
|
|
203
|
-
5. **Feedback** —
|
|
244
|
+
5. **Feedback** — Useful/not-useful signals adjust confidence, affecting retrieval rank and forgetting resistance.
|
|
204
245
|
|
|
205
|
-
### Cognitive
|
|
246
|
+
### Cognitive Foundations
|
|
206
247
|
|
|
207
|
-
|
|
248
|
+
- **ACT-R activation decay** (Anderson 1993) — memories decay with time, strengthen with use
|
|
249
|
+
- **Hebbian learning** — co-retrieved memories form stronger associative edges
|
|
250
|
+
- **Complementary Learning Systems** — fast capture (salience + staging) + slow consolidation (sleep cycle)
|
|
251
|
+
- **Synaptic homeostasis** — edge weight normalization prevents hub domination
|
|
252
|
+
- **Forgetting as feature** — noise removal improves signal-to-noise for connected memories
|
|
208
253
|
|
|
209
|
-
|
|
210
|
-
- **Hebbian learning** — "neurons that fire together wire together." Co-retrieved memories form stronger associative edges, enabling graph-based spreading activation.
|
|
211
|
-
- **Complementary Learning Systems** — fast capture (salience filter + staging) combined with slow consolidation (sleep cycle). Mirrors hippocampal-neocortical memory transfer.
|
|
212
|
-
- **Synaptic homeostasis** — total connection weight per memory is normalized to prevent any single "hub" from dominating retrieval. Similar to how the brain downscales synaptic strength during sleep.
|
|
213
|
-
- **Forgetting as feature** — noise removal improves signal-to-noise ratio for connected memories. Unretrieved noise gets pruned; confirmed knowledge gets stronger. In benchmarks, aggressive forgetting improves quality recall from 3/5 to 5/5.
|
|
254
|
+
---
|
|
214
255
|
|
|
215
256
|
## Architecture
|
|
216
257
|
|
|
@@ -220,9 +261,10 @@ src/
|
|
|
220
261
|
embeddings.ts - Local vector embeddings (MiniLM-L6-v2, 384d)
|
|
221
262
|
reranker.ts - Cross-encoder passage scoring (ms-marco-MiniLM)
|
|
222
263
|
query-expander.ts - Synonym expansion (flan-t5-small)
|
|
223
|
-
salience.ts - Write-time importance scoring
|
|
264
|
+
salience.ts - Write-time importance scoring (novelty + salience)
|
|
224
265
|
decay.ts - ACT-R temporal activation decay
|
|
225
266
|
hebbian.ts - Association strengthening/weakening
|
|
267
|
+
logger.ts - Append-only activity log (data/awm.log)
|
|
226
268
|
engine/ # Processing pipelines
|
|
227
269
|
activation.ts - 10-phase retrieval pipeline
|
|
228
270
|
consolidation.ts - 7-phase sleep cycle consolidation
|
|
@@ -230,68 +272,40 @@ src/
|
|
|
230
272
|
staging.ts - Weak signal buffer (promote or discard)
|
|
231
273
|
retraction.ts - Negative memory / corrections
|
|
232
274
|
eviction.ts - Capacity enforcement
|
|
275
|
+
hooks/
|
|
276
|
+
sidecar.ts - Hook HTTP server (auto-checkpoint, stats, timer)
|
|
233
277
|
storage/
|
|
234
278
|
sqlite.ts - SQLite + FTS5 persistence layer
|
|
235
279
|
api/
|
|
236
280
|
routes.ts - HTTP endpoints (memory + task + system)
|
|
237
|
-
mcp.ts - MCP server (
|
|
281
|
+
mcp.ts - MCP server (13 tools, incognito support)
|
|
282
|
+
cli.ts - CLI (setup, serve, hook config)
|
|
238
283
|
index.ts - HTTP server entry point
|
|
239
284
|
```
|
|
240
285
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
Tasks are first-class memory objects with status and priority tracking:
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
# Create a task
|
|
247
|
-
curl -X POST http://localhost:8400/task/create \
|
|
248
|
-
-H "Content-Type: application/json" \
|
|
249
|
-
-d '{
|
|
250
|
-
"agentId": "my-agent",
|
|
251
|
-
"concept": "Fix login redirect bug",
|
|
252
|
-
"content": "Users get 404 after OAuth callback",
|
|
253
|
-
"priority": "urgent"
|
|
254
|
-
}'
|
|
255
|
-
|
|
256
|
-
# Get next actionable task
|
|
257
|
-
curl http://localhost:8400/task/next/my-agent
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
Priority levels: `urgent` > `high` > `medium` > `low`. Tasks can be blocked by other tasks and automatically unblock when dependencies complete.
|
|
286
|
+
---
|
|
261
287
|
|
|
262
288
|
## Testing & Evaluation
|
|
263
289
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
### Unit Tests (no server needed)
|
|
290
|
+
### Unit Tests
|
|
267
291
|
|
|
268
292
|
```bash
|
|
269
|
-
npx vitest run #
|
|
293
|
+
npx vitest run # 68 tests
|
|
270
294
|
```
|
|
271
295
|
|
|
272
|
-
### Eval Suites
|
|
296
|
+
### Eval Suites
|
|
273
297
|
|
|
274
298
|
| Command | What it tests | Score |
|
|
275
299
|
|---------|--------------|-------|
|
|
276
|
-
| `npm run test:self` | 31 pipeline
|
|
277
|
-
| `npm run test:edge` | 9 adversarial failure modes
|
|
278
|
-
| `npm run test:stress` | 500 memories, 100 sleep cycles, catastrophic forgetting
|
|
279
|
-
| `npm run test:workday` |
|
|
280
|
-
| `npm run test:ab` |
|
|
281
|
-
| `npm run test:tokens` |
|
|
282
|
-
| `npm run test:realworld` |
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
### What the Edge Cases Prove
|
|
287
|
-
|
|
288
|
-
The edge case suite is particularly important because it tests the failure modes that kill other memory systems:
|
|
289
|
-
|
|
290
|
-
- **Context Collapse** — Can AWM find 5 rare but important memories buried under 100 routine ones? (Yes — salience scoring and feedback bonuses keep confirmed knowledge afloat.)
|
|
291
|
-
- **Mega-Hub Toxicity** — If one memory has 50 connections, does it hijack every query? (No — synaptic homeostasis normalizes edge weights.)
|
|
292
|
-
- **Flashbulb Distortion** — Does a high-emotion memory overwrite the actual facts? (No — retraction system and confidence scoring keep specifics intact.)
|
|
293
|
-
- **Narcissistic Interference** — Can 30 self-referential "I am amazing" claims drown out 4 real facts? (No — redundancy pruning archives the clones, feedback bonuses elevate confirmed knowledge.)
|
|
294
|
-
- **Noise Forgetting Benefit** — Does forgetting 150 noise memories hurt the 5 quality ones? (Opposite — recall stays 5/5 because forgetting *improves* signal-to-noise ratio for connected memories.)
|
|
300
|
+
| `npm run test:self` | 31 pipeline checks: embeddings, BM25, reranker, decay, confidence, Hebbian, graph walks, staging | **97.4%** |
|
|
301
|
+
| `npm run test:edge` | 9 adversarial failure modes: context collapse, hub toxicity, flashbulb distortion, narcissistic interference, identity collision, contradiction, bridge overshoot, noise benefit | **100%** |
|
|
302
|
+
| `npm run test:stress` | 500 memories, 100 sleep cycles, catastrophic forgetting, adversarial spam, recovery | **92.3%** |
|
|
303
|
+
| `npm run test:workday` | 43 memories across 4 projects, 14 recall challenges | **86.7%** |
|
|
304
|
+
| `npm run test:ab` | AWM vs keyword baseline, 100 events, 24 questions | **AWM 100% vs 83%** |
|
|
305
|
+
| `npm run test:tokens` | Token savings vs full conversation history | **64.5%** |
|
|
306
|
+
| `npm run test:realworld` | 300 chunks from 71K-line monorepo, 16 challenges | **93.1%** |
|
|
307
|
+
|
|
308
|
+
---
|
|
295
309
|
|
|
296
310
|
## Environment Variables
|
|
297
311
|
|
|
@@ -299,10 +313,13 @@ The edge case suite is particularly important because it tests the failure modes
|
|
|
299
313
|
|----------|---------|---------|
|
|
300
314
|
| `AWM_PORT` | `8400` | HTTP server port |
|
|
301
315
|
| `AWM_DB_PATH` | `memory.db` | SQLite database path |
|
|
302
|
-
| `AWM_AGENT_ID` | `claude-code` |
|
|
316
|
+
| `AWM_AGENT_ID` | `claude-code` | Agent ID (memory namespace) |
|
|
303
317
|
| `AWM_EMBED_MODEL` | `Xenova/all-MiniLM-L6-v2` | Embedding model |
|
|
304
318
|
| `AWM_EMBED_DIMS` | `384` | Embedding dimensions |
|
|
305
319
|
| `AWM_RERANKER_MODEL` | `Xenova/ms-marco-MiniLM-L-6-v2` | Reranker model |
|
|
320
|
+
| `AWM_HOOK_PORT` | `8401` | Hook sidecar port |
|
|
321
|
+
| `AWM_HOOK_SECRET` | *(none)* | Bearer token for hook auth |
|
|
322
|
+
| `AWM_INCOGNITO` | *(unset)* | Set to `1` to disable all tools |
|
|
306
323
|
|
|
307
324
|
## Tech Stack
|
|
308
325
|
|
|
@@ -316,7 +333,7 @@ The edge case suite is particularly important because it tests the failure modes
|
|
|
316
333
|
| Tests | Vitest 4 |
|
|
317
334
|
| Validation | Zod 4 |
|
|
318
335
|
|
|
319
|
-
All three ML models
|
|
336
|
+
All three ML models run locally via ONNX. No external API calls for retrieval. The entire system is a single SQLite file + a Node.js process.
|
|
320
337
|
|
|
321
338
|
## License
|
|
322
339
|
|
package/dist/cli.js
CHANGED
|
@@ -170,15 +170,32 @@ function setup() {
|
|
|
170
170
|
|
|
171
171
|
## Memory (AWM)
|
|
172
172
|
You have persistent memory via the agent-working-memory MCP server.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
-
|
|
173
|
+
|
|
174
|
+
### Lifecycle (always do these)
|
|
175
|
+
- Session start: call memory_restore to recover previous context
|
|
176
|
+
- Starting a task: call memory_task_begin (checkpoints + recalls relevant memories)
|
|
177
|
+
- Finishing a task: call memory_task_end with a summary
|
|
178
|
+
- Auto-checkpoint: hooks handle compaction, session end, and 15-min timer (no action needed)
|
|
179
|
+
|
|
180
|
+
### Write memory when:
|
|
181
|
+
- A project decision is made or changed
|
|
182
|
+
- A root cause is discovered after debugging
|
|
183
|
+
- A reusable implementation pattern is established
|
|
184
|
+
- A user preference, constraint, or requirement is clarified
|
|
185
|
+
- A prior assumption is found to be wrong
|
|
186
|
+
- A significant piece of work is completed
|
|
187
|
+
|
|
188
|
+
### Recall memory when:
|
|
189
|
+
- Starting work on a new task or subsystem
|
|
190
|
+
- Re-entering code you haven't touched recently
|
|
191
|
+
- After a failed attempt — check if there's prior knowledge
|
|
192
|
+
- Before refactoring or making architectural changes
|
|
193
|
+
- When a topic comes up that you might have prior context on
|
|
194
|
+
|
|
195
|
+
### Also:
|
|
178
196
|
- After using a recalled memory: call memory_feedback (useful/not-useful)
|
|
179
|
-
- To
|
|
180
|
-
- To
|
|
181
|
-
- Auto-checkpoint: hooks auto-save on context compaction and session end (no action needed)
|
|
197
|
+
- To correct wrong info: call memory_retract
|
|
198
|
+
- To track work items: memory_task_add, memory_task_update, memory_task_list, memory_task_next
|
|
182
199
|
`;
|
|
183
200
|
// For global: write to ~/.claude/CLAUDE.md (loaded by Claude Code in every session)
|
|
184
201
|
// For project: write to ./CLAUDE.md in the current directory
|
|
@@ -228,22 +245,32 @@ You have persistent memory via the agent-working-memory MCP server.
|
|
|
228
245
|
if (!settings.hooks)
|
|
229
246
|
settings.hooks = {};
|
|
230
247
|
const hookUrl = `http://127.0.0.1:${hookPort}/hooks/checkpoint`;
|
|
248
|
+
// Stop — remind Claude to write/recall/switch tasks after each response
|
|
249
|
+
settings.hooks.Stop = [{
|
|
250
|
+
matcher: '',
|
|
251
|
+
hooks: [{
|
|
252
|
+
type: 'command',
|
|
253
|
+
command: 'echo "MEMORY: (1) Did you learn anything new? Call memory_write. (2) Are you about to work on a topic you might have prior knowledge about? Call memory_recall. (3) Switching tasks? Call memory_task_begin."',
|
|
254
|
+
timeout: 5,
|
|
255
|
+
async: true,
|
|
256
|
+
}],
|
|
257
|
+
}];
|
|
231
258
|
// PreCompact — auto-checkpoint before context compaction
|
|
232
259
|
settings.hooks.PreCompact = [{
|
|
233
260
|
matcher: '',
|
|
234
261
|
hooks: [{
|
|
235
262
|
type: 'command',
|
|
236
|
-
command: `curl -sf -X POST ${hookUrl} -H "Content-Type: application/json" -H "Authorization: Bearer ${hookSecret}" -d "{\\"hook_event_name\\":\\"PreCompact\\"}" --max-time
|
|
237
|
-
timeout:
|
|
263
|
+
command: `curl -sf -X POST ${hookUrl} -H "Content-Type: application/json" -H "Authorization: Bearer ${hookSecret}" -d "{\\"hook_event_name\\":\\"PreCompact\\"}" --max-time 2`,
|
|
264
|
+
timeout: 3,
|
|
238
265
|
}],
|
|
239
266
|
}];
|
|
240
|
-
// SessionEnd — auto-checkpoint on session close
|
|
267
|
+
// SessionEnd — auto-checkpoint on session close (fast timeout to avoid cancellation)
|
|
241
268
|
settings.hooks.SessionEnd = [{
|
|
242
269
|
matcher: '',
|
|
243
270
|
hooks: [{
|
|
244
271
|
type: 'command',
|
|
245
|
-
command: `curl -sf -X POST ${hookUrl} -H "Content-Type: application/json" -H "Authorization: Bearer ${hookSecret}" -d "{\\"hook_event_name\\":\\"SessionEnd\\"}" --max-time
|
|
246
|
-
timeout:
|
|
272
|
+
command: `curl -sf -X POST ${hookUrl} -H "Content-Type: application/json" -H "Authorization: Bearer ${hookSecret}" -d "{\\"hook_event_name\\":\\"SessionEnd\\"}" --max-time 2`,
|
|
273
|
+
timeout: 3,
|
|
247
274
|
}],
|
|
248
275
|
}];
|
|
249
276
|
// Ensure settings directory exists
|
|
@@ -252,7 +279,7 @@ You have persistent memory via the agent-working-memory MCP server.
|
|
|
252
279
|
mkdirSync(settingsDir, { recursive: true });
|
|
253
280
|
}
|
|
254
281
|
writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
|
|
255
|
-
hookAction = ` Hooks: PreCompact + SessionEnd → auto-checkpoint (port ${hookPort})`;
|
|
282
|
+
hookAction = ` Hooks: Stop (memory reminder) + PreCompact + SessionEnd → auto-checkpoint (port ${hookPort})`;
|
|
256
283
|
}
|
|
257
284
|
const scope = isGlobal ? 'globally (all projects)' : cwd;
|
|
258
285
|
console.log(`
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SA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AM;IACR,KAAK,QAAQ,CAAC;IACd,KAAK,IAAI,CAAC;IACV,KAAK,SAAS;QACZ,UAAU,EAAE,CAAC;QACb,MAAM;IACR;QACE,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;QAC7C,UAAU,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidecar.d.ts","sourceRoot":"","sources":["../../src/hooks/sidecar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3D;
|
|
1
|
+
{"version":3,"file":"sidecar.d.ts","sourceRoot":"","sources":["../../src/hooks/sidecar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3D;AA0GD,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,IAAI,CAAA;CAAE,CAwJrE"}
|