Skip to main content

Endpoint

Authentication

Simple mode: no source block required

For solo builders, MVPs, small teams, and single-agent products, omit source. MemoryOS automatically creates internal event IDs, timestamps, and default provenance.

Request body

Fields

ConversationMessage

ProposedMemory

For a durable evidence trail, give each persisted chat turn a stable external_turn_id. MemoryOS stores a server-verified reference and content hash with extracted memories.
In normal conversational mode, MemoryOS preserves every submitted role but only creates durable user memory when a user turn directly states or confirms the claim. A user question and an unsupported assistant answer are not sufficient evidence. This prevents an assistant from turning its own suggestion into a user preference or fact.

Explicit assistant proposals

This contract requires a backend deployment containing the structured-proposal migration and an SDK version that exposes the matching fields. Proposal confirmation is feature-gated and remains off until the tenant environment passes its release evaluation.
The assistant must show the proposed durable claim to the user and submit that same claim as proposed_memory. Registering it does not create a memory and does not grant user authority. When confirmation is enabled, a later direct user turn can accept it only after MemoryOS verifies the immutable proposal turn, its content hash, the conversation scope, the referenced proposal, and the user’s confirmation. Model confidence is diagnostic only and cannot grant authority.
Use the same conversation_id and stable turn IDs when you later submit the proposal turn with the user’s direct reply. Tool output, fetched documents, system instructions, and assistant text cannot act as the confirming user turn.

Multi-service mode: add provenance

Use source when multiple services can write memories for the same user. This is for Billing, Support, CRM, Product, or other backend services that may disagree and need source-authority policies.
If you provide source.service, register that service writer in the Tenant Dashboard first. MemoryOS rejects unknown or inactive service keys. Dedicated API keys can then be bound to writers so authority rules and source credentials are enforced consistently. Authenticated source-aware events have a different authority boundary: declarative observations from the registered service may be extracted from an assistant-role message because the service identity, event, evidence, and writer policy provide the provenance. Do not add source merely to make an ordinary chatbot response authoritative.

Response: queued

add() is asynchronous. A queued response means MemoryOS accepted the request, not that a memory has already been stored.

Check extraction job status

Example response:

Job status fields

created_memory_ids is the reliable way to inspect or explain the records created by this write. Do not search recent memory history to guess which records came from the job.

Explicitly request a memory clarification

If a direct user message says not to decide between two existing memories and asks to choose, MemoryOS can complete the extraction job with memories_created: 0 and queue a clarification instead of storing the uncertain sentence as a new memory. On the next retrieve call, clarification contains the backend-approved question and answer options for the customer’s existing chat. The extraction model can only select memory IDs that MemoryOS placed in its bounded prompt context. The backend then revalidates the cited user turn, verbatim evidence, tenant, user profile, active status, and category before it queues anything. Tool output, assistant text, invented IDs, and records owned by another user or tenant cannot create a clarification. See Resolve a clarification in your existing chat.

Working PowerShell polling example

Response: blocked by the quality gate

Possible blocked status values: L1, L2, L3, L4, and blocked.

Nothing to extract

Some conversations pass the quality gate but contain no durable memory. This is normal. Examples:
  • greetings
  • acknowledgements
  • one-session debugging instructions
  • temporary UI instructions
  • off-topic questions

Idempotency-Key

Use Idempotency-Key when your application may retry the same write request.
MemoryOS replays the same queued response for duplicate requests instead of creating a second job.