v56

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01142337440.5 KB
AgentVariationService
Agent Variations

Update a variation's memory layer assignment

Updates the position of a memory layer assignment on a variation.

patch/v1/workspaces/{workspaceId}/agents/{agentId}/variations/{variationId}/memory_layer_assignments/{id}

Path parameters

workspaceIdstring required
Example:workspace_01HXKD2E5NQM3T9AYWCF133E3Q

Workspace ID.

agentIdstring required
Example:agent_01HXKD2E5NQM3T9AYWCFMGWT9Y

Agent ID. Accepts the canonical agent_… form or the external_id:<value> form.

variationIdstring required
Example:agentvar_01HXKD2E5NQM3T9AYWCF32BSPP

Variation ID. Accepts the canonical agentvar_… form or the external_id:<value> form.

idstring required
Example:avml_01HXKD2E5NQM3T9AYWCFX8AF59

Request body

workspaceIdstring

Workspace ID.

agentIdstring

Agent ID. Accepts the canonical agent_… form or the external_id:<value> form.

variationIdstring

Variation ID. Accepts the canonical agentvar_… form or the external_id:<value> form.

idstring
positioninteger

New position. Only field currently updatable on an assignment.

Example request

{
  "workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
  "agentId": "agent_01HXKD2E5NQM3T9AYWCFMGWT9Y",
  "variationId": "agentvar_01HXKD2E5NQM3T9AYWCF32BSPP",
  "id": "avml_01HXKD2E5NQM3T9AYWCFX8AF59"
}

Response

OK

idstring

Assignment row id — handle for removing the assignment. Distinct from the referenced memory layer's id.

positioninteger

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.

Example response

{
  "id": "avml_01HXKD2E5NQM3T9AYWCFX8AF59"
}