@humanlikememory/human-like-mem 0.3.12 → 0.3.13

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 CHANGED
@@ -1,70 +1,70 @@
1
- # Human-Like Memory Plugin for OpenClaw
2
-
3
- [![npm version](https://img.shields.io/npm/v/@humanlikememory/human-like-mem.svg)](https://www.npmjs.com/package/@humanlikememory/human-like-mem)
4
-
5
- Long-term memory plugin for OpenClaw with automatic memory recall and memory storage.
6
-
7
- ## Install
8
-
9
- ```bash
10
- npm install @humanlikememory/human-like-mem
11
- ```
12
-
13
- ## Enable In OpenClaw
14
-
15
- Edit `~/.openclaw/openclaw.json`:
16
-
17
- ```json
18
- {
19
- "plugins": {
20
- "entries": {
21
- "human-like-mem": {
22
- "enabled": true
23
- }
24
- }
25
- }
26
- }
27
- ```
28
-
29
- ## Required Environment Variables
30
-
31
- ```bash
32
- export HUMAN_LIKE_MEM_API_KEY="mp_xxxxxx"
33
- ```
34
-
35
- ## Optional Environment Variables
36
-
37
- ```bash
38
- export HUMAN_LIKE_MEM_BASE_URL="https://human-like.me"
39
- export HUMAN_LIKE_MEM_USER_ID="your-user-id"
40
- export HUMAN_LIKE_MEM_AGENT_ID="main"
41
- export HUMAN_LIKE_MEM_LIMIT_NUMBER="6"
42
- export HUMAN_LIKE_MEM_MIN_SCORE="0.1"
43
- export HUMAN_LIKE_MEM_MIN_TURNS="5"
44
- export HUMAN_LIKE_MEM_SESSION_TIMEOUT="300000"
45
- ```
46
-
47
- ## How It Works
48
-
49
- - Before response: the plugin retrieves relevant memories and injects them into context.
50
- - After response: the plugin caches the conversation and flushes memory by turn threshold or timeout.
51
-
52
- Default storage behavior:
53
-
54
- - `minTurnsToStore = 5`
55
- - `maxTurnsToStore = minTurnsToStore * 2`
56
- - `sessionTimeoutMs = 300000` (5 minutes)
57
-
58
- ## Troubleshooting
59
-
60
- - If you see `HUMAN_LIKE_MEM_API_KEY not configured`, make sure the key is set in your runtime environment.
61
- - If you see request timeout logs, increase plugin `timeoutMs` (for example `30000`).
62
- - Check logs with:
63
-
64
- ```bash
65
- openclaw logs --plain --limit 200
66
- ```
67
-
68
- ## License
69
-
70
- Apache-2.0
1
+ # Human-Like Memory Plugin for OpenClaw
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@humanlikememory/human-like-mem.svg)](https://www.npmjs.com/package/@humanlikememory/human-like-mem)
4
+
5
+ Long-term memory plugin for OpenClaw with automatic memory recall and memory storage.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @humanlikememory/human-like-mem
11
+ ```
12
+
13
+ ## Enable In OpenClaw
14
+
15
+ Edit `~/.openclaw/openclaw.json`:
16
+
17
+ ```json
18
+ {
19
+ "plugins": {
20
+ "entries": {
21
+ "human-like-mem": {
22
+ "enabled": true
23
+ }
24
+ }
25
+ }
26
+ }
27
+ ```
28
+
29
+ ## Required Environment Variables
30
+
31
+ ```bash
32
+ export HUMAN_LIKE_MEM_API_KEY="mp_xxxxxx"
33
+ ```
34
+
35
+ ## Optional Environment Variables
36
+
37
+ ```bash
38
+ export HUMAN_LIKE_MEM_BASE_URL="https://plugin.human-like.me"
39
+ export HUMAN_LIKE_MEM_USER_ID="your-user-id"
40
+ export HUMAN_LIKE_MEM_AGENT_ID="main"
41
+ export HUMAN_LIKE_MEM_LIMIT_NUMBER="6"
42
+ export HUMAN_LIKE_MEM_MIN_SCORE="0.1"
43
+ export HUMAN_LIKE_MEM_MIN_TURNS="5"
44
+ export HUMAN_LIKE_MEM_SESSION_TIMEOUT="300000"
45
+ ```
46
+
47
+ ## How It Works
48
+
49
+ - Before response: the plugin retrieves relevant memories and injects them into context.
50
+ - After response: the plugin caches the conversation and flushes memory by turn threshold or timeout.
51
+
52
+ Default storage behavior:
53
+
54
+ - `minTurnsToStore = 5`
55
+ - `maxTurnsToStore = minTurnsToStore * 2`
56
+ - `sessionTimeoutMs = 300000` (5 minutes)
57
+
58
+ ## Troubleshooting
59
+
60
+ - If you see `HUMAN_LIKE_MEM_API_KEY not configured`, make sure the key is set in your runtime environment.
61
+ - If you see request timeout logs, increase plugin `timeoutMs` (for example `30000`).
62
+ - Check logs with:
63
+
64
+ ```bash
65
+ openclaw logs --plain --limit 200
66
+ ```
67
+
68
+ ## License
69
+
70
+ Apache-2.0
package/README_ZH.md CHANGED
@@ -1,70 +1,70 @@
1
- # Human-Like Memory Plugin for OpenClaw
2
-
3
- [![npm version](https://img.shields.io/npm/v/@humanlikememory/human-like-mem.svg)](https://www.npmjs.com/package/@humanlikememory/human-like-mem)
4
-
5
- OpenClaw 长期记忆插件,支持自动召回和自动存储对话记忆。
6
-
7
- ## 安装
8
-
9
- ```bash
10
- npm install @humanlikememory/human-like-mem
11
- ```
12
-
13
- ## 在 OpenClaw 中启用
14
-
15
- 编辑 `~/.openclaw/openclaw.json`:
16
-
17
- ```json
18
- {
19
- "plugins": {
20
- "entries": {
21
- "human-like-mem": {
22
- "enabled": true
23
- }
24
- }
25
- }
26
- }
27
- ```
28
-
29
- ## 必填环境变量
30
-
31
- ```bash
32
- export HUMAN_LIKE_MEM_API_KEY="mp_xxxxxx"
33
- ```
34
-
35
- ## 可选环境变量
36
-
37
- ```bash
38
- export HUMAN_LIKE_MEM_BASE_URL="https://human-like.me"
39
- export HUMAN_LIKE_MEM_USER_ID="your-user-id"
40
- export HUMAN_LIKE_MEM_AGENT_ID="main"
41
- export HUMAN_LIKE_MEM_LIMIT_NUMBER="6"
42
- export HUMAN_LIKE_MEM_MIN_SCORE="0.1"
43
- export HUMAN_LIKE_MEM_MIN_TURNS="5"
44
- export HUMAN_LIKE_MEM_SESSION_TIMEOUT="300000"
45
- ```
46
-
47
- ## 工作机制
48
-
49
- - 回答前:插件检索相关记忆并注入上下文。
50
- - 回答后:插件缓存会话,在满足轮次阈值或超时后写入记忆。
51
-
52
- 默认存储策略:
53
-
54
- - `minTurnsToStore = 5`
55
- - `maxTurnsToStore = minTurnsToStore * 2`
56
- - `sessionTimeoutMs = 300000`(5 分钟)
57
-
58
- ## 常见问题
59
-
60
- - 如果日志出现 `HUMAN_LIKE_MEM_API_KEY not configured`,请确认运行时环境变量已生效。
61
- - 如果日志出现请求超时,请把插件 `timeoutMs` 调大(例如 `30000`)。
62
- - 查看日志:
63
-
64
- ```bash
65
- openclaw logs --plain --limit 200
66
- ```
67
-
68
- ## 许可证
69
-
70
- Apache-2.0
1
+ # Human-Like Memory Plugin for OpenClaw
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@humanlikememory/human-like-mem.svg)](https://www.npmjs.com/package/@humanlikememory/human-like-mem)
4
+
5
+ OpenClaw 长期记忆插件,支持自动召回和自动存储对话记忆。
6
+
7
+ ## 安装
8
+
9
+ ```bash
10
+ npm install @humanlikememory/human-like-mem
11
+ ```
12
+
13
+ ## 在 OpenClaw 中启用
14
+
15
+ 编辑 `~/.openclaw/openclaw.json`:
16
+
17
+ ```json
18
+ {
19
+ "plugins": {
20
+ "entries": {
21
+ "human-like-mem": {
22
+ "enabled": true
23
+ }
24
+ }
25
+ }
26
+ }
27
+ ```
28
+
29
+ ## 必填环境变量
30
+
31
+ ```bash
32
+ export HUMAN_LIKE_MEM_API_KEY="mp_xxxxxx"
33
+ ```
34
+
35
+ ## 可选环境变量
36
+
37
+ ```bash
38
+ export HUMAN_LIKE_MEM_BASE_URL="https://plugin.human-like.me"
39
+ export HUMAN_LIKE_MEM_USER_ID="your-user-id"
40
+ export HUMAN_LIKE_MEM_AGENT_ID="main"
41
+ export HUMAN_LIKE_MEM_LIMIT_NUMBER="6"
42
+ export HUMAN_LIKE_MEM_MIN_SCORE="0.1"
43
+ export HUMAN_LIKE_MEM_MIN_TURNS="5"
44
+ export HUMAN_LIKE_MEM_SESSION_TIMEOUT="300000"
45
+ ```
46
+
47
+ ## 工作机制
48
+
49
+ - 回答前:插件检索相关记忆并注入上下文。
50
+ - 回答后:插件缓存会话,在满足轮次阈值或超时后写入记忆。
51
+
52
+ 默认存储策略:
53
+
54
+ - `minTurnsToStore = 5`
55
+ - `maxTurnsToStore = minTurnsToStore * 2`
56
+ - `sessionTimeoutMs = 300000`(5 分钟)
57
+
58
+ ## 常见问题
59
+
60
+ - 如果日志出现 `HUMAN_LIKE_MEM_API_KEY not configured`,请确认运行时环境变量已生效。
61
+ - 如果日志出现请求超时,请把插件 `timeoutMs` 调大(例如 `30000`)。
62
+ - 查看日志:
63
+
64
+ ```bash
65
+ openclaw logs --plain --limit 200
66
+ ```
67
+
68
+ ## 许可证
69
+
70
+ Apache-2.0