cURL
Core Memory Operations
Add Memories
Add facts, messages, or metadata to a user memory store with async processing and event tracking via the V3 additive pipeline.
POST
cURL
Extract and store memories from a conversation using the V3 additive pipeline. The endpoint uses single-pass ADD-only extraction — one LLM call, no UPDATE/DELETE. Memories accumulate over time; nothing is overwritten.Documentation Index
Fetch the complete documentation index at: https://docs.mem0.ai/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
- Method:
POST - URL:
/v3/memories/add/ - Content-Type:
application/json
event_id you can poll via GET /v1/event/{event_id}/.
Required headers
| Header | Required | Description |
|---|---|---|
Authorization: Token <MEM0_API_KEY> | Yes | API key scoped to your workspace. |
Accept: application/json | Yes | Ensures a JSON response. |
Request body
Provide conversation messages for Mem0 to extract memories from. At least one entity ID (user_id, agent_id, app_id, or run_id) is required so the memory is scoped to a session. Entity IDs are accepted at the top level.
Common fields
| Field | Type | Required | Description |
|---|---|---|---|
messages | array | Yes | Conversation turns for Mem0 to extract memories from. Each object should include role and content. |
user_id | string | No* | Associates the memory with a user. |
agent_id | string | No* | Associates the memory with an agent. |
run_id | string | No* | Associates the memory with a run. |
app_id | string | No* | Associates the memory with an app. |
metadata | object | Optional | Custom key/value metadata (e.g., {"topic": "preferences"}). |
infer | boolean (default true) | Optional | Set to false to skip inference and store the provided text as-is. |
* At least one entity ID (user_id,agent_id,app_id, orrun_id) is required.
Response
The request is queued for background processing. The response contains anevent_id for tracking status.
Poll the event status via
GET /v1/event/{event_id}/. Status will be SUCCEEDED or FAILED once processing completes.Body
application/json
Conversation messages to extract memories from.
Scope memories to this user.
Scope memories to this agent.
Scope memories to this session / run.
User-supplied metadata to attach to each extracted memory.
Project-level instructions that guide extraction for this call.
When false, stores each message verbatim without running the extraction LLM.