Agentic Memory Plugin
The Agentic Memory plugin stores useful knowledge from conversations into a
repository in the background, and retrieves relevant notes (Rapid Direction
Cues) into later turns so the agent does not have to rediscover the same
facts. Storage never blocks the reply you are waiting on; a failure to store
or recall does not break the conversation.
Each user can turn Automatic Context Retrieval and **Automatic Memory
Storage** on or off in Settings (both default on). The agent can still look
memories up on demand via the memory_lookup tool even when automatic
retrieval is off.
Configuration
plugins:
- module: codumentor.plugins.agenticmemory
class: AgenticMemoryPlugin
args:
enabled: true
repo_name: your-knowledge-repo # optional in single-repo mode
kb_base_dir: knowledge
retrieval_enabled: true
retrieval_num_results: 3
repo_name is required in multi-repo setups. If you omit it in single-repo
mode, the plugin uses that sole repo.
Scope ingestion of the KB repo to the notes
If the KB repo is dedicated to memory (notes plus working state — goal files,
the deprecated/ archive, scratch), scope ingestion to the notes root so
nothing else is embedded:
repos:
- name: your-knowledge-repo
path: your-knowledge-repo
ingest_paths: knowledge # match kb_base_dir
Recall only ever returns notes from kb_base_dir, so anything else in the
repo costs embeddings and search slots for results that are then discarded.
This is not derived from kb_base_dir automatically: repo_name may
point at a source repo, where narrowing ingestion would silently stop
indexing the code. See
configuration.md → ingest_paths.
Parameters
All configuration is under the plugin args: block.
Storage
- enabled (optional): Master switch (default:
true) - repo_name (optional): Repository for storing and recalling memories. Unset falls back to the sole repo in single-repo mode.
- kb_base_dir (optional): Directory inside that repo for notes (default:
"knowledge"). Deprecated notes are archived in a siblingdeprecated/directory, not inside the notes root. - reingest_enabled (optional): Re-ingest the memory repo after a successful store so new notes become searchable (default:
true) - storage_enabled (optional): Run the background store job. Set
falseto keep retrieval without writing new notes (default:true) - facets_hint (optional): Default classification hints passed to the store run (default:
{}) - storage_max_iterations (optional): Max iterations for the memory storage subagent. Unset = global
agent.max_iterations.storage_max_turnsis a legacy alias;storage_max_iterationswins if both are set. - storage_verdict_repair_enabled (optional): If a store run replies in prose instead of the expected verdict JSON, re-ask once to restate it as JSON before showing a failure card (default:
true) - storage_verdict_repair_model_role (optional): Model-profile role for that repair call. Unset = the global agent model.
Git
- commit_enabled (optional): Commit stored notes. Set
falsefor non-git workspaces so storage does not fail on a missing.git. Whenfalse,push_enabledis a no-op (default:true) - push_enabled (optional): Push after committing. Ignored when
commit_enabledisfalse. On a non-fast-forward failure, the plugin runsgit pull --rebase --autostashand retries the push once (default:true) - push_timeout (optional): Seconds to wait for
git push(and the recovery pull) before timing out (default:30) - push_max_consecutive_failures (optional): Suspend push after this many consecutive failures (counted per push attempt; resets on server restart) (default:
5)
Retrieval (turn-start cues)
- retrieval_enabled (optional): Inject relevant notes at the start of a turn (default:
true) - retrieval_num_results (optional): How many cues to retrieve (default:
3) - retrieval_cue_char_limit (optional): Max characters from each retrieved cue (default:
1000) - retrieval_timeout (optional): Seconds before giving up on a retrieval call so a hung embedding does not stall the turn (default:
5.0) - retrieval_min_score_threshold (optional): Drop vector hits below this score. Unset = no extra floor.
Automatic recall and the lookup tool
These are also gated by each user's Automatic Context Retrieval setting,
except memory_lookup, which stays available when that setting is off.
- recall_term_scan_enabled (optional): Scan the user message (and, when enabled below, tool output) for known terms/aliases and hint matching notes (default:
true) - recall_lookup_tool_enabled (optional): Register the
memory_lookuptool (termresolves an alias to the full note;searchis full-text over note bodies). Independent of automatic retrieval (default:true) - recall_bm25_enabled (optional): Enable
memory_lookup'ssearchmode (default:true) - recall_df_max_files (optional): Terms that appear in more than this many distinct code-repo files are demoted to pull-only, so a common word like
coreis not auto-injected (default:50) - recall_auto_token_budget (optional): Estimated-token budget for auto-injected recall per turn (default:
900) - recall_full_note_max_chars (optional): Above this size, an auto-injected note is a hint rather than the full body (default:
400) - recall_scan_tool_results (optional): Also scan tool results/args/errors mid-turn so a term the agent meets while working can be hinted without waiting for the next user message (default:
true) - recall_scan_max_bytes (optional): Bytes of each tool result scanned (default:
65536) - recall_max_fires_per_iteration (optional): Hint lines per mid-turn note (default:
3) - recall_max_auto_fires_per_turn (optional): Auto hints per turn from all sources (default:
8) - recall_subagent_scan_enabled (optional): Run the same mid-turn scan inside subagents (halved budget; a term hinted there is not re-hinted by the main loop). Turn-start vector recall stays main-agent-only (default:
true) - recall_lost_agent_nudge_enabled (optional): Once per turn, if the agent is calling tools without making progress, remind it that
memory_lookupmay help. No-op when the lookup tool is off (default:true) - recall_first_contact_primers_enabled (optional): The first time a session's tools touch a repo or a subject that has an index/overview note, offer that primer once (default:
true) - recall_long_query_threshold (optional): Character length above which a user message is split into several retrieval probes (default:
400) - recall_max_probes (optional): Cap on those probes (default:
5) - recall_votes_enabled (optional): Fold thumbs-up/down on cues into ranking (default:
true) - recall_min_fused_score (optional): Abstain from turn-start injection when the best note scores below this.
0.0restores always-inject (default:0.012) - recall_bm25_min_score (optional): Floor for a BM25-only hit to be injected.
0.0restores the old bypass (default:1.0) - recall_skip_scheduled_runs (optional): Skip turn-start recall on scheduled / goal-worker ticks (the bootstrap prompt is the same every time). Mid-turn scan and
memory_lookupstill run (default:true) - recall_rank_hints_by_specificity (optional): When a hint cap is hit, keep more specific terms (identifiers, rare aliases) rather than whichever arrived first (default:
true) - recall_demote_tool_name_terms (optional): Never auto-fire a hint whose term is a registered tool name (default:
true) - recall_df_include_agent_state (optional): Count the memory repo's non-note trees (goal KBs, etc.) when deciding which terms are "too common". Memory notes themselves are never counted (default:
true) - recall_exclude_archived_notes (optional): Do not auto-inject retired notes (
deprecated/,_archive/,no-action-*, deprecated lifecycle). They remain reachable throughmemory_lookup, labelled[archived](default:true) - recall_trace_log (optional): Log per-turn recall decisions at debug (default:
false) - recall_consolidation_enabled (optional): After the memory repo is re-ingested, recompute common-term demotions in the background (default:
true) - recall_alias_backfill_enabled (optional): During consolidation, fill missing
aliases:on older notes with a cheap model call (each note at most once) (default:true) - recall_alias_backfill_max_notes (optional): Notes backfilled per consolidation run (default:
50) - recall_alias_backfill_model_role (optional): Model-profile role for that backfill (default:
"memory_alias_backfill"; falls back to the global agent model)
Author confidence
Memories record who wrote them. Lower-confidence authors rank weaker at
recall; very low confidence can require approval before a note is treated as
authoritative.
- confidence_weights (optional): Role → score map. Defaults:
admin1.0,power_user0.8,user0.6,guest0.4 - confidence_threshold (optional): Below this, retrieved memories show a warning (default:
0.5) - require_approval_below (optional): Below this, memories require approval (default:
0.5)
Rapid Direction Cues
Retrieved notes are injected as short, optional cues — naming conventions,
historical renames, component locations, and similar hints that are not
obvious from the code. The agent is told to use only the relevant ones.
Users can thumbs-up / thumbs-down a cue in the transcript. A dislike can mark
the memory as generally unhelpful and/or request a human review.
What you see in the UI
Transcript cards track store and recall: queued / started / stored / failed,
and the cues that were retrieved. A review card on each cue collects votes.
Welcome page widgets (auto-refresh):
| Widget | Who | What |
|---|---|---|
| Memory Feedback | Users with memory_feedback:review | Counts of unhelpful memories and review requests; opens the review page |
| Your Memory Feedback | Any signed-in user | Counts of that user's own reports |
| Memory History | Any signed-in user | Recent store runs |
Pages:
- Memory Feedback Review (
/plugins/agentic_memory/review) — admins see every report (file, tags, who, reason, the query that retrieved it, full note content) and can Delete Memory (removes the file, commits, and drops related votes) or Ignore Feedback (hides the report; the file stays). Users without the permission see only their own reports and can Edit or Delete the report (the memory file is unchanged). - Memory Storage History (
/plugins/agentic_memory/history) — past store runs for the current user.
To disable the plugin UI (events still appear as generic cards):
ui:
disabled_extensions:
- agentic_memory
Grant admin review access with the memory_feedback:review permission in
RBAC. No extra plugin flag is required for the review UI.
Repository setup
- Create or clone a git repo for knowledge (or reuse a source repo).
- List it under
reposand, for a dedicated KB, setingest_pathstokb_base_diras above. - Create the notes directory (
knowledge/by default) if it does not exist.
Git tuning for large knowledge bases
Optional. The plugin works without Git tuning. If git status / git commit
in the KB repo become slow after a long-running deployment, enable
commit-graph and incremental maintenance in that repo:
cd /path/to/your-knowledge-repo
git config core.commitGraph true
git config gc.writeCommitGraph true
git config fetch.writeCommitGraph true
git config commitGraph.changedPaths true
git config maintenance.strategy incremental
git maintenance start
Notes already live in subdirectories under kb_base_dir (for example
knowledge/cues/). Avoid dumping thousands of files into one flat directory.
CI that does not need history can clone with --depth=1.
Notes
- Storage and retrieval failures are logged; the main conversation continues.
- Vector recall is semantic, not exhaustive, and scoped to the configured repo. Cue previews are capped by
retrieval_cue_char_limit. - To turn the plugin off without removing it from
plugins::
args:
enabled: false