Skip to Content

Memory

Write a memory

Write one memory to a memory space and get its ID back.

POST/v1/dum/write

Writes 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>required

The memory space to write to.

contentstringrequired

The text to remember.

memory_typestringrequired

The 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 | null

The person this memory belongs to, up to 255 characters. See End users.

Response

idstring<uuid>required

The new memory's ID.

memory_space_idstring<uuid>required

The memory space it was written to.

memory_scopestringrequired

Who the memory belongs to. user for memories written with an API key.

memory_typestringrequired

The storage class you sent.

created_atstring<date-time>required

When the memory was stored.

Status codes

StatusMeaning
200The memory was stored.
401The key is missing, malformed, or revoked.
403The key's capability or scope doesn't allow writing to this memory space.
404The memory space doesn't exist in the key's workspace.
422A field is missing or invalid, such as an unknown memory_type.
429A memory write limit was hit.