Skip to main content

Module tools_memory

Module tools_memory 

Source
Expand description

The memory tool: the agent writing to its own MEMORY.md.

Kept in its own module because it is the one built-in tool that writes outside the workspace — deliberately, to the file the config names, with a budget and a lock (see crate::memory). Everything it does is reported back to the model and shown to the user in the transcript, so a memory change is never silent.

Structs§

MemoryTool
TaintHit
What matched when a memory call overlapped a tool result from the current turn (#482).
TurnResults
Shared per-turn buffer of tool results inspected by MemoryTool::needs_approval (#482).

Constants§

MEMORY_TAINT_MIN_RUN
Minimum verbatim overlap (in normalized characters) from a tool result in the same turn that triggers the approval gate on a memory mutation (#482).

Functions§

normalize_for_taint
Normalize text for verbatim overlap checks: strip leading reader line-number prefixes (^\s*\d+[|:]\s*) per line and collapse runs of whitespace to single spaces.