Skip to main content
PATCH
JavaScript
Change a memory entry in place: rewrite its content, refine its description, or re-key it.

The key is mutable

The key is not a fixed identity, it is a field you can change like any other:
Re-keying matters because the key is how an agent loads the entry through get_memory and how the cascade resolves it. Change the key and any prompt or code that referenced the old one stops finding it. The entry keeps its mementry_... id across a re-key; only the lookup handle moves.

It merges

Send only what you are changing, and the rest survives. A content-only update leaves key and description intact, verified: patch only content and the entry keeps its key and description. One consequence of the merge: setting an optional field like description to an empty string reads as “no change”, not “clear it”, so the old value stays. Send the value you want rather than relying on an empty string to blank a field.

Create a memory entry

The key, description, and content fields you edit here.

Get a memory entry

Read back the content after an edit.

Memory layers

How the agent resolves a key through the cascade.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceId
string
required
Example:

"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"

memoryLayerId
string
required

Memory layer ID. Accepts canonical memlyr_… form or external_id: form.

Example:

"memlyr_01HXKD2E5NQM3T9AYWCFFFBMJH"

id
string
required
Example:

"mementry_01HXKD2E5NQM3T9AYWCF5E52Z0"

Body

application/json
metadata
object

UpdateResourceMetadata contains the user-provided fields for updating a workspace-scoped resource. Read-only fields (id, account_id, workspace_id, profile_id, created_at) are excluded since they are set by the server.

spec
object

MemoryEntryUpdateSpec is the input shape for UpdateMemoryEntry. Fields present in the request's update_mask are applied; unset fields are left alone. The source oneof is optional for updates — omit it to leave the body untouched, or set exactly one branch to replace it.

updateMask
string<field-mask>

Response

OK

MemoryEntryDetail is the full representation of an entry, including the resolved content body. Returned by GetMemoryEntry, CreateMemoryEntry, and UpdateMemoryEntry.

metadata
object
required

Standard metadata for persistent, named resources (e.g., agents, tools, prompts)

spec
object
required

MemoryEntrySpec is the metadata portion of an entry — the fields that identify and describe it, without the body. It appears on both the summary (MemoryEntry) and detail (MemoryEntryDetail) views.

content
string
required

The resolved body of the entry. For entries created or updated via an upload_id, this is the ingested content, not the original upload handle. May be empty; an entry with only a key and description is valid (e.g., a stub skill being drafted, or an entry where the frontmatter alone is the payload).

info
object