@smyslenny/agent-memory 3.1.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/README.en.md DELETED
@@ -1,153 +0,0 @@
1
- # 🧠 AgentMemory v3
2
-
3
- > Structured long-term memory layer for AI agents: write, recall, decay, and auto-ingest.
4
-
5
- [![npm](https://img.shields.io/npm/v/@smyslenny/agent-memory)](https://www.npmjs.com/package/@smyslenny/agent-memory)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
- [![Node.js](https://img.shields.io/badge/Node.js-≥18-green.svg)](https://nodejs.org/)
8
- [![MCP](https://img.shields.io/badge/MCP-9_tools-orange.svg)](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