Skip to main content

Update a memory

POST 

/api/v1/llm/update-memory

Updates a memory by ID. Full project/user ownership checks are not currently enforced for these by-ID operations. They are not a supported access boundary for an untrusted end-user client. See Memory for the current limits.

The following access conditions are preserved as declared intent and are not implemented by generated code: Authorized scoped domain action.

Use this in a guide: Use remembered preferences in a returning user’s conversation

Request​

Responses​

Memory updated

Schema-valid request illustration; replace example identifiers and confirm operation prerequisites.​

Section ID: DOC-MA-conversations-api-updateMemory#example-conversations-updateMemory-request

Request example

{
"memoryId": "example_123",
"text": "Example text"
}

Guide request for Step 3: Correct an outdated preference. Replace example resource identifiers with your own authorized values.​

Section ID: DOC-MA-conversations-api-updateMemory#example-cookbook-managed-agents-memory-knowledge-index-04-request

Request example

{
"memoryId": "mem_abc123",
"text": "User is vegetarian, avoids gluten, and prefers organic produce"
}

Illustrative response shape; omitted default fields and actual outcomes depend on the operation.​

Section ID: DOC-MA-conversations-api-updateMemory#example-conversations-updateMemory-response

Response example

{}

Document ID: DOC-MA-conversations-api-updateMemory. Section identities and revisions.

SectionStable reference
Update a memoryDOC-MA-conversations-api-updateMemory#overview
RequestDOC-MA-conversations-api-updateMemory#request
ResponsesDOC-MA-conversations-api-updateMemory#responses