Expand description
Persistent memory tools: remember, recall, forget.
Also provides a scratchpad (working memory) layer: scratchpad_set,
scratchpad_get, scratchpad_delete, scratchpad_list. The scratchpad
is stored in <workspace>/.recursive/scratchpad.json and its contents
are injected into the system prompt as a summary.
Notes are stored in <workspace>/.recursive/memory.json (or
~/.recursive/memory.json if RECURSIVE_MEMORY_GLOBAL=1).
Schema:
{ "notes": [ { "id": "N1", "tags": ["rust"], "text": "...", "ts": "..." } ] }Structs§
- Forget
- Memory
Store - The on-disk store.
- Note
- A single memory note.
- Recall
- Remember
- Scratchpad
- The on-disk scratchpad store.
- Scratchpad
Delete - Scratchpad
Entry - A single scratchpad entry.
- Scratchpad
Get - Helper: dispatch scratchpad operations based on the tool name. This is used by the multi-tool approach where one struct handles multiple tool names.
- Scratchpad
List - Working
Memory Tool
Functions§
- load_
memory - Load the memory store from the workspace-relative path.
- load_
scratchpad - Load the scratchpad from the workspace-relative path.
- memory_
path - Determine the memory file path based on workspace and env var.
- memory_
summary - Build a memory summary string for injection into the system prompt. Returns the top N most recent notes as a formatted block, or empty string if no notes exist.
- migrate_
scratchpad - Migrate old-format scratchpad data (if any) to the new format. Currently a no-op placeholder for future migration logic.
- scratchpad_
path - Determine the scratchpad file path. Lives under the per-user data
dir so it doesn’t pollute the project tree:
~/.recursive/workspaces/<ws-hash>/scratchpad.json. - scratchpad_
summary - Build a scratchpad summary string for injection into the system prompt. Returns a formatted block of all key-value pairs, or empty string if the scratchpad is empty.