Attach a memory layer to a variation
Attaches a memory layer to a variation at a given position in the variation’s baseline memory cascade.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Workspace ID.
"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"
Agent ID. Accepts the canonical agent_… form or the external_id:<value> form.
"agent_01HXKD2E5NQM3T9AYWCFMGWT9Y"
Variation ID. Accepts the canonical agentvar_… form or the external_id:<value> form.
"agentvar_01HXKD2E5NQM3T9AYWCF32BSPP"
Body
Attach a memory layer to a variation. The request is rejected when:
- the layer is system-managed (FailedPrecondition)
- the layer is already assigned to this variation (AlreadyExists)
- the variation is already at the 10-assignment cap (FailedPrecondition)
- the position is already in use on this variation (InvalidArgument)
Layer to attach. Accepts the canonical memlyr_… form or the external_id:<value> form.
"memlyr_01HXKD2E5NQM3T9AYWCFFFBMJH"
Position in the baseline cascade (lower = more specific). If omitted, the server appends at the most general end (max existing position + 1).
Response
OK
VariationMemoryLayerAssignment attaches a single MemoryLayer to a variation at a given position in the variation's baseline memory cascade. A variation has at most one assignment per memory_layer_id.
Variations only support whole-layer attachments — entry pinning is an objective-level capability.
Assignment row id — handle for removing the assignment. Distinct from the referenced memory layer's id.
"avml_01HXKD2E5NQM3T9AYWCFX8AF59"
The attached memory layer.
Position in the variation's baseline cascade. Position is specificity, CSS-style: a LOWER position is more specific and is consulted first; the highest-position assignment is the most general fallback. Gaps are fine — only relative position matters. Positions must be unique within a variation; a request that would collide with an existing assignment's position is rejected with InvalidArgument.