Update a variation
Change a prompt, a model, a threshold. The update merges, which means a zero value needs updateMask.
configSnapshot at creation. Only new objectives see the change.
The update merges, deeply
Send one field and the rest survive. That holds inside nested messages too: patchmodelConfig.temperature alone and modelConfig.modelId stays put.
spec: {} changes nothing and returns 200.
A zero value is invisible without updateMask
Here is the trap. 0, "", and false are proto zero values, indistinguishable from “not sent.” A merge skips them, so the field keeps its old value and you get a 200 saying nothing happened.
updateMask fixes it. Name the paths you mean, and their values become authoritative, zero or not.
temperature moves 0.5 → 0, and description clears to '', only with the mask. Both forms work, in the body or as a query parameter (?updateMask=spec.description).
A masked update touches only the masked paths. Everything else is left alone, including fields you happened to include in the body. Comma-separate several: updateMask: 'spec.description,spec.modelConfig.temperature'.
Guards that hold
A model that does not exist is a404, resolved through the external_id: form the same as everywhere else:
400 on spec.model_id, and disabling a model that any variation references is itself a 400. The two guards hold each other up, so a running objective never finds its model pulled out from under it.
What you cannot change here
Assignments and memory layers are not part of the spec. They have their own routes:- Add an assignment for tools, tool sets, and sub-agents
addMemoryLayerfor memory, becausepositionorders the cascade
score and feedbackCount are read-only. They come from feedback and drive weighted selection.
Related
Create a variation
Publish an agent
List models
modelId accepts, and what maxInputTokens does to compaction.Add an assignment
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
Update agent variation request
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.
AgentVariationSpec defines the operational configuration for a variation
Fields to update