Memory
Write a memory
Write one memory to a memory space and get its ID back.
POST
/v1/dum/writeWrites a single memory and returns once it's stored. Use it when you need the new memory's ID straight away. For everything else, ingest batches writes and is what Dock uses.
Body
memory_space_idstring<uuid>requiredThe memory space to write to.
contentstringrequiredThe text to remember.
memory_typestringrequiredThe storage class: entity, episodic, document, system, or derived. Use entity for facts about people and things your app tracks. See Memory types.
metadata_jsonobjectdefault: {}Your own key and value pairs.
end_userstring | nullThe person this memory belongs to, up to 255 characters. See End users.
Response
idstring<uuid>requiredThe new memory's ID.
memory_space_idstring<uuid>requiredThe memory space it was written to.
memory_scopestringrequiredWho the memory belongs to. user for memories written with an API key.
memory_typestringrequiredThe storage class you sent.
created_atstring<date-time>requiredWhen the memory was stored.
Status codes
| Status | Meaning |
|---|---|
200 | The memory was stored. |
401 | The key is missing, malformed, or revoked. |
403 | The key's capability or scope doesn't allow writing to this memory space. |
404 | The memory space doesn't exist in the key's workspace. |
422 | A field is missing or invalid, such as an unknown memory_type. |
429 | A memory write limit was hit. |