Skip to content

Memory: notes your agents keep for next time - #379

Open
hkonsti wants to merge 6 commits into
mainfrom
memory-notes
Open

hkonsti wants to merge 6 commits into
mainfrom
memory-notes

Conversation

@hkonsti

@hkonsti hkonsti commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #361 (secrets in the vault). Adds Memory: notes agents keep for themselves, so the vault can go back to holding the person's details.

Memory

  • New built-in integration memory, one per member, shared by all their agents. Notes are stored like Files (FileNode, FileVersion, FileChange), so every version is kept and each change records which persona or agent wrote it, for which task. Like the member's vault, Chat and drive, it's made with their membership (MEMBER_CONNECTIONS), and v077_make_memory_with_memberships makes one for every existing member.
  • Agent tools:
    • notes_list {search}: full-text search over titles and note text
    • notes_get
    • memory_write {title, content, version?}: refused when the note changed since it was read
    • memory_forget: moves the note to the trash
  • Every thread is given "About you" whole, plus an index of the other notes (id, title and first line), capped at 6,000 characters. The instructions say what memory is for, not rules about what to write.
  • Size limits: "About you" ≤ 3,000 characters, other notes ≤ 20,000.
  • With a memory, the vault instructions describe the vault as the person's details (address, numbers) rather than as memory. An agent that can't read the memory keeps the old wording.
  • Web: a Notes tab on the Memory connection page. It shows About you, then the notes with who wrote them, and opens a note with edit, forget, and a history: each version's author and task, a line diff against the version before, and restore. The page uses the existing drive routes for writes.

Not in this PR

  • Dreaming (background consolidation of memory).
  • Content search in Files: memory search reads note text, but drive search still matches names only.
  • Moving existing vault entries into memory. That's left to the person (or an agent) after deploy.

Known issues from review

  • One unreadable note's blob fails every thread's instructions (memoryInstructions → readNotes).
  • Memory has no row on the Connections page, so the Notes tab is only reachable by its URL.
  • Notes written from the web skip the server's title and length rules (nameOf, requireContent).
  • readNotes reads every note's blob to serve one note or the index.

Tests

  • api: notes, starter connections and the migration's name.
  • web: line diff, the Memory tab.
  • Typecheck, lint, and the api, web, integrations and db tests pass.

Open workspace in Conductor

A vault keeps secrets beside its entries: a name (an environment
variable's), a value and a note. An agent sees a secret's name and note,
never its value, which only the person reads, on the vault's page.

Use secrets gives the named secrets to a sandbox command as environment
variables (sandbox_exec {secrets}), and what the command writes back has
each value shown as [secret NAME]; Save secrets adds, replaces and
deletes them without reading any back. Both are off by default.
…immed

What a sandbox command writes back now has the values of every secret
the agent may use shown by their names, not only those the call asked
for: a value one command wrote to a file, another may print. Masking
keeps a value out of the agent's answers by accident; an agent set on
reading what its command is given can always, which the comments, the
agent's instructions and the secret's dialog now say.

A secret's value is kept without the spaces and line breaks around it,
which a paste brings along and a command's output may leave off.
Masking replaces every value in one pass, so a short secret's value is
never found again inside the [secret NAME] shown for a longer one.

A secret that can't be read is left out of what a command is given and
masked with, and logged, rather than failing every sandbox command of
every agent that may use the vault's secrets.

One name asked for from two vaults is refused: a command has one
variable of each name, and the second would quietly replace the first.

A secret's name is checked against the vault's others as it is written,
with the vault's other writes of secrets held off by a lock, so two at
once can't both take a name and leave neither usable.

Secret values are taken out of every tool's answer in one place, not in
each kind of tool, so a command on such a record can't answer with one.
Each member has a Memory, the notes all their agents share, kept as a
drive's files are, so every version stays and who wrote each is known.
Every thread is given "About you" whole and an index of the other notes
by their first lines; agents read the rest when needed (notes_get,
notes_list) and keep what they learn with memory_write and
memory_forget. With a memory, the vault holds the person's details
rather than being the agents' memory.

A member's Memory is made with their membership, as their vault, their
Chat and their drive are: it is one of MEMBER_CONNECTIONS, and
v077_make_memory_with_memberships makes it for the members there
before. The person reads the notes on its page, with each note's
history, what each version changed, and restore.
Base automatically changed from memory to main November 23, 2026 19:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant