Doc: Update doc for both user and agent (#2313)

This commit is contained in:
Dev Khant
2025-03-05 17:05:28 +05:30
committed by GitHub
parent 329d0cc945
commit 728ef98d6e

View File

@@ -353,11 +353,10 @@ curl -X POST "https://api.mem0.ai/v1/memories/" \
</Note> </Note>
#### Long-term memory for both users and agents #### Long-term memory for both users and agents
When you provide both `user_id` and `agent_id`, Mem0 will store memories separately for each: When you provide both `user_id` and `agent_id`, Mem0 will store memories with both identifiers attached:
- User messages are stored under the specified `user_id` - Each memory will be tagged with both the specified `user_id` and `agent_id`
- Assistant messages are stored under the specified `agent_id` - During retrieval, you'll need to provide both IDs to access the memories
- This enables tracking the full context of conversations between specific users and agents
This allows both the user and agent to maintain their own consistent memory across sessions.
<CodeGroup> <CodeGroup>