Update an agent
Change the agent shell: name, selection mode, episodic memory, output schema. A published agent stays published.
Editing a published agent keeps it published
An edit does not knock the agent back to draft. Change its name or mode while it isSTATE_PUBLISHED and it stays published, with the change live on the next objective. There is no republish step, the same as editing a variation.
What you can change
variationSelectionMode flips freely, so you can move an agent from equal-odds RANDOM to Thompson-sampled WEIGHTED once its variations have earned enough feedback to rank.
The merge keeps what you leave out, except zero values
Like everyPATCH here, the update merges: send metadata.name alone and the mode, memory flag, and output schema all survive.
The one snag is turning a boolean off. enableEpisodicMemory: false is a proto zero value, indistinguishable from “not sent,” so a plain merge ignores it and the flag stays on:
true is not the zero value. Only the off direction needs the mask. Same rule as temperature: 0 on a variation.
Related
Update a variation
Publish an agent
Create an agent
List variations
score that WEIGHTED mode samples from.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"
Body
Update agent 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.
Agent specification (user-provided configuration)
Fields to update
Response
OK
Agent resource
Resource metadata
Agent specification
The current lifecycle state of the agent. Output only. Agents are created in STATE_DRAFT; use the :publish, :unpublish, :archive, and :unarchive actions to transition between states.
STATE_UNSPECIFIED, STATE_DRAFT, STATE_PUBLISHED, STATE_ARCHIVED Agent information