@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 CHANGED
@@ -1,57 +1,179 @@
1
1
  # Changelog
2
2
 
3
- ## 2.1.2 (2026-02-22)
3
+ ## 4.0.0-alpha.1 (2026-03-09)
4
4
 
5
- ### 🔗 OpenClaw Integration V1 (Cron Synchronization)
5
+ ### 🚀 Repositioning
6
6
 
7
- - **Capture Consolidate Surface closed loop** agent-memory now integrates seamlessly with OpenClaw's built-in memory cron jobs (`memory-sync`, `memory-tidy`, `memory-surface`) with zero code changes ([DD-0004](docs/design/0004-agent-memory-integration.md))
8
- - **memory-sync** (14:00 & 22:00): Each new journal bullet is auto-synced to agent-memory via `mcporter call agent-memory.remember` with keyword-based type classification and URI dedup
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
- ## 2.1.1 (2026-02-21)
10
+ What changed at the product level:
15
11
 
16
- ### 📝 Documentation
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
- - **Memory-janitor integration guide** New `examples/openclaw-setup.md` section explaining what a memory janitor is and how to wire it to agent-memory (decay trigger + consistency check) ([PR #2](https://github.com/smysle/agent-memory/pull/2))
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
- ## 2.0.0 (2026-02-20)
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
- ### 🎉 Complete Rewrite
37
+ ### Added in Phase 2 — semantic dedup + lifecycle reliability
26
38
 
27
- AgentMemory v2 is a ground-up rewrite incorporating the best ideas from 4 open-source memory projects (nocturne_memory, Memory Palace, PowerMem, our v1) while keeping the codebase minimal (3 dependencies).
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
- ### ✨ New Features
49
+ ### ✨ Added in Phase 3 — HTTP/SSE API + better surface
30
50
 
31
- - **URI Path System** `core://`, `emotion://`, `knowledge://`, `event://` namespaces with Content-Path separation
32
- - **Write Guard** Hash dedup → URI conflict → BM25 similarity → 4-criterion gate pipeline
33
- - **Ebbinghaus Forgetting Curve** — Scientific decay model `R = e^(-t/S)` with recall strengthening
34
- - **Knowledge Graph** — Association links with multi-hop BFS traversal
35
- - **Snapshot/Rollback** — Auto-snapshot before every modification, one-click restore
36
- - **Intent-Aware Search** — Factual / temporal / causal / exploratory query classification
37
- - **Sleep Cycle Engine** — Automated sync → decay → tidy → govern pipeline
38
- - **Priority System** — P0 identity (never decays) through P3 event (14-day half-life)
39
- - **Multi-Agent Isolation** — Per-agent memory scoping via `agent_id`
40
- - **MCP Server** — 9 tools for Claude Code / Cursor / OpenClaw integration
41
- - **CLI** — 7 commands: init, remember, recall, boot, status, reflect, migrate
42
- - **Markdown Migration** — Import existing MEMORY.md + daily journals + weekly summaries
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
- ### 📊 Stats
75
+ ### 🧰 Tooling / interface changes
45
76
 
46
- - 14 source modules
47
- - 9 MCP tools
48
- - 7 CLI commands
49
- - 41 tests passing
50
- - 3 production dependencies
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
- ### 🙏 Inspired By
93
+ ### 📚 Documentation and examples overhaul
53
94
 
54
- - [nocturne_memory](https://github.com/Dataojitori/nocturne_memory) URI paths, Content-Path separation, boot loading
55
- - [Memory Palace](https://github.com/AGI-is-going-to-arrive/Memory-Palace) Write Guard, intent search, vitality decay
56
- - [PowerMem](https://github.com/oceanbase/powermem) Ebbinghaus curve, knowledge graph, multi-agent
57
- - Our v1 production experience — Sleep cycle, dedup, 4-criterion gate, emotional priority
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.