Skip to main content
PATCH
JavaScript
What you can change on a memory layer after it exists: its name, its description, and its TTL. Not its type, and not at all if the system owns it.

System-managed layers are read-only

An episodic layer that Cadenya created for an agent has systemManaged: true. Every write to it is a 403, whether you target the name, the type, or its entries:
The agent owns that layer through store_memory. You read it in the cascade; you do not edit it.

The type is fixed

You cannot change a layer from SKILLS to EPISODIC or back. The update writes name, description, and TTL, and never touches the type.
A spec.type change returns 200 and does nothing. Send MEMORY_LAYER_TYPE_EPISODIC to a SKILLS layer and the response is a success with the type unchanged. Read the layer back if you need to be sure a change took, rather than trusting the status code.

The TTL follows the merge rules

expiresAt behaves like every other field on a PATCH: the update merges, so a field you leave out is kept, and a zero value needs updateMask to land.
To clear the TTL, name it in updateMask and send no value. Omitting it alone leaves it in place, because a merge cannot tell “clear this” from “did not mention it”:
Verified live: the masked call clears the timestamp; the unmasked one preserves it. A TTL on a SKILLS layer sets when its entries stop resolving. get_memory and search_memory both filter on expiry, so an expired layer’s entries read as absent even while the layer row remains.

Create a memory layer

Where the type is set, once and for good.

Update a variation

The same updateMask rule for zero values.

List memory layers

systemManaged, which decides whether you can edit at all.

Memory layers

Episodic versus authored, and 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"

id
string
required

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

Example:

"memlyr_01HXKD2E5NQM3T9AYWCFFFBMJH"

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
updateMask
string<field-mask>

Response

OK

MemoryLayer is a named container of memory entries that can be composed into an objective's memory cascade. Layers are workspace-scoped resources. The layer type controls how its entries participate in the agent loop — see MemoryLayerType for details.

See "Memory cascade composition" above for how layers compose at lookup time.

metadata
object
required

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

spec
object
required
info
object