Skip to main content

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

string
required
UUID of the memory to update. Must be a valid memory ID from a previous save_memory or get_memories call.
string
required
New content for the memory. This replaces the existing content entirely.

Response

boolean
Whether the operation succeeded
object
The updated memory object with new content and updated timestamp
string
Success message confirming the update

Example Request

Example Response

Behavior

  • Content is trimmed of leading/trailing whitespace before updating
  • The updated_at timestamp 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

  1. Verify ownership first: Use get_memories to find memories you can update
  2. Preserve context: When updating, include the original information plus new details
  3. Update promptly: Update memories when information changes
  4. Don’t duplicate: Update existing memories rather than creating duplicates