Skip to main content
POST

Authorizations

Authorization
string
header
required

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

Path Parameters

workspaceId
string
required

Workspace ID.

Example:

"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"

agentId
string
required

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

Example:

"agent_01HXKD2E5NQM3T9AYWCFMGWT9Y"

variationId
string
required

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

Example:

"agentvar_01HXKD2E5NQM3T9AYWCF32BSPP"

Body

application/json

Attach a memory layer to a variation. Use UpdateAgentVariationMemoryLayer or replace the spec list to reposition an existing layer. Rejected when:

  • the layer is already assigned, regardless of position (AlreadyExists)
  • the layer is system-managed (FailedPrecondition)
  • the variation is already at the 10-assignment cap (FailedPrecondition)
  • the position is already in use on this variation (InvalidArgument)
memoryLayerId
string
required

Layer to attach. Accepts the canonical memlyr_… form or the external_id:<value> form.

Minimum string length: 1
Example:

"memlyr_01HXKD2E5NQM3T9AYWCFFFBMJH"

position
integer<int32>

Position in the baseline cascade (lower = more specific). If omitted, the server appends at the most general end (max existing position + 1).

Response

OK

AgentVariation resource

metadata
object
required

Resource metadata

spec
object
required

Variation specification

info
object
required

Read-only summary information