Codumentor logo Codumentor Enterprise

Semantic Memory Plugin

The Semantic Memory plugin gives the assistant **its own long-term memory of
working with each user**: one-line notes — decisions and their reasons,
preferences and corrections, facts about the user and their projects, lessons
from mistakes — that the assistant sees an overview of at the start of every
conversation, and can search or expand with two tools.

It is not the organizational memory, and the two are
independent. Agentic Memory curates team-owned notes a background curator
files for everyone; Semantic Memory is per-user, private to the person the
assistant talked to, and written by the assistant itself in the moment — no
curator, no review queue. It is also not Episodic
Memory
, which reads the user's past conversations;
Semantic Memory holds only the distilled one-liners the assistant chose to
save. A deployment can run either plugin, both, or neither.

Design: inspired by OptMem by Victor Taelin — an append-only log of one-line
memories summarized into a binary tree of blocks, from which an age-weighted
overview is shown at session start. No code was copied; see the package
docstring (src/codumentor/plugins/semantic_memory/__init__.py) for the
deliberate differences.

How it works

The tools

ToolParametersReturns
memory_notetext (required, one self-contained line)Saved as #<idx>.
memory_recallexactly one of query (case-insensitive regex over ' #id YYYY-MM-DD text' lines) or block (a summary id like #64-127 to expand)The newest matching memories that fit the character budget, or the contents one level under a summary

memory_note is deliberately not a write-tier tool: it writes only the
calling user's own private memory, so it needs no approval gate. Both tools
are token-bounded (recall_max_chars, default 8000).

Neither tool reaches subagents, internal sessions, or — unless
include_scheduled_runs is set — scheduled runs. There is no
target_agents: the memory belongs to the assistant the user talks to.

What the user controls

Settings → Extensions → Semantic Memory:

SettingValuesDefault
Use semantic memoryon / offon
Lines shown at conversation start8 – max_wake_linesdefault_wake_lines (64)

Turning the first setting off hides the memory and its tools from the
assistant; nothing is deleted. The panel also hosts the memory explorer
(x-semantic-memory-explorer): the current overview with pending-summary
counts, search, adding a memory by hand, deleting one, or clearing all of
them (with confirmation).

Routes

Mounted at /ui/plugins/semantic_memory/, always scoped to the signed-in
user — there is no id to guess, and another user's data is unreachable.

MethodPathPurpose
GEToverview?lines=What the assistant sees at conversation start, plus counts and compression status
GETblocks/{block_id}One level below a summary
GETsearch?q=Memories containing q (plain text), newest first
POSTmemoriesAdd one memory
DELETEmemories/{idx}Delete one memory
DELETEmemories?confirm=trueDelete every memory of the caller

Configuration

Ships enabled in the default shipped config, which carries this block:

plugins:
  - module: codumentor.plugins.semantic_memory
    class: SemanticMemoryPlugin
    args:
      enabled: true
ParameterTypeDefaultDescription
enabledbooltrueWhether the plugin is active.
include_scheduled_runsboolfalseAlso give scheduled runs (goal workers, timed and webhook tasks) the memory and its tools.
default_wake_linesint 8–40064Overview lines injected for a user who has not chosen (about 60 tokens a line).
max_wake_linesint 8–400160The most lines a user may choose.
entry_bytesint 80–280280Most UTF-8 bytes in one memory or one summary.
raw_maxint 2–6416Blocks up to this many memories are summarized from the memories themselves; bigger ones from their two halves' summaries. Should be a power of two.
recall_max_charsint 1000–400008000Most characters one memory_recall result may return.
compress_enabledbooltrueSummarize blocks in the background with a model. Off: no model calls, the overview shows raw memories and trims the oldest.
compress_model_rolestring \nullsemantic_memory_compressor
db_pathstring \nullnull

Notes