@smyslenny/agent-memory 2.2.0 → 4.0.0-alpha.1
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 +163 -41
- package/README.md +234 -156
- package/dist/bin/agent-memory.js +2423 -784
- package/dist/bin/agent-memory.js.map +1 -1
- package/dist/index.d.ts +535 -215
- package/dist/index.js +2635 -876
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +2330 -928
- package/dist/mcp/server.js.map +1 -1
- package/docs/README-zh.md +23 -0
- package/docs/architecture.md +239 -0
- package/docs/assets/architecture-diagram.jpg +0 -0
- package/docs/assets/banner.jpg +0 -0
- package/docs/assets/icon.jpg +0 -0
- package/docs/assets/npm-badge.jpg +0 -0
- package/docs/assets/social-preview.jpg +0 -0
- package/docs/design/0014-memory-core-dedup.md +722 -0
- package/docs/design/0015-v4-overhaul.md +631 -0
- package/docs/design/TEMPLATE.md +67 -0
- package/docs/integrations/generic.md +293 -0
- package/docs/integrations/openclaw.md +148 -0
- package/docs/migration-v3-v4.md +236 -0
- package/package.json +11 -5
- package/README.zh-CN.md +0 -170
package/CHANGELOG.md
CHANGED
|
@@ -1,57 +1,179 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 4.0.0-alpha.1 (2026-03-09)
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### 🚀 Repositioning
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- **memory-tidy** (03:00): Triggers `agent-memory.reflect phase=all` (Ebbinghaus decay + tidy + govern) after Markdown consolidation, with consistency spot-check
|
|
10
|
-
- **memory-surface** (14:05 & 22:05): Generates structured `RECENT.md` (≤80 lines) from high-vitality agent-memory entries, with fallback to raw journal reading
|
|
11
|
-
- **Design principle**: Markdown remains source of truth; agent-memory is a derived index layer with best-effort sync
|
|
12
|
-
- **README updated** with full OpenClaw Integration guide
|
|
7
|
+
AgentMemory v4 is now documented and packaged as an **agent-native memory layer
|
|
8
|
+
with lifecycle management**.
|
|
13
9
|
|
|
14
|
-
|
|
10
|
+
What changed at the product level:
|
|
15
11
|
|
|
16
|
-
|
|
12
|
+
- README is now **English-first** and generic-runtime-first
|
|
13
|
+
- OpenClaw is still supported, but now documented as an **optional host example**
|
|
14
|
+
- `memory/*.md + MEMORY.md` is treated as an **optional workflow**, not the
|
|
15
|
+
product definition
|
|
16
|
+
- CLI, MCP stdio, and HTTP/SSE are all first-class integration paths
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
- **Phase 5 prompt template** — New `examples/memory-janitor-phase5.md` with full prompt template for appending decay + consistency phases to an existing janitor cron job
|
|
20
|
-
- Covers Gap 1 (Ebbinghaus decay never fires without external trigger) and Gap 2 (two-store divergence between agent-memory and canonical memory files)
|
|
21
|
-
- Includes configurable conflict resolution strategies (canonical wins / agent-memory wins / manual review)
|
|
18
|
+
### ✨ Added in Phase 1 — optional vector retrieval layer
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
- Added **optional embedding provider support** for hybrid retrieval:
|
|
21
|
+
- `openai-compatible`
|
|
22
|
+
- `local-http`
|
|
23
|
+
- Added **hybrid recall** with BM25 + vector fusion
|
|
24
|
+
- Added embedding-aware storage and reindex support:
|
|
25
|
+
- `provider_id`
|
|
26
|
+
- `content_hash`
|
|
27
|
+
- `status`
|
|
28
|
+
- Added **`reindex`** support for backfill / rebuild workflows
|
|
29
|
+
- Added provider configuration via environment variables:
|
|
30
|
+
- `AGENT_MEMORY_EMBEDDING_PROVIDER`
|
|
31
|
+
- `AGENT_MEMORY_EMBEDDING_BASE_URL`
|
|
32
|
+
- `AGENT_MEMORY_EMBEDDING_MODEL`
|
|
33
|
+
- `AGENT_MEMORY_EMBEDDING_DIMENSION`
|
|
34
|
+
- `AGENT_MEMORY_EMBEDDING_API_KEY`
|
|
35
|
+
- Kept **BM25-only mode** as a supported fallback when no provider is configured
|
|
24
36
|
|
|
25
|
-
###
|
|
37
|
+
### ✨ Added in Phase 2 — semantic dedup + lifecycle reliability
|
|
26
38
|
|
|
27
|
-
|
|
39
|
+
- Upgraded **Write Guard** from simple duplicate checks to semantic dedup flow
|
|
40
|
+
- Added **typed merge policy** so similar memories can be merged more safely
|
|
41
|
+
- Added **maintenance job tracking** for lifecycle operations
|
|
42
|
+
- Added checkpoint-aware **reflect orchestrator** for:
|
|
43
|
+
- `decay`
|
|
44
|
+
- `tidy`
|
|
45
|
+
- `govern`
|
|
46
|
+
- Improved lifecycle observability and recovery-friendliness for interrupted
|
|
47
|
+
maintenance runs
|
|
28
48
|
|
|
29
|
-
### ✨
|
|
49
|
+
### ✨ Added in Phase 3 — HTTP/SSE API + better surface
|
|
30
50
|
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
51
|
+
- Added long-lived **HTTP API** transport
|
|
52
|
+
- Added **SSE progress streaming** for long-running jobs
|
|
53
|
+
- Added HTTP routes for:
|
|
54
|
+
- `POST /v1/memories`
|
|
55
|
+
- `POST /v1/recall`
|
|
56
|
+
- `POST /v1/surface`
|
|
57
|
+
- `POST /v1/feedback`
|
|
58
|
+
- `POST /v1/reflect`
|
|
59
|
+
- `POST /v1/reindex`
|
|
60
|
+
- `GET /v1/status`
|
|
61
|
+
- `GET /v1/jobs/:id`
|
|
62
|
+
- `GET /health`
|
|
63
|
+
- Added CLI server mode:
|
|
64
|
+
- `agent-memory serve`
|
|
65
|
+
- Upgraded **surface** into a more **context-aware** API using:
|
|
66
|
+
- `task`
|
|
67
|
+
- `query`
|
|
68
|
+
- `recent_turns`
|
|
69
|
+
- `intent`
|
|
70
|
+
- type filters
|
|
71
|
+
- feedback priors
|
|
72
|
+
- Added **feedback events** so runtimes can record whether `recall` / `surface`
|
|
73
|
+
results were actually useful
|
|
43
74
|
|
|
44
|
-
###
|
|
75
|
+
### 🧰 Tooling / interface changes
|
|
45
76
|
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
77
|
+
- MCP toolset is now **10 tools**:
|
|
78
|
+
- `remember`
|
|
79
|
+
- `recall`
|
|
80
|
+
- `recall_path`
|
|
81
|
+
- `boot`
|
|
82
|
+
- `forget`
|
|
83
|
+
- `reflect`
|
|
84
|
+
- `status`
|
|
85
|
+
- `ingest`
|
|
86
|
+
- `reindex`
|
|
87
|
+
- `surface`
|
|
88
|
+
- CLI now includes:
|
|
89
|
+
- `db:migrate`
|
|
90
|
+
- `reindex`
|
|
91
|
+
- `serve`
|
|
51
92
|
|
|
52
|
-
###
|
|
93
|
+
### 📚 Documentation and examples overhaul
|
|
53
94
|
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
95
|
+
- Rewrote `README.md` for OSS evaluation and generic runtime adoption
|
|
96
|
+
- Removed the split `README.md` / `README.en.md` homepage model
|
|
97
|
+
- Added dedicated docs:
|
|
98
|
+
- `docs/architecture.md`
|
|
99
|
+
- `docs/integrations/generic.md`
|
|
100
|
+
- `docs/integrations/openclaw.md`
|
|
101
|
+
- `docs/migration-v3-v4.md`
|
|
102
|
+
- Reorganized examples into:
|
|
103
|
+
- `examples/quick-start/`
|
|
104
|
+
- `examples/http-api/`
|
|
105
|
+
- `examples/mcp-stdio/`
|
|
106
|
+
- `examples/openclaw/`
|
|
107
|
+
|
|
108
|
+
### ✅ Compatibility notes
|
|
109
|
+
|
|
110
|
+
- Existing CLI and MCP usage remains available
|
|
111
|
+
- HTTP/SSE is **additive**, not a replacement
|
|
112
|
+
- Existing SQLite deployments can upgrade incrementally
|
|
113
|
+
- Full embeddings are **optional** and can be enabled later with `reindex`
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 3.0.1 (2026-02-24)
|
|
118
|
+
|
|
119
|
+
### 🛠️ OpenClaw P0 fixes
|
|
120
|
+
|
|
121
|
+
- **Fixed memory-sync session path mismatch** in cron prompt:
|
|
122
|
+
- removed hardcoded `~/.openclaw/agents/main/sessions/*.jsonl`
|
|
123
|
+
- switched to dynamic discovery with `noah` + env-derived agent path + `main`
|
|
124
|
+
fallback
|
|
125
|
+
- **Aligned memory-tidy prompt** with the same session path health check strategy
|
|
126
|
+
- **Added memory-sync health output contract**:
|
|
127
|
+
- `session_scan_glob`
|
|
128
|
+
- `session_file_count`
|
|
129
|
+
- `latest_session_file`
|
|
130
|
+
- `extracted_message_count`
|
|
131
|
+
- `appended_bullet_count`
|
|
132
|
+
- `synced_memory_count`
|
|
133
|
+
- `sync_error_count`
|
|
134
|
+
|
|
135
|
+
### ✨ Auto-ingest watcher implemented
|
|
136
|
+
|
|
137
|
+
- Added `fs.watch`-based auto-ingest watcher for:
|
|
138
|
+
- `~/.openclaw/workspace/memory/*.md`
|
|
139
|
+
- `~/.openclaw/workspace/MEMORY.md`
|
|
140
|
+
- New module: `src/ingest/watcher.ts`
|
|
141
|
+
- MCP server now starts watcher by default (configurable):
|
|
142
|
+
- `AGENT_MEMORY_AUTO_INGEST=0` to disable
|
|
143
|
+
- `AGENT_MEMORY_WORKSPACE` to override workspace path
|
|
144
|
+
|
|
145
|
+
### 🧱 Ingest refactor + tests
|
|
146
|
+
|
|
147
|
+
- Extracted ingest core logic from MCP server into reusable module:
|
|
148
|
+
- `src/ingest/ingest.ts`
|
|
149
|
+
- MCP `ingest` tool now delegates to shared `ingestText()`
|
|
150
|
+
- Added ingest tests:
|
|
151
|
+
- dry-run extraction does not write DB
|
|
152
|
+
- source marker stored as `auto:{source}`
|
|
153
|
+
|
|
154
|
+
### 📚 Documentation realigned to v3 reality
|
|
155
|
+
|
|
156
|
+
- Rewrote `README.md` and `README.en.md` to match actual v3 capabilities
|
|
157
|
+
- Removed stale v2-era claims (embedding/reranker/link/snapshot/hybrid stack
|
|
158
|
+
narrative)
|
|
159
|
+
- Added explicit auto-ingest watcher behavior and env vars
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 3.0.0 (2026-02-23)
|
|
164
|
+
|
|
165
|
+
### 🎉 v3 Simplification
|
|
166
|
+
|
|
167
|
+
- Repositioned agent-memory as a structured companion to memory-core
|
|
168
|
+
- Removed redundant v2 capabilities at API/tooling level
|
|
169
|
+
- MCP toolset finalized at 9 tools:
|
|
170
|
+
- `remember`, `recall`, `recall_path`, `boot`, `forget`, `reflect`, `status`,
|
|
171
|
+
`ingest`, `surface`
|
|
172
|
+
- Added narrative warm-boot and human-readable reflect report
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## 2.x (legacy)
|
|
177
|
+
|
|
178
|
+
v2.x included embedding/reranker/link/snapshot-era behavior. See git history and
|
|
179
|
+
design docs for full details.
|