Skip to main content
POST

Request body

string
required
1 to 255 characters. Agents’ memory.namespace setting has a tighter limit of 127 characters, so use at most 127 for notes an agent should access.
string
required
1 to 1024 characters. Slash paths such as preferences/report-format are useful for grouping notes.
string
required
Note text, at most 65,536 UTF-8 bytes.
integer | null
Minutes after this write before the note expires, from 1 to 2147483647. Omit it, or pass null, to keep the note until explicit deletion. Your privacy retention setting does not apply. Every write restarts the window and chooses the retention again, including an update that omits this field.

Response

201 for a new note, 200 for a replacement. Both return the memory object.

Errors

422 for invalid input. See common errors.