Notes
Notes are user-authored memories. They live in the same agent_memories table as every other memory entry, tagged with the literal string 'note'. The first line of the text is treated as the title, the rest as the body. The Brain UI surfaces notes as their own list with edit, AI-edit, delete, and share actions.
Overview
- Table
agent_memories- Selector
tags @> '{note}'- Endpoint
/api/brain/notes- Tool
brain_manage_notesinchat-tools.ts- Title rule
- First line of text becomes the title in the UI
- Share path
- Sharable as a public viewer at /s/[slug] with the note resource type
Notes are the place a user puts free-form context they want the model to remember. A market positioning brief, a list of personas, a research summary, a contract template. The platform does not enforce a structure; the user types whatever the model needs to ground on.
Under the hood there is no separate notes table. A note is an agent_memories row with the note tag and a user-facing title rule. Every retrieval path that already reads memories surfaces notes without extra work. Conversely, anything a skill writes can be promoted to a note by toggling the tag.
Data model
The same schema as a memory, with one tag carving notes out.
agent field holds the writer's identity. For user-authored notes it is user. For notes generated by a skill that wants to surface itself in the Brain UI, the skill writes its own id and adds the note tag.API endpoints
One route handles every CRUD action with a discriminated action field.
| Method | Action | Effect |
|---|---|---|
| GET | list | Returns notes ordered by created_at desc |
| POST | create | Inserts a new note. Re-embeds the text. Returns the row. |
| POST | read | Returns the full text of one note by id |
| POST | update | Updates title and/or body. Re-embeds on text change. |
| POST | ai_edit | Sends the current text plus an instruction to Haiku, replaces text with the response, re-embeds |
| DELETE | delete | Removes the row |
Notes UI
The Brain page renders notes as a sortable, searchable list.
The Brain page at /dashboard/brain shows notes in a list ordered by most recent. Each row shows the title (first line of text), a one-line snippet (next characters), and the timestamp. Clicking opens a side panel with the full body and the edit affordances. The list updates optimistically on edit and delete.
Search inside the Brain UI runs over note titles and bodies. Behind the search input is a debounced server fetch that filters by case-insensitive substring; semantic search is one click away through the global Ask box.
AI edit
A small Haiku call that rewrites a note in place.
Search and retrieval
Notes participate in every memory retrieval path.
Because notes live in agent_memories, every retrieval call already sees them. recallMemories includes them in the manifest the judge reads. searchMemories includes them in the cosine result set. The chat handler's context builder pulls them into the system prompt block alongside other memories.
A skill that wants to read only notes filters by tags @> '{note}' on its query. A skill that wants to write a note instead of a generic memory adds the same tag at write time. Promoting a memory to a note is a tag update.
File map
Glossary
- Note
- An agent_memories row tagged with 'note'. User-facing, editable, surfaced as a card in the Brain UI.
- Title rule
- The convention that the first line of text is treated as the title and the rest as the body. Enforced by the API response shape.
- AI edit
- A Haiku call that rewrites the note text against a short instruction and re-embeds the result.
- Promotion
- Turning a regular memory into a note by adding the 'note' tag, or demoting back by removing it.
- Brain page
- The /dashboard/brain route that lists notes and uploaded files alongside the global Ask box.