@agentmemory/agentmemory 0.9.28 → 0.9.30

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.
Files changed (158) hide show
  1. package/.env.example +98 -28
  2. package/AGENTS.md +19 -26
  3. package/README.md +619 -274
  4. package/dist/.env.example +98 -28
  5. package/dist/cli.d.mts.map +1 -1
  6. package/dist/cli.mjs +1328 -244
  7. package/dist/cli.mjs.map +1 -1
  8. package/dist/{connect-JnsJXc68.mjs → connect-B4_ca6BD.mjs} +619 -70
  9. package/dist/connect-B4_ca6BD.mjs.map +1 -0
  10. package/dist/docker-compose.yml +42 -16
  11. package/dist/hooks/_capture.d.mts +22 -0
  12. package/dist/hooks/_capture.d.mts.map +1 -0
  13. package/dist/hooks/_capture.mjs +908 -0
  14. package/dist/hooks/_capture.mjs.map +1 -0
  15. package/dist/hooks/antigravity-bridge.d.mts +8 -0
  16. package/dist/hooks/antigravity-bridge.d.mts.map +1 -0
  17. package/dist/hooks/antigravity-bridge.mjs +123 -0
  18. package/dist/hooks/antigravity-bridge.mjs.map +1 -0
  19. package/dist/hooks/notification.mjs +34 -27
  20. package/dist/hooks/notification.mjs.map +1 -1
  21. package/dist/hooks/post-commit.mjs +84 -2
  22. package/dist/hooks/post-commit.mjs.map +1 -1
  23. package/dist/hooks/post-tool-failure.mjs +71 -26
  24. package/dist/hooks/post-tool-failure.mjs.map +1 -1
  25. package/dist/hooks/post-tool-use.mjs +99 -36
  26. package/dist/hooks/post-tool-use.mjs.map +1 -1
  27. package/dist/hooks/pre-compact.mjs +95 -5
  28. package/dist/hooks/pre-compact.mjs.map +1 -1
  29. package/dist/hooks/pre-tool-use.mjs +72 -2
  30. package/dist/hooks/pre-tool-use.mjs.map +1 -1
  31. package/dist/hooks/prompt-submit.mjs +25 -22
  32. package/dist/hooks/prompt-submit.mjs.map +1 -1
  33. package/dist/hooks/session-end.mjs +93 -24
  34. package/dist/hooks/session-end.mjs.map +1 -1
  35. package/dist/hooks/session-start.mjs +101 -6
  36. package/dist/hooks/session-start.mjs.map +1 -1
  37. package/dist/hooks/stop.mjs +72 -8
  38. package/dist/hooks/stop.mjs.map +1 -1
  39. package/dist/hooks/subagent-start.mjs +28 -26
  40. package/dist/hooks/subagent-start.mjs.map +1 -1
  41. package/dist/hooks/subagent-stop.mjs +29 -26
  42. package/dist/hooks/subagent-stop.mjs.map +1 -1
  43. package/dist/hooks/task-completed.mjs +31 -28
  44. package/dist/hooks/task-completed.mjs.map +1 -1
  45. package/dist/iii-config.docker.yaml +10 -10
  46. package/dist/iii-config.yaml +3 -1
  47. package/dist/{image-refs-BKLmp_sD.mjs → image-refs-BaT-9oMU.mjs} +2 -2
  48. package/dist/image-refs-BaT-9oMU.mjs.map +1 -0
  49. package/dist/{image-refs-C2YU7BIm.mjs → image-refs-T_urbwHM.mjs} +3 -3
  50. package/dist/image-refs-T_urbwHM.mjs.map +1 -0
  51. package/dist/{keyed-mutex-DTHtcZrt.mjs → image-store-BsN4vyjr.mjs} +2 -14
  52. package/dist/image-store-BsN4vyjr.mjs.map +1 -0
  53. package/dist/index.mjs +14021 -6494
  54. package/dist/index.mjs.map +1 -1
  55. package/dist/keyed-mutex-DchXsyfP.mjs +221 -0
  56. package/dist/keyed-mutex-DchXsyfP.mjs.map +1 -0
  57. package/dist/secret-store-BnY3A50C.mjs +2348 -0
  58. package/dist/secret-store-BnY3A50C.mjs.map +1 -0
  59. package/dist/{src-CzgoepGU.mjs → src-Jsq9LCeH.mjs} +7349 -2940
  60. package/dist/src-Jsq9LCeH.mjs.map +1 -0
  61. package/dist/{standalone-YsZFFQBM.mjs → standalone-DKCdrf1d.mjs} +62 -24
  62. package/dist/standalone-DKCdrf1d.mjs.map +1 -0
  63. package/dist/standalone.d.mts.map +1 -1
  64. package/dist/standalone.mjs +298 -27
  65. package/dist/standalone.mjs.map +1 -1
  66. package/dist/status-IRz7ta8-.mjs +2344 -0
  67. package/dist/status-IRz7ta8-.mjs.map +1 -0
  68. package/dist/viewer/favicon.svg +35 -1
  69. package/dist/viewer/index.html +7428 -2608
  70. package/docker-compose.yml +42 -16
  71. package/iii-config.docker.yaml +10 -10
  72. package/iii-config.yaml +3 -1
  73. package/integrations/pi/README.md +77 -0
  74. package/integrations/pi/index.ts +402 -0
  75. package/integrations/pi/package.json +32 -0
  76. package/integrations/pi/security.ts +87 -0
  77. package/package.json +15 -7
  78. package/plugin/.claude-plugin/plugin.json +2 -2
  79. package/plugin/.codex-plugin/plugin.json +26 -4
  80. package/plugin/.devin-plugin/plugin.json +32 -0
  81. package/plugin/.mcp.codex.json +12 -0
  82. package/plugin/.mcp.copilot.json +2 -7
  83. package/plugin/.mcp.json +2 -7
  84. package/plugin/assets/icon.svg +35 -0
  85. package/plugin/cursor/hooks.json +41 -0
  86. package/plugin/cursor/mcp.json +12 -0
  87. package/plugin/hooks/hooks.antigravity.json +43 -0
  88. package/plugin/hooks/hooks.copilot.json +11 -11
  89. package/plugin/hooks/hooks.devin.json +67 -0
  90. package/plugin/hooks/hooks.droid.json +55 -0
  91. package/plugin/opencode/README.md +267 -31
  92. package/plugin/opencode/agentmemory-capture.ts +644 -15
  93. package/plugin/opencode/plugin.json +1 -1
  94. package/plugin/plugin.json +2 -2
  95. package/plugin/scripts/_capture.d.mts +22 -0
  96. package/plugin/scripts/_capture.d.mts.map +1 -0
  97. package/plugin/scripts/_capture.mjs +908 -0
  98. package/plugin/scripts/_capture.mjs.map +1 -0
  99. package/plugin/scripts/antigravity-bridge.d.mts +8 -0
  100. package/plugin/scripts/antigravity-bridge.d.mts.map +1 -0
  101. package/plugin/scripts/antigravity-bridge.mjs +123 -0
  102. package/plugin/scripts/antigravity-bridge.mjs.map +1 -0
  103. package/plugin/scripts/notification.mjs +34 -27
  104. package/plugin/scripts/notification.mjs.map +1 -1
  105. package/plugin/scripts/plugin-bridge.mjs +378 -0
  106. package/plugin/scripts/post-commit.mjs +84 -2
  107. package/plugin/scripts/post-commit.mjs.map +1 -1
  108. package/plugin/scripts/post-tool-failure.mjs +71 -26
  109. package/plugin/scripts/post-tool-failure.mjs.map +1 -1
  110. package/plugin/scripts/post-tool-use.mjs +99 -36
  111. package/plugin/scripts/post-tool-use.mjs.map +1 -1
  112. package/plugin/scripts/pre-compact.mjs +95 -5
  113. package/plugin/scripts/pre-compact.mjs.map +1 -1
  114. package/plugin/scripts/pre-tool-use.mjs +72 -2
  115. package/plugin/scripts/pre-tool-use.mjs.map +1 -1
  116. package/plugin/scripts/prompt-submit.mjs +25 -22
  117. package/plugin/scripts/prompt-submit.mjs.map +1 -1
  118. package/plugin/scripts/session-end.mjs +93 -24
  119. package/plugin/scripts/session-end.mjs.map +1 -1
  120. package/plugin/scripts/session-start.mjs +101 -6
  121. package/plugin/scripts/session-start.mjs.map +1 -1
  122. package/plugin/scripts/stop.mjs +72 -8
  123. package/plugin/scripts/stop.mjs.map +1 -1
  124. package/plugin/scripts/subagent-start.mjs +28 -26
  125. package/plugin/scripts/subagent-start.mjs.map +1 -1
  126. package/plugin/scripts/subagent-stop.mjs +29 -26
  127. package/plugin/scripts/subagent-stop.mjs.map +1 -1
  128. package/plugin/scripts/task-completed.mjs +31 -28
  129. package/plugin/scripts/task-completed.mjs.map +1 -1
  130. package/plugin/skills/_shared/TROUBLESHOOTING.md +22 -6
  131. package/plugin/skills/agentmemory-agents/REFERENCE.md +8 -5
  132. package/plugin/skills/agentmemory-config/REFERENCE.md +52 -1
  133. package/plugin/skills/agentmemory-config/SKILL.md +44 -7
  134. package/plugin/skills/agentmemory-mcp-tools/REFERENCE.md +4 -3
  135. package/plugin/skills/agentmemory-rest-api/REFERENCE.md +23 -2
  136. package/plugin/skills/forget/SKILL.md +4 -1
  137. package/plugin/skills/handoff/SKILL.md +4 -2
  138. package/plugin/skills/lesson/SKILL.md +64 -0
  139. package/plugin/skills/memory-discipline/SKILL.md +65 -0
  140. package/plugin/skills/recall/SKILL.md +4 -1
  141. package/plugin/skills/remember/SKILL.md +6 -1
  142. package/dist/config-ChC9EtgV.mjs +0 -259
  143. package/dist/config-ChC9EtgV.mjs.map +0 -1
  144. package/dist/connect-JnsJXc68.mjs.map +0 -1
  145. package/dist/image-refs-BKLmp_sD.mjs.map +0 -1
  146. package/dist/image-refs-C2YU7BIm.mjs.map +0 -1
  147. package/dist/keyed-mutex-DTHtcZrt.mjs.map +0 -1
  148. package/dist/logger-BEB7pCI9.mjs +0 -43
  149. package/dist/logger-BEB7pCI9.mjs.map +0 -1
  150. package/dist/schema-CNiCWzV9.mjs +0 -78
  151. package/dist/schema-CNiCWzV9.mjs.map +0 -1
  152. package/dist/src-CzgoepGU.mjs.map +0 -1
  153. package/dist/standalone-YsZFFQBM.mjs.map +0 -1
  154. package/dist/tools-registry-D3NEoe5m.mjs +0 -1115
  155. package/dist/tools-registry-D3NEoe5m.mjs.map +0 -1
  156. package/plugin/scripts/diagnostics.d.mts +0 -17
  157. package/plugin/scripts/diagnostics.d.mts.map +0 -1
  158. package/plugin/scripts/diagnostics.mjs.map +0 -1
package/dist/.env.example CHANGED
@@ -9,9 +9,9 @@
9
9
  # LLM key, no embedding key, and no API auth. Set keys here only when you
10
10
  # want to enable the corresponding feature.
11
11
  #
12
- # Run `npx @agentmemory/agentmemory init` to copy this file into place
13
- # automatically. Run `npx @agentmemory/agentmemory doctor` to verify that
14
- # the daemon reads the env you expect.
12
+ # Run `npx -y @agentmemory/agentmemory@latest init` to copy this file into
13
+ # place automatically. Run `npx -y @agentmemory/agentmemory@latest doctor`
14
+ # to verify that the daemon reads the env you expect.
15
15
  #
16
16
  # Defaults shown in comments. Listed in priority order — the first key
17
17
  # present wins on the LLM detection path (see src/config.ts::detectProvider).
@@ -21,27 +21,45 @@
21
21
  # -----------------------------------------------------------------------------
22
22
  #
23
23
  # Without a provider key, agentmemory runs in noop mode: observations are
24
- # indexed via zero-LLM synthetic compression, hybrid search still works,
24
+ # indexed via zero-LLM synthetic compression and BM25 recall still works,
25
25
  # but LLM-backed summarisation / reflection / consolidation are disabled.
26
+ # A provider key alone does not enable LLM-written observation compression;
27
+ # that path also requires AGENTMEMORY_AUTO_COMPRESS=true.
28
+ # AGENTMEMORY_CAPTURE_ALLOW= # Comma/space list of tool names or globs to capture; when set, only these are captured
29
+ # AGENTMEMORY_CAPTURE_DENY= # Extra tool names or globs to skip, added to the defaults (memory_*, toolsearch, listmcpresources, fetchmcpresource)
30
+ # AGENTMEMORY_CAPTURE_OUTPUT_MAX=8000 # Max characters of tool output stored per captured observation
31
+ # AGENTMEMORY_PRE_COMPACT_BUDGET=1500 # Token budget for context injected by the PreCompact hook; 0 disables it
32
+ # AGENTMEMORY_CAPTURE_MAX_ATTEMPTS=5 # Attempts before a capture becomes a dead letter
33
+ # AGENTMEMORY_CAPTURE_RETRY_INTERVAL_MS=10000 # Retry sweep interval and backoff base
34
+ # AGENTMEMORY_CAPTURE_DEDUP_HOURS=168 # How long stored event ids block replays
35
+ # AGENTMEMORY_CAPTURE_EVENTS_MAX=100000 # Max stored event ids
36
+ # AGENTMEMORY_CAPTURE_INBOX_MAX=10000 # Max unprocessed events before 503
37
+ # AGENTMEMORY_CAPTURE_DEAD_MAX=1000 # Max dead letters kept
38
+ # AGENTMEMORY_CAPTURE_SPOOL=false # Turn off the hook offline spool
39
+ # AGENTMEMORY_CAPTURE_SPOOL_DIR= # Spool folder (default <data dir>/capture-spool)
40
+ # AGENTMEMORY_CAPTURE_SPOOL_MAX_BYTES=5242880 # Spool size limit
41
+ # AGENTMEMORY_CAPTURE_SPOOL_MAX_AGE_HOURS=168 # Spooled records older than this are dropped
26
42
  # The detection order is OPENAI_API_KEY → MINIMAX_API_KEY → ANTHROPIC_API_KEY
27
43
  # → GEMINI_API_KEY → OPENROUTER_API_KEY → noop.
28
44
 
29
- # OPENAI_API_KEY=sk-... # Used for OpenAI-compatible embeddings today. PR #307 will extend this to chat completions (DeepSeek, SiliconFlow, vLLM, LM Studio, Ollama via `/v1`).
45
+ # OPENAI_API_KEY=sk-... # Activates both the OpenAI-compatible LLM provider (DeepSeek, SiliconFlow, vLLM, LM Studio, Ollama via `/v1`) and OpenAI embeddings. Set OPENAI_API_KEY_FOR_LLM=false to scope it to embeddings only.
30
46
  # OPENAI_BASE_URL=https://api.openai.com # Override for OpenAI-compatible providers
47
+ # OPENAI_MODEL=gpt-5.6-luna # Default OpenAI-compatible chat model
48
+ # OPENAI_API_KEY_FOR_LLM=false # Skip OpenAI auto-detection for LLM; key stays active for embeddings
31
49
 
32
50
  # ANTHROPIC_API_KEY=sk-ant-...
33
- # ANTHROPIC_MODEL=claude-sonnet-4-20250514 # Default Anthropic model
51
+ # ANTHROPIC_MODEL=claude-sonnet-5 # Default Anthropic model
34
52
  # ANTHROPIC_BASE_URL=https://api.anthropic.com # Override for Anthropic-compatible proxies / Azure AI Foundry
35
53
 
36
54
  # GEMINI_API_KEY=... # Either env name works; GEMINI_API_KEY takes precedence
37
55
  # GOOGLE_API_KEY=... # Alias for GEMINI_API_KEY when set alone (emits a one-time stderr hint)
38
- # GEMINI_MODEL=gemini-2.5-flash # Default Gemini model (auto-detected GA model)
56
+ # GEMINI_MODEL=gemini-3.7-flash # Default Gemini model (current stable Flash)
39
57
 
40
58
  # OPENROUTER_API_KEY=sk-or-...
41
- # OPENROUTER_MODEL=anthropic/claude-sonnet-4-20250514
59
+ # OPENROUTER_MODEL=anthropic/claude-sonnet-5
42
60
 
43
61
  # MINIMAX_API_KEY=...
44
- # MINIMAX_MODEL=MiniMax-M2.7
62
+ # MINIMAX_MODEL=MiniMax-M3
45
63
 
46
64
  # MAX_TOKENS=4096 # Cap LLM completion tokens for compression / summarise calls
47
65
 
@@ -53,7 +71,7 @@
53
71
 
54
72
  # Opt-in Claude-subscription fallback (spawns @anthropic-ai/claude-agent-sdk
55
73
  # child sessions). Off by default — the agent-sdk fallback can trigger
56
- # Stop-hook recursion (#149 follow-up) when invoked from inside Claude Code.
74
+ # Stop-hook recursion when invoked from inside Claude Code.
57
75
  # AGENTMEMORY_ALLOW_AGENT_SDK=true
58
76
 
59
77
  # FALLBACK_PROVIDERS=anthropic,gemini # Comma-separated chain tried after the primary provider returns an error (e.g. rate limit)
@@ -62,10 +80,14 @@
62
80
  # 2. Embedding provider — auto-detected, override via EMBEDDING_PROVIDER
63
81
  # -----------------------------------------------------------------------------
64
82
  #
65
- # Without an embedding key, agentmemory runs in BM25-only mode for hybrid
66
- # search. Detection order: EMBEDDING_PROVIDER override → GEMINI_API_KEY →
83
+ # Without an embedding provider, vector embeddings are disabled. `mem::search`
84
+ # uses BM25; `mem::smart-search` can also fuse structural graph matches when
85
+ # graph data exists. Remote
86
+ # provider detection order: EMBEDDING_PROVIDER override → GEMINI_API_KEY →
67
87
  # OPENAI_API_KEY → VOYAGE_API_KEY → COHERE_API_KEY → OPENROUTER_API_KEY →
68
- # local (Xenova/all-MiniLM-L6-v2, 384-dim).
88
+ # BM25-only. Local embeddings are an explicit opt-in, not the keyless default.
89
+ # `EMBEDDING_PROVIDER=local` uses Xenova/all-MiniLM-L6-v2 (384-dim) on-device;
90
+ # the first embedding request downloads the model and needs network access.
69
91
 
70
92
  # EMBEDDING_PROVIDER=local # local | openai | voyage | cohere | gemini | openrouter
71
93
 
@@ -74,6 +96,8 @@
74
96
  # COHERE_API_KEY=... # General-purpose embeddings
75
97
 
76
98
  # Reuses OPENAI_API_KEY / OPENAI_BASE_URL above when EMBEDDING_PROVIDER=openai.
99
+ # OPENAI_EMBEDDING_BASE_URL=https://... # Embeddings only; falls back to OPENAI_BASE_URL
100
+ # OPENAI_EMBEDDING_API_KEY=sk-... # Embeddings only; wins over OPENAI_API_KEY when set
77
101
  # OPENAI_EMBEDDING_MODEL=text-embedding-3-small # Embedding model when EMBEDDING_PROVIDER=openai
78
102
  # OPENAI_EMBEDDING_DIMENSIONS=1536 # Required when the model is not in the known-models table
79
103
 
@@ -87,7 +111,9 @@
87
111
  # Without a secret, REST endpoints are open on loopback. Set this when
88
112
  # you expose the daemon beyond loopback or run behind a reverse proxy.
89
113
 
90
- # AGENTMEMORY_SECRET=your-secret-here
114
+ # AGENTMEMORY_SECRET=your-secret # generated into ~/.agentmemory/secret on first start when unset
115
+ # VIEWER_ALLOWED_ORIGINS=https://memory.example.com
116
+ # AGENTMEMORY_IMPORT_ROOT=~/projects
91
117
 
92
118
  # -----------------------------------------------------------------------------
93
119
  # 4. Search tuning
@@ -96,6 +122,7 @@
96
122
  # BM25_WEIGHT=0.4 # Hybrid search weight for BM25 leg
97
123
  # VECTOR_WEIGHT=0.6 # Hybrid search weight for vector leg
98
124
  # AGENTMEMORY_GRAPH_WEIGHT=0.2 # Graph traversal bonus on smart-search ranking
125
+ # AGENTMEMORY_GRAPH_COMPACT_ON_BOOT=false # Skip the one-time background trim of oversized graph provenance at startup
99
126
  # TOKEN_BUDGET=2000 # Max tokens injected via mem::context per session
100
127
  # MAX_OBS_PER_SESSION=500 # Per-session observation cap before consolidation kicks in
101
128
  # SUMMARIZE_CHUNK_SIZE=400 # When mem::summarize sees a session larger than this, it chunks observations and map-reduces (chunk-summarize → reduce-merge) to stay within the LLM's context window. Default 400 ≈ 50k tokens per chunk at ~110 tok/obs. Native sessions are capped by MAX_OBS_PER_SESSION; chunking primarily matters for bulk-imported jsonl sessions, which bypass that cap.
@@ -105,29 +132,56 @@
105
132
  # 5. Behaviour flags
106
133
  # -----------------------------------------------------------------------------
107
134
 
108
- # AGENTMEMORY_AUTO_COMPRESS=true # Run LLM compression on every observation batch (requires a provider key). Default off — synthetic compression handles most cases.
109
- # AGENTMEMORY_INJECT_CONTEXT=true # Inject recalled memories back into agent prompts (#143). Default off — hooks capture observations but do not modify conversation.
135
+ # AGENTMEMORY_AUTO_COMPRESS=true # Run LLM-written compression on every observation batch. Requires BOTH this flag and a configured provider; a provider alone leaves synthetic compression active.
136
+ # AGENTMEMORY_INJECT_CONTEXT=true # Inject recalled memories back into agent prompts. Default off — hooks capture observations but do not modify conversation.
110
137
  # CONSOLIDATION_ENABLED=true # Run the 4-tier consolidation pipeline (memories → semantic → procedural). Default off — opt in once you've measured the LLM cost.
111
138
  # CONSOLIDATION_DECAY_DAYS=30 # Age (days) after which non-reinforced memories decay during consolidation
112
139
  # GRAPH_EXTRACTION_ENABLED=true # Extract concept-graph edges on remember; powers the graph-traversal recall path
113
140
  # GRAPH_EXTRACTION_BATCH_SIZE=8 # Memories per graph-extraction batch
141
+
142
+ # Local reasoning models only: set to 1 to ask the model to skip its
143
+ # hidden thinking pass during graph extraction. Extraction runs several
144
+ # times faster; relation quality can drop slightly. Leave unset to let
145
+ # the model think (default).
146
+ # AGENTMEMORY_LLM_NOTHINK=1
147
+
114
148
  # AGENTMEMORY_REFLECT=true # Periodically auto-synthesize lessons from memories
115
- # AGENTMEMORY_DROP_STALE_INDEX=true # Drop on-disk BM25 / vector index on startup if dim guard fires (#248). Recovery toggle for stuck-state debugging.
149
+ # AGENTMEMORY_DROP_STALE_INDEX=true # Drop on-disk BM25 / vector index on startup if dim guard fires. Recovery toggle for stuck-state debugging.
116
150
  # AGENTMEMORY_IMAGE_EMBEDDINGS=true # Enable image embeddings when an image provider is present (experimental).
151
+ # AGENTMEMORY_AUDIT_RETENTION_MONTHS=6 # Drop whole audit-log month scopes older than N months on a daily sweep. Default 0 = keep audit history forever.
152
+ # AGENTMEMORY_AUDIT_MIGRATE_MAX_BYTES=33554432 # Largest legacy mem:audit scope file the one-time migration will read locally. Default 32 MiB; bigger or unreadable stores are left frozen.
153
+ # AGENTMEMORY_AUDIT_INDEX_PERSIST=false # Set to 1 or true to audit index migration and cleanup writes (debugging only)
154
+ # AGENTMEMORY_INDEX_SAVE_INTERVAL_MS=600000 # Minimum time between search index saves; shutdown and deletes still save immediately.
155
+ # AGENTMEMORY_VECTOR_BUCKET_SIZE=500 # Vectors held per storage bucket before a new bucket opens; a save only rewrites buckets it changed.
156
+ # AGENTMEMORY_VECTOR_BACKFILL_MAX=500 # Batch size for re-embedding vectors missing since the last save (continues across restarts); also caps the whole-store opt-in per boot.
157
+ # AGENTMEMORY_VECTOR_BACKFILL=all # Required to backfill an entire store's vectors at once (no prior vector save, or a stale legacy manifest); unset means that case waits for an explicit opt-in.
158
+ # AGENTMEMORY_VIEWER_STREAM_MAX=500 # Max items kept in the persisted "viewer" live-stream group; older entries are pruned in batches. Floored at 200 (the viewer's reload window); negative values fall back to the default
117
159
 
118
160
  # -----------------------------------------------------------------------------
119
161
  # 6. CLI / runtime knobs
120
162
  # -----------------------------------------------------------------------------
121
163
 
122
- # AGENTMEMORY_TOOLS=all # core (7 tools, default) | all (51 tools) — surface exposed to MCP clients
164
+ # AGENTMEMORY_TOOLS=core # all (54 tools, default) | core (8 tools): surface exposed to MCP clients
123
165
  # AGENTMEMORY_SLOTS=memory # Comma-separated plugin slot names the CLI should claim
124
166
  # AGENTMEMORY_DEBUG=1 # Trace MCP shim probe + standalone fallback decisions to stderr
125
167
  # AGENTMEMORY_FORCE_PROXY=1 # Skip the MCP shim livez probe and trust AGENTMEMORY_URL (for sandboxed MCP clients that can't reach localhost)
126
168
  # AGENTMEMORY_PROBE_TIMEOUT_MS=2000 # MCP shim livez probe timeout
127
169
  # AGENTMEMORY_URL=http://localhost:3111 # REST base URL — honored by status, doctor, MCP shim
128
170
  # AGENTMEMORY_VIEWER_URL=http://localhost:3113 # Override the viewer URL printed by `agentmemory status`
171
+ # Persistent iii state; same override as `--data-dir`, used by native and
172
+ # Docker starts. Explicit flag/env wins. Otherwise instance 0 reuses an
173
+ # existing ./data/state_store.db or ./data/iii-config.yaml before defaults: macOS
174
+ # ~/Library/Application Support/agentmemory; Linux $XDG_DATA_HOME/agentmemory
175
+ # or ~/.local/share/agentmemory; Windows %APPDATA%\agentmemory.
176
+ # AGENTMEMORY_DATA_DIR=/absolute/path
177
+ # AGENTMEMORY_III_CONFIG=/path/to/iii-config.yaml # Engine config the CLI starts from; the bundled default binds 127.0.0.1
178
+ # AGENTMEMORY_STATE_SAVE_INTERVAL_MS=2000 # How often the engine writes state to disk; a crash loses at most this much
179
+ # AGENTMEMORY_USE_DOCKER=1 # Prefer bundled Docker even when a compatible native iii binary exists
129
180
  # AGENTMEMORY_EXPORT_ROOT=~/agentmemory-backup # Default destination for `agentmemory export`
130
181
 
182
+ # AGENTMEMORY_STATE_BACKEND=redis # file (default) | redis — storage adapter for iii-state and iii-stream, see README "Storage backend"
183
+ # AGENTMEMORY_REDIS_URL=redis://localhost:6379 # Required when AGENTMEMORY_STATE_BACKEND=redis
184
+
131
185
  # STANDALONE_MCP=1 # MCP shim only — bypass the worker and run @agentmemory/mcp in-process
132
186
  # STANDALONE_PERSIST_PATH=~/.agentmemory/local.db # Path used by the standalone MCP shim's local fallback store
133
187
 
@@ -145,23 +199,39 @@
145
199
  # 7. Ports
146
200
  # -----------------------------------------------------------------------------
147
201
 
148
- # III_REST_PORT=3111 # REST API port (also affects viewer at +2)
149
- # III_STREAMS_PORT=3112 # Streams API port
150
- # III_ENGINE_URL=ws://localhost:49134 # iii-engine WebSocket URL (used by the worker)
202
+ # III_REST_PORT=3111 # REST API + MCP HTTP anchor
203
+ # III_STREAM_PORT=3112 # Preferred streams override; defaults to REST + 1
204
+ # III_STREAMS_PORT=3112 # Legacy alias for III_STREAM_PORT
205
+ # III_VIEWER_PORT=3113 # Viewer bind port; defaults to REST + 2
206
+ # III_ENGINE_PORT=49134 # Engine bind port; defaults to REST + 46023
207
+ # III_ENGINE_URL=ws://localhost:49134 # Explicit/remote worker WebSocket URL; takes precedence over derived engine port
208
+ # Derivation applies only while the corresponding explicit port/URL is unset.
209
+ # `--instance 1` selects 3211/3212/3213/49234 and an instance-1 data subdir.
151
210
 
152
211
  # -----------------------------------------------------------------------------
153
212
  # 8. iii engine pin
154
213
  # -----------------------------------------------------------------------------
155
214
  #
156
- # agentmemory currently pins iii-engine to v0.11.2 — v0.11.6 introduces a
157
- # new sandbox-everything-via-`iii worker add` model that agentmemory
158
- # hasn't been refactored for yet. Override with AGENTMEMORY_III_VERSION
159
- # only after migrating to the sandbox model manually.
215
+ # agentmemory pins iii-engine to the same release as its iii-sdk dependency
216
+ # (v0.22.1). The worker speaks the wire protocol of that engine, so the two move
217
+ # together in agentmemory releases. Override with AGENTMEMORY_III_VERSION only
218
+ # if you run your own engine and know it matches.
219
+
220
+ # AGENTMEMORY_III_VERSION=0.22.1
221
+
222
+ # Engine usage telemetry (iii). Off unless you set it; true opts in.
223
+ # III_TELEMETRY_ENABLED=false
224
+
225
+ # -----------------------------------------------------------------------------
226
+ # 9. Session sweep
227
+ # -----------------------------------------------------------------------------
160
228
 
161
- # AGENTMEMORY_III_VERSION=0.11.2
229
+ # Hourly backstop that marks stale active sessions as abandoned.
230
+ # AGENTMEMORY_SESSION_SWEEP_ENABLED=false # Disable the hourly sweep
231
+ # AGENTMEMORY_SESSION_SWEEP_STALE_HOURS=24 # Inactivity hours before a session is abandoned
162
232
 
163
233
  # -----------------------------------------------------------------------------
164
- # 9. Claude Code bridge (opt-in)
234
+ # 10. Claude Code bridge (opt-in)
165
235
  # -----------------------------------------------------------------------------
166
236
 
167
237
  # CLAUDE_MEMORY_BRIDGE=true # Mirror compressed memories into Claude Code's CLAUDE.md
@@ -169,7 +239,7 @@
169
239
  # CLAUDE_MEMORY_LINE_BUDGET=200 # Lines of memory CLAUDE.md should hold
170
240
 
171
241
  # -----------------------------------------------------------------------------
172
- # 10. Obsidian export (opt-in)
242
+ # 11. Obsidian export (opt-in)
173
243
  # -----------------------------------------------------------------------------
174
244
 
175
245
  # OBSIDIAN_AUTO_EXPORT=true # Auto-export memories to an Obsidian vault on every consolidation
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.mts","names":[],"sources":["../src/cli.ts"],"mappings":";iBAqRsB,kBAAA,CAAA,GAAsB,OAAA"}
1
+ {"version":3,"file":"cli.d.mts","names":[],"sources":["../src/cli.ts"],"mappings":";iBAsYsB,kBAAA,CAAA,GAAsB,OAAA"}