Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.maximem.ai/llms.txt

Use this file to discover all available pages before exploring further.

await sdk.memories.update(memory_id, document, ...)
Update an existing memory. The update behavior depends on the merge strategy — you can fully replace, append to, or smart-merge the existing content.

Parameters

memory_id
UUID
required
The memory ID to update.
document
string
required
Updated memory content. Behavior depends on merge_strategy.
merge_strategy
string
How the update should be applied. Defaults to smart-merge.
ValueDescription
replaceFully replace the existing memory content with the new content.
appendAppend the new content to the existing memory, preserving the original.
smart-mergeIntelligently merge new information with existing content, deduplicating and resolving conflicts by preferring the newer version.
document_type
string
Optional new document type to associate with the memory.
metadata
object
Optional updated metadata. Merged with existing metadata.

Returns

The updated Memory object — same shape as the response from memories.get.

Example

from maximem_synap import MaximemSynapSDK
from uuid import UUID

sdk = MaximemSynapSDK(api_key="synap_your_key_here")
await sdk.initialize()

updated = await sdk.memories.update(
    memory_id=UUID("a1b2c3d4-e5f6-7890-abcd-ef0123456789"),
    document="Prefers light roast coffee, especially pour-over. Also enjoys cold brew in summer.",
    merge_strategy="smart-merge",
    metadata={"source": "web-chat"},
)
print(updated.content)
print(updated.updated_at)

Raises

  • SynapAuthError — when the API key is missing or invalid.
  • SynapNotFoundError — when the memory_id does not exist or is outside the caller’s scope.
  • SynapValidationError — when merge_strategy or document_type is not a recognized value.

See also