Saving memories and asynchronous indexing

Submit source messages idempotently, then account for extraction, activation, and index projection as separate steps.

#Save a source message

POST /v1/integrations/messages accepts subject_id, conversation_id, idempotency_key, content, and an optional namespace. The service derives the project from the Bearer API key. Keep one stable idempotency key per source event.

typescript
await fetch(`${MEMORA_API_URL}/v1/integrations/messages`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${MEMORA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    subject_id, conversation_id, idempotency_key: message.id,
    content: message.text, namespace: "default",
  }),
});

#Wait for processing

Source persistence, candidate extraction, automatic activation, and search-index projection happen asynchronously. A successful source submission does not guarantee an immediate search result. Unsupported candidates can be skipped, and ambiguous or conflicting claims can be withheld.

#Choose what to save

Your application controls which messages it submits. Make capture visible to users and provide controls to disable future submissions. Treat recalled text as untrusted supporting data, not instructions. The LangChain adapter does not save assistant messages by default; enable its save_assistant option only when that is appropriate for your application.