agent-working-memory 0.7.7 → 0.7.8
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 +8 -1
- package/dist/adapters/common.d.ts.map +1 -1
- package/dist/adapters/common.js +45 -2
- package/dist/adapters/common.js.map +1 -1
- package/dist/api/routes.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp.js +2 -2
- package/package.json +1 -1
- package/src/adapters/common.ts +45 -2
- package/src/api/routes.ts +1 -1
- package/src/cli.ts +1 -1
- package/src/index.ts +1 -1
- package/src/mcp.ts +2 -2
package/README.md
CHANGED
|
@@ -389,6 +389,9 @@ npm run test:locomo # LoCoMo industry benchmark (28.2%)
|
|
|
389
389
|
| `AWM_HOOK_SECRET` | *(none)* | Bearer token for hook auth |
|
|
390
390
|
| `AWM_API_KEY` | *(none)* | Bearer token for HTTP API auth |
|
|
391
391
|
| `AWM_INCOGNITO` | *(unset)* | Set to `1` to disable all tools |
|
|
392
|
+
| `AWM_COORDINATION` | *(unset)* | Set to `true` to enable hive coordination endpoints |
|
|
393
|
+
| `AWM_DISABLE_POOL_FILTER` | *(unset)* | Set to `1` to disable the candidate pool reduction (0.7.7+). Reverts recall to scoring all active candidates — slower but useful for A/B testing if a recall regression appears |
|
|
394
|
+
| `AWM_WORKSPACE` | *(unset)* | Default workspace for cross-agent recall in hive setups |
|
|
392
395
|
|
|
393
396
|
## Tech Stack
|
|
394
397
|
|
|
@@ -407,6 +410,10 @@ npm run test:locomo # LoCoMo industry benchmark (28.2%)
|
|
|
407
410
|
|
|
408
411
|
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.
|
|
409
412
|
|
|
413
|
+
## What's New in v0.7.8
|
|
414
|
+
|
|
415
|
+
- **Install template updated for the 0.7.5/0.7.6/0.7.7 behaviors** — `awm setup` now writes a richer CLAUDE.md that teaches agents about memory classes (`canonical | working | ephemeral`), salience auto-promotion patterns (`detectUserFeedback` for stakeholder quotes, `detectVerifiedFinding` for operational records with action-verb + concrete IDs), and the new env-var escape hatches. Existing installs upgrade via `npm install -g agent-working-memory@latest && awm setup --global` then restart Claude Code. No functional code change in this release — version bumped solely so the new template ships.
|
|
416
|
+
|
|
410
417
|
## What's New in v0.7.7
|
|
411
418
|
|
|
412
419
|
- **Recall latency 2.5s → 1.0s end-to-end (~50% on top of 0.7.6)** — phase-breakdown spike showed that after the 0.7.6 BM25 fix, the new bottleneck was `getAssociationsForBatch` over all ~10K candidates (68% of recall latency). Added a cheap pre-filter before deep scoring: candidates survive only if they have a BM25 hit, a cosine z-score above the gate, or concept-token overlap with the query. From ~10K candidates → typically 100-300 survivors. Graph-walk correctness preserved (it only boosts neighbors with `textMatch >= 0.05`, which would also pass this filter). Recall quality A/B verified: 8/8 top-1 matches, 90% top-5 overlap, 94% top-10 overlap on diverse queries. Set `AWM_DISABLE_POOL_FILTER=1` to revert. **Cumulative since 0.7.4 baseline: 11-23s → 0.9-1.6s (~10-15× faster).**
|
|
@@ -461,7 +468,7 @@ See [CHANGELOG.md](CHANGELOG.md) for full details.
|
|
|
461
468
|
|
|
462
469
|
## Project Status
|
|
463
470
|
|
|
464
|
-
AWM is in active development (v0.7.
|
|
471
|
+
AWM is in active development (v0.7.8). The core memory pipeline, consolidation system, multi-agent coordination, and MCP integration are stable and used daily in production coding workflows.
|
|
465
472
|
|
|
466
473
|
- Core retrieval and consolidation: **stable**
|
|
467
474
|
- MCP tools and Claude Code integration: **stable**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/adapters/common.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,gEAAgE;AAChE,wBAAgB,kBAAkB,IAAI,MAAM,CAG3C;AAED,2EAA2E;AAC3E,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,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AM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,OAAO,GACjB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOxB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,YAAY,GAAG;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAkBA;AAED,uDAAuD;AACvD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,YAAY,CA6Bf;AAED,sBAAsB;AACtB,wBAAgB,OAAO,IAAI,MAAM,CAEhC;AAID;;;GAGG;AACH,eAAO,MAAM,uBAAuB,QAgFvB,CAAC"}
|
package/dist/adapters/common.js
CHANGED
|
@@ -138,16 +138,59 @@ You have persistent memory via the agent-working-memory MCP server.
|
|
|
138
138
|
- \`confidence_level\`: verified (tested), observed (read in code), assumed (reasoning)
|
|
139
139
|
- \`intent\`: decision, finding, todo, question, or context
|
|
140
140
|
|
|
141
|
+
### Memory classes (controls how strictly the salience filter gates the write)
|
|
142
|
+
- \`memory_class: canonical\` — source-of-truth memories. Floor 0.7 salience, never staged.
|
|
143
|
+
Use for: user-stated decisions, project requirements, verified architectural facts,
|
|
144
|
+
cross-agent shared context. **In a hive (multi-agent) setup, always use \`canonical\`
|
|
145
|
+
for writes that other agents must be able to recall** — the default \`working\` class
|
|
146
|
+
may get filtered.
|
|
147
|
+
- \`memory_class: working\` (default) — observations and findings. Salience-gated.
|
|
148
|
+
- \`memory_class: ephemeral\` — short-lived context that should decay quickly.
|
|
149
|
+
|
|
150
|
+
### Salience auto-promotion (defense in depth)
|
|
151
|
+
The salience filter automatically promotes certain content patterns even if you forget
|
|
152
|
+
to set \`memory_class\` explicitly:
|
|
153
|
+
- **User feedback** — content starting with "Robert said…", "Katherine directed…",
|
|
154
|
+
"Nancy decided…" etc. auto-promotes to canonical. So quoting the user verbatim
|
|
155
|
+
always preserves the decision.
|
|
156
|
+
- **Verified operational records** — content with an action verb (Submitted, Finalized,
|
|
157
|
+
Completed, Reconciled, Triaged, Posted, Resolved, Stamped, Pushed, Deployed, Migrated,
|
|
158
|
+
Imported, Exported, Backfilled) plus 2+ concrete identifiers (ISO date \`YYYY-MM-DD\`,
|
|
159
|
+
or contextual numeric IDs like "event 18969", "ticket #18330", "USEF 341980") gets
|
|
160
|
+
a 0.45 salience floor. So batch summaries with real IDs survive even when topic
|
|
161
|
+
terms repeat.
|
|
162
|
+
|
|
163
|
+
If neither pattern applies and you want a memory to definitely survive, set
|
|
164
|
+
\`memory_class: canonical\` explicitly. Don't rely on auto-promotion for important writes.
|
|
165
|
+
|
|
141
166
|
### Recall memory when:
|
|
167
|
+
- **BEFORE stating ANY fact about how a system works** — recall first; if AWM doesn't
|
|
168
|
+
have it, read the code. Never guess and present it as fact.
|
|
169
|
+
- **BEFORE searching the filesystem** — recall first; AWM is faster and has cross-session
|
|
170
|
+
knowledge that file search doesn't.
|
|
142
171
|
- Starting work on a new task or subsystem
|
|
143
172
|
- Re-entering code you haven't touched recently
|
|
144
173
|
- After a failed attempt — check if there's prior knowledge
|
|
145
174
|
- Before refactoring or making architectural changes
|
|
146
175
|
- When a topic comes up that you might have prior context on
|
|
147
176
|
|
|
177
|
+
Recall is fast (~1s typical). Use it freely.
|
|
178
|
+
|
|
179
|
+
### Keep memory fresh
|
|
180
|
+
- After recalling a memory, if you observe the real state is different → call
|
|
181
|
+
\`memory_supersede\` immediately with the corrected version.
|
|
182
|
+
- After using a recalled memory: call \`memory_feedback\` (useful/not-useful) so the
|
|
183
|
+
activation engine learns what's valuable.
|
|
184
|
+
- If you discover a memory is factually wrong: \`memory_retract\` to remove it.
|
|
185
|
+
|
|
148
186
|
### Also:
|
|
149
|
-
- After using a recalled memory: call memory_feedback (useful/not-useful) — strengthens useful associations
|
|
150
|
-
- To correct wrong info: call memory_retract or memory_supersede
|
|
151
187
|
- To track work items: memory_task_add, memory_task_update, memory_task_list, memory_task_next
|
|
188
|
+
- AWM is shared across all agents in real time. When any agent writes or supersedes a
|
|
189
|
+
memory, every other agent can recall it immediately.
|
|
190
|
+
|
|
191
|
+
### Diagnostics / escape hatches (env vars, only if you know why)
|
|
192
|
+
- \`AWM_DISABLE_POOL_FILTER=1\` — disables the candidate pool reduction in recall (added
|
|
193
|
+
in 0.7.7 for ~50% speedup). Reverts to scoring all candidates. Use only if you suspect
|
|
194
|
+
a recall regression and want to A/B test against the pre-0.7.7 path.
|
|
152
195
|
`.trimStart();
|
|
153
196
|
//# sourceMappingURL=common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/adapters/common.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,sCAAsC;AAEtC;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,gEAAgE;AAChE,MAAM,UAAU,kBAAkB;IAChC,uEAAuE;IACvE,OAAO,OAAO,CAAC,SAAS,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
|
@@ -307,7 +307,7 @@ async function exportMemories() {
|
|
|
307
307
|
// Collect unique agents
|
|
308
308
|
const agents = [...new Set(memories.map((m) => m.agent_id))];
|
|
309
309
|
const exportData = {
|
|
310
|
-
version: '0.7.
|
|
310
|
+
version: '0.7.8',
|
|
311
311
|
exported_at: new Date().toISOString(),
|
|
312
312
|
source_db: dbPath,
|
|
313
313
|
agent_filter: agentFilter,
|
package/dist/index.js
CHANGED
|
@@ -175,7 +175,7 @@ async function main() {
|
|
|
175
175
|
getExpander().catch(err => console.warn('Query expander model unavailable:', err.message));
|
|
176
176
|
// Start server
|
|
177
177
|
await app.listen({ port: PORT, host: '0.0.0.0' });
|
|
178
|
-
console.log(`AgentWorkingMemory v0.7.
|
|
178
|
+
console.log(`AgentWorkingMemory v0.7.8 listening on port ${PORT}`);
|
|
179
179
|
// Graceful shutdown
|
|
180
180
|
const shutdown = async () => {
|
|
181
181
|
clearInterval(backupTimer);
|
package/dist/mcp.js
CHANGED
|
@@ -71,7 +71,7 @@ import { queryPeerDecisions, formatPeerDecisions } from './coordination/peer-dec
|
|
|
71
71
|
const INCOGNITO = process.env.AWM_INCOGNITO === '1' || process.env.AWM_INCOGNITO === 'true';
|
|
72
72
|
if (INCOGNITO) {
|
|
73
73
|
console.error('AWM: incognito mode — all memory tools disabled, nothing will be recorded');
|
|
74
|
-
const server = new McpServer({ name: 'agent-working-memory', version: '0.7.
|
|
74
|
+
const server = new McpServer({ name: 'agent-working-memory', version: '0.7.8' });
|
|
75
75
|
const transport = new StdioServerTransport();
|
|
76
76
|
server.connect(transport).catch(err => {
|
|
77
77
|
console.error('MCP server failed:', err);
|
|
@@ -102,7 +102,7 @@ else {
|
|
|
102
102
|
let coordDb = null;
|
|
103
103
|
const server = new McpServer({
|
|
104
104
|
name: 'agent-working-memory',
|
|
105
|
-
version: '0.7.
|
|
105
|
+
version: '0.7.8',
|
|
106
106
|
});
|
|
107
107
|
server.registerResource('awm-overview', 'awm://server/overview', {
|
|
108
108
|
title: 'AWM Overview',
|
package/package.json
CHANGED
package/src/adapters/common.ts
CHANGED
|
@@ -166,15 +166,58 @@ You have persistent memory via the agent-working-memory MCP server.
|
|
|
166
166
|
- \`confidence_level\`: verified (tested), observed (read in code), assumed (reasoning)
|
|
167
167
|
- \`intent\`: decision, finding, todo, question, or context
|
|
168
168
|
|
|
169
|
+
### Memory classes (controls how strictly the salience filter gates the write)
|
|
170
|
+
- \`memory_class: canonical\` — source-of-truth memories. Floor 0.7 salience, never staged.
|
|
171
|
+
Use for: user-stated decisions, project requirements, verified architectural facts,
|
|
172
|
+
cross-agent shared context. **In a hive (multi-agent) setup, always use \`canonical\`
|
|
173
|
+
for writes that other agents must be able to recall** — the default \`working\` class
|
|
174
|
+
may get filtered.
|
|
175
|
+
- \`memory_class: working\` (default) — observations and findings. Salience-gated.
|
|
176
|
+
- \`memory_class: ephemeral\` — short-lived context that should decay quickly.
|
|
177
|
+
|
|
178
|
+
### Salience auto-promotion (defense in depth)
|
|
179
|
+
The salience filter automatically promotes certain content patterns even if you forget
|
|
180
|
+
to set \`memory_class\` explicitly:
|
|
181
|
+
- **User feedback** — content starting with "Robert said…", "Katherine directed…",
|
|
182
|
+
"Nancy decided…" etc. auto-promotes to canonical. So quoting the user verbatim
|
|
183
|
+
always preserves the decision.
|
|
184
|
+
- **Verified operational records** — content with an action verb (Submitted, Finalized,
|
|
185
|
+
Completed, Reconciled, Triaged, Posted, Resolved, Stamped, Pushed, Deployed, Migrated,
|
|
186
|
+
Imported, Exported, Backfilled) plus 2+ concrete identifiers (ISO date \`YYYY-MM-DD\`,
|
|
187
|
+
or contextual numeric IDs like "event 18969", "ticket #18330", "USEF 341980") gets
|
|
188
|
+
a 0.45 salience floor. So batch summaries with real IDs survive even when topic
|
|
189
|
+
terms repeat.
|
|
190
|
+
|
|
191
|
+
If neither pattern applies and you want a memory to definitely survive, set
|
|
192
|
+
\`memory_class: canonical\` explicitly. Don't rely on auto-promotion for important writes.
|
|
193
|
+
|
|
169
194
|
### Recall memory when:
|
|
195
|
+
- **BEFORE stating ANY fact about how a system works** — recall first; if AWM doesn't
|
|
196
|
+
have it, read the code. Never guess and present it as fact.
|
|
197
|
+
- **BEFORE searching the filesystem** — recall first; AWM is faster and has cross-session
|
|
198
|
+
knowledge that file search doesn't.
|
|
170
199
|
- Starting work on a new task or subsystem
|
|
171
200
|
- Re-entering code you haven't touched recently
|
|
172
201
|
- After a failed attempt — check if there's prior knowledge
|
|
173
202
|
- Before refactoring or making architectural changes
|
|
174
203
|
- When a topic comes up that you might have prior context on
|
|
175
204
|
|
|
205
|
+
Recall is fast (~1s typical). Use it freely.
|
|
206
|
+
|
|
207
|
+
### Keep memory fresh
|
|
208
|
+
- After recalling a memory, if you observe the real state is different → call
|
|
209
|
+
\`memory_supersede\` immediately with the corrected version.
|
|
210
|
+
- After using a recalled memory: call \`memory_feedback\` (useful/not-useful) so the
|
|
211
|
+
activation engine learns what's valuable.
|
|
212
|
+
- If you discover a memory is factually wrong: \`memory_retract\` to remove it.
|
|
213
|
+
|
|
176
214
|
### Also:
|
|
177
|
-
- After using a recalled memory: call memory_feedback (useful/not-useful) — strengthens useful associations
|
|
178
|
-
- To correct wrong info: call memory_retract or memory_supersede
|
|
179
215
|
- To track work items: memory_task_add, memory_task_update, memory_task_list, memory_task_next
|
|
216
|
+
- AWM is shared across all agents in real time. When any agent writes or supersedes a
|
|
217
|
+
memory, every other agent can recall it immediately.
|
|
218
|
+
|
|
219
|
+
### Diagnostics / escape hatches (env vars, only if you know why)
|
|
220
|
+
- \`AWM_DISABLE_POOL_FILTER=1\` — disables the candidate pool reduction in recall (added
|
|
221
|
+
in 0.7.7 for ~50% speedup). Reverts to scoring all candidates. Use only if you suspect
|
|
222
|
+
a recall regression and want to A/B test against the pre-0.7.7 path.
|
|
180
223
|
`.trimStart();
|
package/src/api/routes.ts
CHANGED
|
@@ -705,7 +705,7 @@ export function registerRoutes(app: FastifyInstance, deps: MemoryDeps): void {
|
|
|
705
705
|
const base: Record<string, unknown> = {
|
|
706
706
|
status: 'ok',
|
|
707
707
|
timestamp: new Date().toISOString(),
|
|
708
|
-
version: '0.7.
|
|
708
|
+
version: '0.7.8',
|
|
709
709
|
coordination: coordEnabled,
|
|
710
710
|
};
|
|
711
711
|
if (coordEnabled) {
|
package/src/cli.ts
CHANGED
|
@@ -334,7 +334,7 @@ async function exportMemories() {
|
|
|
334
334
|
const agents = [...new Set(memories.map((m: any) => m.agent_id))];
|
|
335
335
|
|
|
336
336
|
const exportData = {
|
|
337
|
-
version: '0.7.
|
|
337
|
+
version: '0.7.8',
|
|
338
338
|
exported_at: new Date().toISOString(),
|
|
339
339
|
source_db: dbPath,
|
|
340
340
|
agent_filter: agentFilter,
|
package/src/index.ts
CHANGED
|
@@ -177,7 +177,7 @@ async function main() {
|
|
|
177
177
|
|
|
178
178
|
// Start server
|
|
179
179
|
await app.listen({ port: PORT, host: '0.0.0.0' });
|
|
180
|
-
console.log(`AgentWorkingMemory v0.7.
|
|
180
|
+
console.log(`AgentWorkingMemory v0.7.8 listening on port ${PORT}`);
|
|
181
181
|
|
|
182
182
|
// Graceful shutdown
|
|
183
183
|
const shutdown = async () => {
|
package/src/mcp.ts
CHANGED
|
@@ -78,7 +78,7 @@ const INCOGNITO = process.env.AWM_INCOGNITO === '1' || process.env.AWM_INCOGNITO
|
|
|
78
78
|
|
|
79
79
|
if (INCOGNITO) {
|
|
80
80
|
console.error('AWM: incognito mode — all memory tools disabled, nothing will be recorded');
|
|
81
|
-
const server = new McpServer({ name: 'agent-working-memory', version: '0.7.
|
|
81
|
+
const server = new McpServer({ name: 'agent-working-memory', version: '0.7.8' });
|
|
82
82
|
const transport = new StdioServerTransport();
|
|
83
83
|
server.connect(transport).catch(err => {
|
|
84
84
|
console.error('MCP server failed:', err);
|
|
@@ -115,7 +115,7 @@ let coordDb: import('better-sqlite3').Database | null = null;
|
|
|
115
115
|
|
|
116
116
|
const server = new McpServer({
|
|
117
117
|
name: 'agent-working-memory',
|
|
118
|
-
version: '0.7.
|
|
118
|
+
version: '0.7.8',
|
|
119
119
|
});
|
|
120
120
|
|
|
121
121
|
server.registerResource(
|