A session remembers a conversation. Memory remembers across conversations: a preference, a correction that keeps coming up, a fact that will not change. The agent writes one when it learns something durable — not after every exchange.
The methods
| Method | Does |
|---|---|
| list({ limit }) | Every note on the account, most recently changed first. |
| save({ name, content, … }) | Creates or replaces a note. The name decides which. |
| delete(name) | Removes one. Answers whether there was anything to remove. |
A note
{
id: "…",
name: "tone-of-voice",
description: "How this user wants to be written to",
content: "Prefers short, direct answers in French. No bullet lists unless asked.",
type: "preference",
source: "user",
createdAt: "2026-09-30T18:02:11.000Z",
updatedAt: "2026-10-07T11:02:08.400Z"
}{
"id": "…",
"name": "tone-of-voice",
"description": "How this user wants to be written to",
"content": "Prefers short, direct answers in French. No bullet lists unless asked.",
"type": "preference",
"source": "user",
"createdAt": "2026-09-30T18:02:11.000Z",
"updatedAt": "2026-10-07T11:02:08.400Z",
}Only the index is carried, not the content
The system prompt receives one line per note — its name and its description. The content is opened only when it is needed. That is what makes two hundred notes affordable: you pay for the index on every answer, and for a note's text only when it is read.
It is the only thing the agent sees when choosing. « Notes » tells it nothing; « How this user wants to be written to » tells it exactly when to look.
The limits, and why they are low
| Limit | Value |
|---|---|
| Notes per account | 200 |
| Content | 4 000 characters, trimmed past it |
| Description | 200 characters |
| Name | 64 characters, lowercase, digits and hyphens |
These are not storage limits, they are design limits. Memory that grows without bound stops being memory: the index gets expensive, and the agent cannot tell what matters. Documents belong in a storage; project instructions belong in a file in the workspace.
What belongs here, and what does not
| Belongs | Does not |
|---|---|
| « Answers in French, short. » | A transcript of a conversation. |
| « Deploys on Friday are refused. » | A document, or an extract of one. |
| « Always calls the production database prod-eu. » | Anything that changes every day. |
| « Corrected twice: the invoice total includes tax. » | A secret, a key, a password. |
A note is read back into a model's context by design, and shown to the user in plain text. Keys belong in your secret store, and nowhere a model will read them.
They belong to the account, and they are visible
Notes are not per-session and not per-device: one set, readable and editable by the user. source says who wrote each one — agent when it learned it, user when a person did.
const notes = await api.memory.list();
const learned = notes.filter((n) => n.source === "agent");
// What the agent has decided to remember about this account.
// Showing it to the user is the honest default: it is about them.notes = api.memory.list()
learned = [n for n in notes if n["source"] == "agent"]
# What the agent has decided to remember about this account.
# Showing it to the user is the honest default: it is about them.