Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@
# embedding). The OpenAI LLM path also honours the OpenAI-scoped
# OPENAI_TIMEOUT_MS alias for back-compat with v0.9.17 (precedence).
# AGENTMEMORY_LLM_TIMEOUT_MS=60000 # Default: 60 000 ms (60 s)
# Most LLM calls (compress, summarize, image description) in flight at once
# across the whole process (default 4). Calls over the cap wait for a slot.
# Lower it when a self-hosted backend answers 429 "queue full". A 429 or 503
# never opens the circuit breaker; the call honors Retry-After within its
# timeout budget instead.
# AGENTMEMORY_LLM_MAX_CONCURRENCY=4

# Opt-in Claude-subscription fallback (spawns @anthropic-ai/claude-agent-sdk
# child sessions). Off by default — the agent-sdk fallback can trigger
Expand Down Expand Up @@ -118,7 +124,7 @@
# VECTOR_WEIGHT=0.6 # Hybrid search weight for vector leg
# AGENTMEMORY_GRAPH_WEIGHT=0.2 # Graph traversal bonus on smart-search ranking
# TOKEN_BUDGET=2000 # Max tokens injected via mem::context per session
# MAX_OBS_PER_SESSION=500 # Per-session observation cap before consolidation kicks in
# MAX_OBS_PER_SESSION=500 # Per-session observation cap; at the cap the least important observation is evicted to admit the new one
# SUMMARIZE_CHUNK_TOKENS=50000 # Prompt-token budget per chunk when mem::summarize map-reduces a large session (chunk-summarize → reduce-merge). Observations are measured with the provider's tokenize route when it has one (llama.cpp-style POST /tokenize) and estimated at chars/3 otherwise; the ~400-token system prompt is reserved inside this budget. A 50k chunk summarizes cold in 60–89s on a local 35B model.
# SUMMARIZE_CHUNK_CONCURRENCY=2 # Parallel chunk LLM calls during chunked summarize. A local broker serialises chunks on one GPU, so more concurrency only stretches each call: AGENTMEMORY_LLM_TIMEOUT_MS is sized for 2. Raise it for hosted providers that run chunks in parallel, and re-measure the timeout if you do.

Expand All @@ -133,7 +139,7 @@
# AGENTMEMORY_MEMORY_LAYER_BOOST=1.25 # Multiplicative boost on the fused score for saved memories (id prefix mem_, or sessionId "memory"). Multiplicative so it needs no recalibration when the weights, RRF_K or the fusion mode move. Keep it a tiebreak, not an override — it is bounded only by the supersede de-index and the isLatest skip.
# AGENTMEMORY_RETRIEVAL_DEPTH=100 # Minimum candidates fetched from EACH leg before fusion, independent of the caller's page size. Legs were previously fetched at limit*2, which made results non-monotonic in limit: a document deep in the vector leg fell outside the fetch at small limits and forfeited its vector term, and under RRF that is unrecoverable (the vector term is worth up to 0.6/61 while the whole BM25 term tops out at 0.4/61). Curated memories are exactly the long, diffuse documents that sit deep in the vector leg. Nearly free — the vector scan is full regardless of limit; only the sort grows (~+8ms at 25k vectors). This is a CANDIDATE POOL size, not a page size - the caller still receives exactly `limit` rows. Set to 0 to disable the floor and restore the old limit*2 fetch.
# AGENTMEMORY_PREFIX_MATCH=max # How the prefix-expansion leg combines. 'max' (default) treats all index terms sharing a query-token prefix as ONE term and takes the best, bounding the contribution by construction. 'sum' restores the historical additive behaviour, in which each distinct sibling added its own full BM25 contribution — a document listing v1.0.0 through v1.40.0 accumulated 40 contributions for the single query token "v1" and outscored exact matches (measured 110.01 at 80 siblings against a ~22 single-term ceiling).
# AGENTMEMORY_INDEX_EXCLUDE_TOOL_PREFIXES=mcp__plugin_agentmemory_agentmemory__ # Comma-separated toolName prefixes whose observations are STORED but never INDEXED. Aimed at retrieval echoes — the daemon's own record of "the agent searched for X" contains the query verbatim, making it a near-perfect match for exactly the query that created it. The records stay fully readable via timeline, session history, the viewer and expandIds.
# AGENTMEMORY_INDEX_EXCLUDE_TOOL_PREFIXES=mcp__plugin_agentmemory_agentmemory__,mcp__agentmemory__ # Default shown; set empty to index everything. Comma-separated toolName prefixes whose observations are STORED but never INDEXED. Aimed at retrieval echoes — the daemon's own record of "the agent searched for X" contains the query verbatim, making it a near-perfect match for exactly the query that created it. The records stay fully readable via timeline, session history, the viewer and expandIds.

# --- Memory chunking ---------------------------------------------------
# AGENTMEMORY_MEMORY_CHUNKING=true # Embed each saved memory as several vectors, one per ~section, instead of one vector for the whole thing. A long multi-topic memory otherwise averages out to a point near the corpus centroid and matches nothing. Also puts the memory's concepts into the embedded text, which the single-vector path never did. Requires a full index rebuild to take effect on existing memories.
Expand All @@ -151,6 +157,7 @@
# AGENTMEMORY_INJECT_CONTEXT=true # Inject recalled memories back into agent prompts (#143). Default off — hooks capture observations but do not modify conversation.
# CONSOLIDATION_ENABLED=true # Run the 4-tier consolidation pipeline (memories → semantic → procedural). Default off — opt in once you've measured the LLM cost.
# CONSOLIDATION_DECAY_DAYS=30 # Age (days) after which non-reinforced memories decay during consolidation
# EVICTION_ENABLED=false # Opt out of the daily Eviction sweep (stale unsummarized sessions, old low-importance observations, per-project cap)
# GRAPH_EXTRACTION_ENABLED=true # Extract concept-graph edges on remember; powers the graph-traversal recall path
# GRAPH_EXTRACTION_BATCH_SIZE=8 # Memories per graph-extraction batch

Expand Down Expand Up @@ -231,4 +238,5 @@
# AGENTMEMORY_SQLITE_PATH=/var/lib/agentmemory/agentmemory.sqlite # The store (WAL mode); its directory must exist
# AGENTMEMORY_AUDIT_STORE=off # Emit audit entries as `[agentmemory] audit <operation> <json>` log lines instead of KV rows; memory_audit then answers an empty list
# AGENTMEMORY_AUDIT_LOG=all # With AUDIT_STORE=off: all | deletions (forget, delete, lesson_delete, slot_delete, core_remove, sketch_discard only) | off
# AGENTMEMORY_AUDIT_MAX=50000 # Newest audit rows the daily Eviction keeps in KV
# AGENTMEMORY_LOG_LEVEL=info # Lowest logger level written: info | warn | error | off. Audit lines bypass it.
55 changes: 38 additions & 17 deletions docs/upstream-issue-triage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,9 @@ issues:
difficulty: low
kind: bug
note: "Hook resolveProject is not worktree-aware, so each worktree is its own memory silo."
disposition: candidate
disposition: already-fixed
status: "fixed-here — 1dc4d43: resolveProject names a linked worktree after its main checkout (parent of --git-common-dir when it is a .git folder), falling back to the toplevel basename. Sessions already filed under a worktree name are not migrated."
fixed_by: "1dc4d43"
url: https://github.com/rohitg00/agentmemory/issues/728
- number: 730
title: "feat: add Nix flake support for one-command installation"
Expand Down Expand Up @@ -1247,7 +1249,8 @@ issues:
difficulty: med
kind: bug
note: "Replace-import wipes KV but leaves the search indices stale until restart."
disposition: candidate
disposition: already-fixed
fixed_by: "Replace-import deletes through deleteIndexed and merge/replace index what they write via indexRecords (src/functions/export-import.ts)."
url: https://github.com/rohitg00/agentmemory/issues/938
- number: 944
title: "[viewer] Agentmemory Token Savings always 0% — estInjected counts all sessions, not just active"
Expand Down Expand Up @@ -1325,7 +1328,9 @@ issues:
difficulty: med
kind: bug
note: "Observations containing CJK text hang import and live ingestion indefinitely."
disposition: candidate
disposition: already-fixed
status: "fixed-here — no hang found: the CJK tokenizer makes one forward-only pass (src/state/cjk-segmenter.ts) and truncation cuts by string length; no loop over text can stall."
fixed_by: "src/state/cjk-segmenter.ts makes one forward-only pass; no loop over text can stall."
url: https://github.com/rohitg00/agentmemory/issues/969
- number: 972
title: "Add an optional HVTracker trust badge to the README"
Expand Down Expand Up @@ -1421,7 +1426,9 @@ issues:
difficulty: low
kind: bug
note: "post-tool-use records agentmemory's own MCP calls, polluting recall."
disposition: candidate
disposition: already-fixed
status: "fixed-here — b082b94: AGENTMEMORY_INDEX_EXCLUDE_TOOL_PREFIXES defaults to mcp__plugin_agentmemory_agentmemory__,mcp__agentmemory__, so agentmemory's own MCP calls are stored but not indexed; set it empty to index everything."
fixed_by: "b082b94"
url: https://github.com/rohitg00/agentmemory/issues/993
fix_prs: [994, 1044]
- number: 996
Expand Down Expand Up @@ -1508,7 +1515,8 @@ issues:
difficulty: low
kind: bug
note: "ResilientProvider renames noop, so the summarize short-circuit can never fire."
disposition: candidate
disposition: already-fixed
fixed_by: "isNoopProvider unwraps resilient(...) names (src/providers/noop.ts:22-34), and the summarize and graph gates use it."
url: https://github.com/rohitg00/agentmemory/issues/1020
fix_prs: [1040]
- number: 1022
Expand Down Expand Up @@ -1600,7 +1608,8 @@ issues:
difficulty: low
kind: bug
note: "Hooks crash with exit 1 when the payload JSON is literal null (unguarded data access)."
disposition: candidate
disposition: already-fixed
fixed_by: "Every hook returns on a null or non-object payload right after parsing (e.g. src/hooks/post-tool-use.ts:35, src/hooks/pre-tool-use.ts:55)."
url: https://github.com/rohitg00/agentmemory/issues/1047
- number: 1048
title: "feat: add support for gemini-embedding-2 and make Gemini embedding model configurable"
Expand Down Expand Up @@ -1670,16 +1679,19 @@ issues:
difficulty: low
kind: bug
note: "Claude Code summarizer and Warmup transcripts ingested as real phantom sessions."
disposition: candidate
disposition: already-fixed
status: "fixed-here — 2f99c65: import-jsonl skips a transcript whose first prompt is Warmup or the conversation-list summary instruction. Live store had 0 such sessions; hooks already drop SDK child runs via isSdkChildContext."
fixed_by: "2f99c65"
url: https://github.com/rohitg00/agentmemory/issues/1064
- number: 1065
title: "lesson-recall default minConfidence (0.1) + decay + auto-prune make most auto-consolidated lessons invisible, with no config override"
severity: high
difficulty: low
kind: bug
note: "Default minConfidence plus decay hides 438 of 439 lessons from recall, with no override."
disposition: candidate
status: "present-here — mem::lesson-recall defaults minConfidence to 0.1 and drops anything below it (src/functions/lessons.ts:159,173). The decay sweep floors confidence at 0.05 (src/functions/lessons.ts:320), so a decayed lesson lands in 0.05-0.1 and is invisible at the default. Upstream's \"no override\" is wrong — the param is exposed."
disposition: already-fixed
status: "fixed-here — 98d246c: mem::lesson-recall defaults minConfidence to 0, so a lesson decayed to the 0.05 floor is still recalled."
fixed_by: "98d246c"
url: https://github.com/rohitg00/agentmemory/issues/1065
- number: 1066
title: "memory_heal claims \"fixable\": true for project-scope backfill but the heal step does nothing ({\"fixed\":0,\"skipped\":0})"
Expand Down Expand Up @@ -2015,7 +2027,8 @@ issues:
difficulty: med
kind: bug
note: "Imported observations are never added to the BM25 index and have no reindex path."
disposition: candidate
disposition: already-fixed
fixed_by: "Imports index what they write via indexRecords (src/functions/export-import.ts, src/functions/replay.ts); BM25 is rebuilt from content rows on every boot."
url: https://github.com/rohitg00/agentmemory/issues/1163
mentioned_by_prs: [1187]
- number: 1165
Expand Down Expand Up @@ -2103,7 +2116,8 @@ issues:
difficulty: med
kind: bug
note: "Nothing schedules an index save after boot, so runtime indexing is lost unless the process exits cleanly."
disposition: candidate
disposition: already-fixed
fixed_by: "Vectors are SQLite rows written in the store transaction, and BM25 is rebuilt from content rows at boot (src/index.ts), so no index save is needed (ADR 0001)."
url: https://github.com/rohitg00/agentmemory/issues/1180
- number: 1181
title: "mem:audit is 71% index_persist rows the audit policy does not cover"
Expand Down Expand Up @@ -2242,8 +2256,9 @@ issues:
difficulty: low
kind: bug
note: "0.9.29's default OpenAI model is a reasoning model but the provider still sends max_tokens; every compress and summarize 400s."
disposition: candidate
status: "present-here — Default model is gpt-5.6-luna (src/providers/openai.ts:12, src/config.ts:95) and the chat body always sends max_tokens (src/providers/openai.ts:82) while also sending reasoning_effort (src/providers/openai.ts:95) — the two are mutually exclusive on OpenAI's chat-completions API. Nothing maps to max_completion_tokens."
disposition: already-fixed
status: "fixed-here — b0b25f9: OpenAIProvider sends max_completion_tokens when the base URL is api.openai.com and max_tokens to compatible servers."
fixed_by: "b0b25f9"
url: https://github.com/rohitg00/agentmemory/issues/1219
fix_prs: [1275]
- number: 1221
Expand Down Expand Up @@ -2452,7 +2467,9 @@ issues:
difficulty: med
kind: bug
note: "PreToolUse injection uses raw stdout instead of the hook envelope, against a 2s budget on a 6-29s endpoint."
disposition: candidate
disposition: already-fixed
status: "fixed-here — 895d01c: pre-tool-use emits {hookSpecificOutput:{hookEventName: PreToolUse, additionalContext}} when the payload names PreToolUse, plain text otherwise; live /enrich answers in under 0.2s, so the 2s bound stays. Part 3 is not addressed: the hook still reads project only from the payload, so its enrich calls stay unscoped; upstream warns that scoping them must be measured first."
fixed_by: "895d01c"
url: https://github.com/rohitg00/agentmemory/issues/1278
- number: 1279
title: "[viewer] Dashboard \"Memories\" stat card caps at 500 — uses .length of a limited fetch instead of the total field"
Expand All @@ -2469,7 +2486,9 @@ issues:
difficulty: med
kind: bug
note: "deriveCrystalAndLessons slices lessons mid-sentence; 775 of 981 unusable and some invert meaning."
disposition: candidate
disposition: already-fixed
status: "fixed-here — 0a4874a: lessons are whole sentences that open with a trigger, have balanced markup and fit 220 chars; a re-import no longer bumps reinforcements or lastReinforcedAt, so a re-derived lesson can still decay out."
fixed_by: "0a4874a"
url: https://github.com/rohitg00/agentmemory/issues/1292
- number: 1297
title: "Feature request: signal deletion / TTL for signals"
Expand Down Expand Up @@ -2588,7 +2607,8 @@ issues:
difficulty: med
kind: bug
note: "The shutdown index save is lost to a teardown race and boot only reconciles a fully empty index."
disposition: candidate
disposition: already-fixed
fixed_by: "No shutdown index save exists to lose: vectors persist per write and BM25 is rebuilt at boot; a boot and hourly fill pass repairs a partial vector index (src/index.ts)."
url: https://github.com/rohitg00/agentmemory/issues/1335
- number: 1338
title: "fix(providers): createFallbackProvider drops baseURL — custom-endpoint fallbacks (DeepSeek/Kimi/etc.) hit the wrong API host"
Expand Down Expand Up @@ -2623,7 +2643,8 @@ issues:
difficulty: low
kind: bug
note: "Dead noop gate causes a summarize failure storm when no LLM key is set."
disposition: candidate
disposition: already-fixed
fixed_by: "isNoopProvider unwraps resilient(...) names (src/providers/noop.ts:22-34), and the summarize and graph gates use it."
url: https://github.com/rohitg00/agentmemory/issues/1341
mentioned_by_prs: [1342]
- number: 1360
Expand Down
Loading
Loading