update_memory
Update the content of an existing memory. You can only update memories that were created using the same API key.Use Cases
- Correct inaccurate information
- Add additional context to existing memories
- Update preferences that have changed
- Refine memory content for clarity
Parameters
UUID of the memory to update. Must be a valid memory ID from a previous
save_memory or get_memories call.Response
Example Request
Example Response
Behavior
- Content is trimmed of leading/trailing whitespace before updating
- The
updated_attimestamp is automatically set to the current time - The embedding in ChromaDB is updated in the background
- Only memories created by the same API key can be updated
Error Handling
Ownership
Memories are tied to the API key that created them. This ensures:- Security: API keys can only modify their own memories
- Accountability: You can track which API key created each memory
- Isolation: Different API keys don’t interfere with each other’s memories
Best Practices
- Verify ownership first: Use
get_memoriesto find memories you can update - Preserve context: When updating, include the original information plus new details
- Update promptly: Update memories when information changes
- Don’t duplicate: Update existing memories rather than creating duplicates
