@smyslenny/agent-memory 2.1.0 โ 3.1.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 +51 -27
- package/README.en.md +153 -0
- package/README.md +95 -122
- package/dist/bin/agent-memory.js +28 -485
- package/dist/bin/agent-memory.js.map +1 -1
- package/dist/index.d.ts +53 -143
- package/dist/index.js +289 -574
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +585 -631
- package/dist/mcp/server.js.map +1 -1
- package/docs/design/0004-agent-memory-integration.md +316 -0
- package/docs/design/0005-reranker-api-integration.md +276 -0
- package/docs/design/0006-multi-provider-embedding.md +196 -0
- package/docs/design/0014-memory-core-dedup.md +722 -0
- package/docs/design/TEMPLATE.md +67 -0
- package/docs/roadmap/integration-plan-v1.md +139 -0
- package/docs/roadmap/memory-architecture.md +168 -0
- package/docs/roadmap/warm-boot.md +135 -0
- package/package.json +2 -3
- package/README.zh-CN.md +0 -170
package/CHANGELOG.md
CHANGED
|
@@ -1,37 +1,61 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 3.0.1 (2026-02-24)
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### ๐ ๏ธ OpenClaw P0 fixes
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- **Fixed memory-sync session path mismatch** in cron prompt:
|
|
8
|
+
- removed hardcoded `~/.openclaw/agents/main/sessions/*.jsonl`
|
|
9
|
+
- switched to dynamic discovery with `noah` + env-derived agent path + `main` fallback
|
|
10
|
+
- **Aligned memory-tidy prompt** with the same session path health check strategy
|
|
11
|
+
- **Added memory-sync health output contract**:
|
|
12
|
+
- `session_scan_glob`
|
|
13
|
+
- `session_file_count`
|
|
14
|
+
- `latest_session_file`
|
|
15
|
+
- `extracted_message_count`
|
|
16
|
+
- `appended_bullet_count`
|
|
17
|
+
- `synced_memory_count`
|
|
18
|
+
- `sync_error_count`
|
|
8
19
|
|
|
9
|
-
### โจ
|
|
20
|
+
### โจ Auto-ingest watcher implemented
|
|
10
21
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
- **Priority System** โ P0 identity (never decays) through P3 event (14-day half-life)
|
|
19
|
-
- **Multi-Agent Isolation** โ Per-agent memory scoping via `agent_id`
|
|
20
|
-
- **MCP Server** โ 9 tools for Claude Code / Cursor / OpenClaw integration
|
|
21
|
-
- **CLI** โ 7 commands: init, remember, recall, boot, status, reflect, migrate
|
|
22
|
-
- **Markdown Migration** โ Import existing MEMORY.md + daily journals + weekly summaries
|
|
22
|
+
- Added `fs.watch`-based auto-ingest watcher for:
|
|
23
|
+
- `~/.openclaw/workspace/memory/*.md`
|
|
24
|
+
- `~/.openclaw/workspace/MEMORY.md`
|
|
25
|
+
- New module: `src/ingest/watcher.ts`
|
|
26
|
+
- MCP server now starts watcher by default (configurable):
|
|
27
|
+
- `AGENT_MEMORY_AUTO_INGEST=0` to disable
|
|
28
|
+
- `AGENT_MEMORY_WORKSPACE` to override workspace path
|
|
23
29
|
|
|
24
|
-
###
|
|
30
|
+
### ๐งฑ Ingest refactor + tests
|
|
25
31
|
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
32
|
+
- Extracted ingest core logic from MCP server into reusable module:
|
|
33
|
+
- `src/ingest/ingest.ts`
|
|
34
|
+
- MCP `ingest` tool now delegates to shared `ingestText()`
|
|
35
|
+
- Added ingest tests:
|
|
36
|
+
- dry-run extraction does not write DB
|
|
37
|
+
- source marker stored as `auto:{source}`
|
|
31
38
|
|
|
32
|
-
###
|
|
39
|
+
### ๐ Documentation realigned to v3 reality
|
|
33
40
|
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
|
|
41
|
+
- Rewrote `README.md` and `README.en.md` to match actual v3 capabilities
|
|
42
|
+
- Removed stale v2-era claims (embedding/reranker/link/snapshot/hybrid stack narrative)
|
|
43
|
+
- Added explicit auto-ingest watcher behavior and env vars
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 3.0.0 (2026-02-23)
|
|
48
|
+
|
|
49
|
+
### ๐ v3 Simplification
|
|
50
|
+
|
|
51
|
+
- Repositioned agent-memory as a structured companion to memory-core
|
|
52
|
+
- Removed redundant v2 capabilities at API/tooling level
|
|
53
|
+
- MCP toolset finalized at 9 tools:
|
|
54
|
+
- `remember`, `recall`, `recall_path`, `boot`, `forget`, `reflect`, `status`, `ingest`, `surface`
|
|
55
|
+
- Added narrative warm-boot and human-readable reflect report
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 2.x (legacy)
|
|
60
|
+
|
|
61
|
+
v2.x included embedding/reranker/link/snapshot-era behavior. See git history and design docs for full details.
|
package/README.en.md
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# ๐ง AgentMemory v3
|
|
2
|
+
|
|
3
|
+
> Structured long-term memory layer for AI agents: write, recall, decay, and auto-ingest.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@smyslenny/agent-memory)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
[](https://modelcontextprotocol.io/)
|
|
9
|
+
|
|
10
|
+
**[็ฎไฝไธญๆ](README.md)** | **English**
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Positioning in v3
|
|
15
|
+
|
|
16
|
+
AgentMemory v3 is explicitly a **structured memory companion** to OpenClaw memory-core, not a second full-stack retrieval system.
|
|
17
|
+
|
|
18
|
+
- Markdown (`memory/*.md` + `MEMORY.md`) remains the human-readable source of truth
|
|
19
|
+
- agent-memory is a derived, structured lifecycle layer
|
|
20
|
+
|
|
21
|
+
Core capabilities:
|
|
22
|
+
|
|
23
|
+
- **Typed memory model**: `identity / emotion / knowledge / event`
|
|
24
|
+
- **URI path addressing**: `core://`, `emotion://`, `knowledge://`, `event://`
|
|
25
|
+
- **Write Guard** for dedup/conflict gating
|
|
26
|
+
- **BM25 recall** with priority ร vitality weighting
|
|
27
|
+
- **Sleep-cycle maintenance** via `reflect` (decay / tidy / govern)
|
|
28
|
+
- **Ingest** for markdown-to-memory extraction
|
|
29
|
+
- **Surface** for readonly context surfacing (no access side effects)
|
|
30
|
+
- **Warm boot / reflect narrative output**
|
|
31
|
+
- **Multi-agent isolation** by `agent_id`
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
### Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install -g @smyslenny/agent-memory
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### CLI examples
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Initialize DB
|
|
47
|
+
agent-memory init
|
|
48
|
+
|
|
49
|
+
# Store memory
|
|
50
|
+
agent-memory remember "User prefers dark mode" --type knowledge --uri knowledge://preferences/theme
|
|
51
|
+
|
|
52
|
+
# Search
|
|
53
|
+
agent-memory recall "user preferences" --limit 5
|
|
54
|
+
|
|
55
|
+
# Startup boot (narrative output)
|
|
56
|
+
agent-memory boot
|
|
57
|
+
|
|
58
|
+
# Run sleep cycle
|
|
59
|
+
agent-memory reflect all
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## MCP Server
|
|
65
|
+
|
|
66
|
+
### Example config
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"mcpServers": {
|
|
71
|
+
"agent-memory": {
|
|
72
|
+
"command": "node",
|
|
73
|
+
"args": ["node_modules/@smyslenny/agent-memory/dist/mcp/server.js"],
|
|
74
|
+
"env": {
|
|
75
|
+
"AGENT_MEMORY_DB": "./agent-memory.db",
|
|
76
|
+
"AGENT_MEMORY_AGENT_ID": "noah",
|
|
77
|
+
"AGENT_MEMORY_AUTO_INGEST": "1",
|
|
78
|
+
"AGENT_MEMORY_WORKSPACE": "/home/user/.openclaw/workspace"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### MCP tools (9)
|
|
86
|
+
|
|
87
|
+
- `remember`
|
|
88
|
+
- `recall`
|
|
89
|
+
- `recall_path`
|
|
90
|
+
- `boot`
|
|
91
|
+
- `forget`
|
|
92
|
+
- `reflect`
|
|
93
|
+
- `status`
|
|
94
|
+
- `ingest`
|
|
95
|
+
- `surface`
|
|
96
|
+
|
|
97
|
+
> `link` and `snapshot` were removed in v3.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Auto-Ingest (file change watcher)
|
|
102
|
+
|
|
103
|
+
When MCP server starts, watcher is enabled by default (`fs.watch`) for:
|
|
104
|
+
|
|
105
|
+
- `~/.openclaw/workspace/memory/*.md`
|
|
106
|
+
- `~/.openclaw/workspace/MEMORY.md`
|
|
107
|
+
|
|
108
|
+
On file changes, ingest runs automatically (still guarded by Write Guard and dedup).
|
|
109
|
+
|
|
110
|
+
Environment variables:
|
|
111
|
+
|
|
112
|
+
- `AGENT_MEMORY_AUTO_INGEST`
|
|
113
|
+
- `1` (default): enabled
|
|
114
|
+
- `0`: disabled
|
|
115
|
+
- `AGENT_MEMORY_WORKSPACE`
|
|
116
|
+
- default: `$HOME/.openclaw/workspace`
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Recommended OpenClaw integration
|
|
121
|
+
|
|
122
|
+
Use a 3-stage cron pipeline:
|
|
123
|
+
|
|
124
|
+
1. `memory-sync` (14:00 / 22:00)
|
|
125
|
+
- dynamic session JSONL discovery
|
|
126
|
+
- append incremental entries to `memory/YYYY-MM-DD.md`
|
|
127
|
+
- best-effort `agent-memory.remember`
|
|
128
|
+
- emit health metrics (scan path / file count / extracted / synced)
|
|
129
|
+
|
|
130
|
+
2. `memory-tidy` (03:00)
|
|
131
|
+
- markdown consolidation/distillation
|
|
132
|
+
- call `agent-memory.reflect phase=all`
|
|
133
|
+
|
|
134
|
+
3. `memory-surface` (14:05 / 22:05)
|
|
135
|
+
- generate `RECENT.md`
|
|
136
|
+
|
|
137
|
+
Design principle: **Markdown is source of truth; agent-memory is a derived index layer.**
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Development
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npm install
|
|
145
|
+
npm test
|
|
146
|
+
npm run build
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
MIT
|
package/README.md
CHANGED
|
@@ -1,180 +1,153 @@
|
|
|
1
|
-
# ๐ง AgentMemory
|
|
1
|
+
# ๐ง AgentMemory v3
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> ้ขๅ AI Agent ็็ปๆๅ้ฟๆ่ฎฐๅฟๅฑ๏ผๅฏๅๅ
ฅใๅฏๆฃ็ดขใๅฏ่กฐๅใๅฏ่ชๅจๆๅใ
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@smyslenny/agent-memory)
|
|
6
|
+
[](LICENSE)
|
|
6
7
|
[](https://nodejs.org/)
|
|
7
|
-
[](https://modelcontextprotocol.io/)
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
**็ฎไฝไธญๆ** | **[English](README.en.md)**
|
|
10
11
|
|
|
11
12
|
---
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
+
## ้กน็ฎๅฎไฝ๏ผv3๏ผ
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
AgentMemory ๅจ v3 ไธญๆ็กฎๅฎไฝไธบ **OpenClaw memory-core ็็ปๆๅ่กฅๅ
ๅฑ**๏ผ่ไธๆฏ็ฌฌไบๅฅๅ
จๆ ๆฃ็ดข็ณป็ป๏ผ
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
- Markdown๏ผ`memory/*.md` + `MEMORY.md`๏ผๆฏๅฏ่ฏปๅฏ็ผ่พ็ไบๅฎๆบ
|
|
19
|
+
- agent-memory ๆฏๆดพ็็ดขๅผๅฑ๏ผ่ด่ดฃ็ปๆๅ่ฎฐๅฟ็ๅฝๅจๆ
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
ๆ ธๅฟ่ฝๅ๏ผ
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
- **็ฑปๅๅ่ฎฐๅฟ**๏ผ`identity / emotion / knowledge / event`
|
|
24
|
+
- **URI ่ทฏๅพๅฏปๅ**๏ผ`core://`ใ`emotion://`ใ`knowledge://`ใ`event://`
|
|
25
|
+
- **Write Guard**๏ผๅๅ
ฅๅๅๅป้ไธๅฒ็ช้จๆง
|
|
26
|
+
- **BM25 ๆฃ็ดข**๏ผๅธฆ priority ร vitality ๅ ๆ
|
|
27
|
+
- **็ก็ ๅจๆ**๏ผ`reflect` ่งฆๅ decay / tidy / govern
|
|
28
|
+
- **ingest ่ชๅจๆๅ**๏ผไป markdown ๆๅๅนถๅ
ฅๅบ
|
|
29
|
+
- **surface ๅช่ฏปๆตฎ็ฐ**๏ผๆ ๅฏไฝ็จๅฐ่กฅๅ
ไธไธๆ
|
|
30
|
+
- **warm boot / reflect ๆฅๅ**๏ผไบบ็ฑปๅฏ่ฏป่พๅบ
|
|
31
|
+
- **ๅค Agent ้็ฆป**๏ผๅๅบไธๅ agent_id ไบไธๆฑกๆ
|
|
29
32
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
| Feature | Description | Inspired By |
|
|
33
|
-
|---------|-------------|-------------|
|
|
34
|
-
| ๐ **URI Path System** | `core://user/name`, `emotion://2026-02-20/love` โ structured, multi-entry access | nocturne_memory |
|
|
35
|
-
| ๐ก๏ธ **Write Guard** | Hash dedup โ URI conflict โ BM25 similarity โ 4-criterion gate | Memory Palace + our v1 |
|
|
36
|
-
| ๐ง **Ebbinghaus Decay** | `R = e^(-t/S)` โ scientific forgetting curve with recall strengthening | PowerMem |
|
|
37
|
-
| ๐ธ๏ธ **Knowledge Graph** | Multi-hop traversal across memory associations | PowerMem |
|
|
38
|
-
| ๐ธ **Snapshots** | Auto-snapshot before every change, one-click rollback | nocturne + Memory Palace |
|
|
39
|
-
| ๐ **Intent-Aware Search** | Factual / temporal / causal / exploratory query routing | Memory Palace |
|
|
40
|
-
| ๐ **Sleep Cycle** | Automated sync โ decay โ tidy โ govern pipeline | - |
|
|
41
|
-
| ๐ **Priority System** | P0 identity (never decays) โ P3 event (14-day half-life) | - |
|
|
42
|
-
| ๐ค **Multi-Agent** | Agent isolation via `agent_id` scope | PowerMem |
|
|
43
|
-
| ๐ **MCP Server** | 9 tools, works with Claude Code / Cursor / OpenClaw | Standard MCP |
|
|
33
|
+
---
|
|
44
34
|
|
|
45
|
-
##
|
|
35
|
+
## ๅฟซ้ๅผๅง
|
|
46
36
|
|
|
47
|
-
###
|
|
37
|
+
### ๅฎ่ฃ
|
|
48
38
|
|
|
49
39
|
```bash
|
|
50
|
-
npm install @smyslenny/agent-memory
|
|
40
|
+
npm install -g @smyslenny/agent-memory
|
|
51
41
|
```
|
|
52
42
|
|
|
53
|
-
### CLI
|
|
43
|
+
### CLI ็คบไพ
|
|
54
44
|
|
|
55
45
|
```bash
|
|
56
|
-
#
|
|
46
|
+
# ๅๅงๅๆฐๆฎๅบ
|
|
57
47
|
agent-memory init
|
|
58
48
|
|
|
59
|
-
#
|
|
60
|
-
agent-memory remember "
|
|
61
|
-
agent-memory remember "I am Noah, a succubus" --type identity --uri core://agent/identity
|
|
49
|
+
# ๅๅ
ฅ่ฎฐๅฟ
|
|
50
|
+
agent-memory remember "็จๆทๅๅฅฝๆทฑ่ฒๆจกๅผ" --type knowledge --uri knowledge://preferences/theme
|
|
62
51
|
|
|
63
|
-
#
|
|
64
|
-
agent-memory recall "
|
|
52
|
+
# ๆฃ็ดข
|
|
53
|
+
agent-memory recall "็จๆทๅๅฅฝ" --limit 5
|
|
65
54
|
|
|
66
|
-
#
|
|
55
|
+
# ๅฏๅจๆถๅ ่ฝฝ๏ผๅไบๆ ผๅผ๏ผ
|
|
67
56
|
agent-memory boot
|
|
68
57
|
|
|
69
|
-
#
|
|
58
|
+
# ่งฆๅ็ก็ ๅจๆ
|
|
70
59
|
agent-memory reflect all
|
|
71
|
-
|
|
72
|
-
# Import from Markdown
|
|
73
|
-
agent-memory migrate ./memory/
|
|
74
|
-
|
|
75
|
-
# Statistics
|
|
76
|
-
agent-memory status
|
|
77
60
|
```
|
|
78
61
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
```typescript
|
|
82
|
-
import { openDatabase, syncOne, searchBM25, boot, runDecay } from '@smyslenny/agent-memory';
|
|
83
|
-
|
|
84
|
-
const db = openDatabase({ path: './memory.db' });
|
|
85
|
-
|
|
86
|
-
// Remember
|
|
87
|
-
syncOne(db, {
|
|
88
|
-
content: 'User said "I love you"',
|
|
89
|
-
type: 'emotion',
|
|
90
|
-
uri: 'emotion://2026-02-20/love',
|
|
91
|
-
emotion_val: 1.0,
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
// Recall
|
|
95
|
-
const results = searchBM25(db, 'love');
|
|
96
|
-
|
|
97
|
-
// Boot identity
|
|
98
|
-
const identity = boot(db);
|
|
62
|
+
---
|
|
99
63
|
|
|
100
|
-
|
|
101
|
-
runDecay(db);
|
|
102
|
-
```
|
|
64
|
+
## MCP Server
|
|
103
65
|
|
|
104
|
-
###
|
|
66
|
+
### ้
็ฝฎ็คบไพ
|
|
105
67
|
|
|
106
68
|
```json
|
|
107
69
|
{
|
|
108
70
|
"mcpServers": {
|
|
109
|
-
"
|
|
71
|
+
"agent-memory": {
|
|
110
72
|
"command": "node",
|
|
111
73
|
"args": ["node_modules/@smyslenny/agent-memory/dist/mcp/server.js"],
|
|
112
74
|
"env": {
|
|
113
|
-
"AGENT_MEMORY_DB": "./memory.db"
|
|
75
|
+
"AGENT_MEMORY_DB": "./agent-memory.db",
|
|
76
|
+
"AGENT_MEMORY_AGENT_ID": "noah",
|
|
77
|
+
"AGENT_MEMORY_AUTO_INGEST": "1",
|
|
78
|
+
"AGENT_MEMORY_WORKSPACE": "/home/user/.openclaw/workspace"
|
|
114
79
|
}
|
|
115
80
|
}
|
|
116
81
|
}
|
|
117
82
|
}
|
|
118
83
|
```
|
|
119
84
|
|
|
120
|
-
|
|
85
|
+
### MCP ๅทฅๅ
ท๏ผ9ไธช๏ผ
|
|
121
86
|
|
|
122
|
-
|
|
87
|
+
- `remember`
|
|
88
|
+
- `recall`
|
|
89
|
+
- `recall_path`
|
|
90
|
+
- `boot`
|
|
91
|
+
- `forget`
|
|
92
|
+
- `reflect`
|
|
93
|
+
- `status`
|
|
94
|
+
- `ingest`
|
|
95
|
+
- `surface`
|
|
123
96
|
|
|
124
|
-
|
|
125
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
126
|
-
โ MCP Server (stdio/SSE) โ
|
|
127
|
-
โ 9 tools + system://boot loader โ
|
|
128
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
129
|
-
โ Write Guard โ
|
|
130
|
-
โ hash dedup โ URI conflict โ BM25 sim โ
|
|
131
|
-
โ โ conflict merge โ 4-criterion gate โ
|
|
132
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
133
|
-
โ Sleep Cycle Engine โ
|
|
134
|
-
โ sync (capture) โ decay (Ebbinghaus) โ
|
|
135
|
-
โ โ tidy (archive) โ govern (cleanup) โ
|
|
136
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
137
|
-
โ Intent-Aware Search (BM25) โ
|
|
138
|
-
โ factual ยท temporal ยท causal ยท explore โ
|
|
139
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
140
|
-
โ SQLite (WAL) + FTS5 + Graph Links โ
|
|
141
|
-
โ memories ยท paths ยท links ยท snapshots โ
|
|
142
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
143
|
-
```
|
|
97
|
+
> v3 ๅทฒ็งป้ค `link` / `snapshot` ๅทฅๅ
ทใ
|
|
144
98
|
|
|
145
|
-
|
|
99
|
+
---
|
|
146
100
|
|
|
147
|
-
|
|
148
|
-
|----------|--------|-----------|-------------|---------|
|
|
149
|
-
| P0 Identity | `core://` | โ (never) | 1.0 | "I am Noah" |
|
|
150
|
-
| P1 Emotion | `emotion://` | 365 days | 0.3 | "User said I love you" |
|
|
151
|
-
| P2 Knowledge | `knowledge://` | 90 days | 0.1 | "Use TypeScript for agents" |
|
|
152
|
-
| P3 Event | `event://` | 14 days | 0.0 | "Configured proxy today" |
|
|
101
|
+
## Auto-Ingest๏ผๆไปถๅๆด่ชๅจๅ
ฅๅบ๏ผ
|
|
153
102
|
|
|
154
|
-
|
|
103
|
+
MCP server ๅฏๅจๅไผ้ป่ฎคๅผๅฏ watcher๏ผ`fs.watch`๏ผ๏ผ
|
|
155
104
|
|
|
156
|
-
|
|
105
|
+
- `~/.openclaw/workspace/memory/*.md`
|
|
106
|
+
- `~/.openclaw/workspace/MEMORY.md`
|
|
157
107
|
|
|
158
|
-
|
|
159
|
-
2. **BM25 over vector search** โ No embedding dependency, instant startup, good enough for structured memory
|
|
160
|
-
3. **TypeScript over Python** โ Better concurrency, type safety, OpenClaw ecosystem alignment
|
|
161
|
-
4. **Ebbinghaus over linear decay** โ Scientifically grounded, recall strengthening is natural
|
|
162
|
-
5. **Write Guard over free writes** โ Prevent duplicate/conflicting memories at the gate
|
|
163
|
-
6. **URI paths over flat keys** โ Hierarchical organization, prefix queries, multi-entry access
|
|
108
|
+
ๅฝๆไปถๅๅๆถ่ชๅจๆง่ก ingest๏ผๅค็จ Write Guard๏ผๅน็ญ/ๅป้๏ผใ
|
|
164
109
|
|
|
165
|
-
|
|
110
|
+
็ฏๅขๅ้๏ผ
|
|
166
111
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
| [COMPLETION.md](COMPLETION.md) | Release checklist + retrospective template |
|
|
112
|
+
- `AGENT_MEMORY_AUTO_INGEST`
|
|
113
|
+
- `1`๏ผ้ป่ฎค๏ผ๏ผๅผๅฏ
|
|
114
|
+
- `0`๏ผๅ
ณ้ญ
|
|
115
|
+
- `AGENT_MEMORY_WORKSPACE`
|
|
116
|
+
- ้ป่ฎค๏ผ`$HOME/.openclaw/workspace`
|
|
173
117
|
|
|
174
|
-
|
|
118
|
+
---
|
|
175
119
|
|
|
176
|
-
|
|
120
|
+
## OpenClaw ้ๆๅปบ่ฎฎ๏ผๆนๆกA๏ผ
|
|
121
|
+
|
|
122
|
+
ๆจ่ไธๆฎต cron๏ผ
|
|
123
|
+
|
|
124
|
+
1. `memory-sync`๏ผ14:00 / 22:00๏ผ
|
|
125
|
+
- ๅจๆๅ็ฐ session JSONL
|
|
126
|
+
- ๅข้ๅๅ
ฅ `memory/YYYY-MM-DD.md`
|
|
127
|
+
- best-effort ๅๆญฅๅฐ `agent-memory.remember`
|
|
128
|
+
- ่พๅบๅฅๅบทๆๆ ๏ผๆซๆ่ทฏๅพใไผ่ฏๆไปถๆฐใๆๅๆฐใๅๅบๆฐ๏ผ
|
|
129
|
+
|
|
130
|
+
2. `memory-tidy`๏ผ03:00๏ผ
|
|
131
|
+
- ๅ็ผฉ/่ธ้ฆ markdown
|
|
132
|
+
- ่ฐ็จ `agent-memory.reflect phase=all`
|
|
133
|
+
|
|
134
|
+
3. `memory-surface`๏ผ14:05 / 22:05๏ผ
|
|
135
|
+
- ็ๆ `RECENT.md`
|
|
136
|
+
|
|
137
|
+
่ฎพ่ฎกๅๅ๏ผ**Markdown ๆฏ็็ธๆบ๏ผagent-memory ๆฏๆดพ็็ดขๅผๅฑใ**
|
|
177
138
|
|
|
178
139
|
---
|
|
179
140
|
|
|
180
|
-
|
|
141
|
+
## ๅผๅ
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npm install
|
|
145
|
+
npm test
|
|
146
|
+
npm run build
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
MIT
|