Memory

Store one fact so the agent can recall it later by meaning. The text is embedded on write; retrieval is semantic, not keyword.

Scope goes in the body here. Pass scope plus the matching contactId / conversationId. Omit it for the project scope. Every read endpoint takes the scope as a ?scope= query parameter instead — see the scope parameter on GET /v1/memory.

One fact per call. A paragraph carrying five unrelated facts is embedded as an average of all five and retrieved well by none of them.

post/v1/memory

Request

  • Base URL
    https://api.zavu.dev
  • URL
    https://api.zavu.dev/v1/memory
  • Auth
    HTTP bearer

Request body

textstring required

What to remember. Max 8,192 bytes of UTF-8. Write one fact per call: a paragraph holding five unrelated facts embeds as an average of all five and is retrieved well by none of them.

scope'project' | 'contact' | 'conversation'

Which namespace a memory belongs to. Scopes are isolated: a search in one never returns a memory from another.

  • project: shared by the whole project. What the agent knows in general.
  • contact: what the agent knows about one person, across every conversation with them.
  • conversation: what the agent knows about one inbox thread.

Defaults to project everywhere. contact and conversation require the matching id.

contactIdstring

Required when scope is contact.

conversationIdstring

Required when scope is conversation.

metadataobject

Arbitrary string tags stored alongside the fact and returned with it. Keys max 64 chars, values max 512, whole object max 2,048 bytes. Not searchable — search matches text only.

ttlSecondsinteger

Delete the fact after this many seconds. 60 to 63,072,000 (2 years). Omit to keep it until deleted.

Example request

{
  "text": "Prefers to be contacted in the morning, and by WhatsApp rather than email."
}

Response

Fact stored.

Example response

{
  "memory": {
    "id": "m7x2k3m4n5p6q7r8s9t0"
  }
}

Changes