GET /memory/history/
Retrieve the complete change history for a specific memory. This endpoint provides a changelog of all modifications made to the memory over time, useful for tracking how memories evolve.Path Parameters
The unique identifier of the memory whose history you want to retrieve.
Response
Indicates whether the request was successful.
Array of history entries showing all changes to the memory.
Example Request
Example Response
Use Cases
Audit Trail
Track how user preferences and facts change over time for debugging or compliance.
Memory Evolution
Understand how AI’s understanding of user preferences has evolved through interactions.
Rollback Support
View previous versions to potentially restore earlier memory states.
Quality Control
Review memory updates to ensure AI is correctly refining its understanding.
Understanding Memory Versioning
Mem0 maintains a complete history of all changes to memories:- ADD events: Initial memory creation
- UPDATE events: Modifications to existing memories (typically refinements or corrections)
- DELETE events: Soft deletes (memory marked as deleted but history preserved)
Memory history is useful for understanding how the system learns from user interactions. Each update typically represents the AI refining its understanding based on new context.
backend/main.py:356-365
Related Endpoints
- Get Memory - Retrieve the current state of a memory
- Update Memory - Modify an existing memory
- Get All Memories - Retrieve all memories for a user