Skip to main content

User Memory Adapter

Nobody should have to repeat their preferences to every agent, every session. The memory adapter gives every user — and every agent acting for them — a durable, editable memory that agents carry into each turn, with a deliberately tiny surface: one operation, v/ops/memory, dispatched by a command field (recall, remember, update, forget). One tool definition instead of four keeps the cost in an agent's tool palette minimal.

Memory lives as a plain vector at a workspace path (default w/memory) in the calling user's namespace — queryable, governed lattice state like everything else, not a private database. Storage delegates to covia:read/covia:write, so per-user scoping and capability enforcement are inherited rather than reimplemented.

Operations

memory remember — Append an Item

{
"operation": "v/ops/memory",
"input": { "command": "remember", "text": "Prefers metric units" }
}

Returns {remembered: true, n, count}n is the new item's number.

memory recall — Render the List

Returns the memory as a numbered text block (1. …), or null when empty. Agents rarely call this directly: list it in config.context and the memory is injected into the agent's context every turn, freshly rendered.

{
"operation": "v/ops/memory",
"input": { "command": "recall" }
}

recall can also point at a map of records (e.g. a slug-keyed store): entries render sorted, displayField picks the line text (default "text"), noteField appends a note. Entries marked inactive, held, or merged are skipped.

memory update / forget — Edit by Number

{ "operation": "v/ops/memory", "input": { "command": "update", "n": 2, "text": "Prefers SI units" } }
{ "operation": "v/ops/memory", "input": { "command": "forget", "n": 2 } }

n is the 1-based number as shown by recall — the number the agent sees is the number it edits. Both refuse to operate on anything that is not a flat list, so a structured store can never be clobbered by a stray edit.

Input Reference

FieldTypeRequiredNotes
commandrecall | remember | update | forgetrequired
textstringremember, updatethe item text
nintegerupdate, forget1-based item number
pathstringoptionalmemory list path, default w/memory
displayField, noteFieldstringoptionalrecall over map collections

Access Control and Durability

Authentication is required — memory is always some user's memory. Items are stored as {text, ts} (with updated stamped on edits), and every mutation rewrites the whole vector, so a forgotten item is durably gone — it cannot re-materialise through a partial merge.