v56

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01142337440.5 KB
AgentService
Agents

Update an agent

Updates an agent in the workspace

patch/v1/workspaces/{workspaceId}/agents/{id}

Path parameters

workspaceIdstring required
Example:workspace_01HXKD2E5NQM3T9AYWCF133E3Q

Workspace ID.

idstring required
Example:agent_01HXKD2E5NQM3T9AYWCFMGWT9Y

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

Request body

workspaceIdstring

Workspace ID.

idstring

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

updateMaskstring field-mask

Fields to update

Example request

{
  "workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
  "id": "agent_01HXKD2E5NQM3T9AYWCFMGWT9Y"
}

Response

OK

state'STATE_UNSPECIFIED' | 'STATE_DRAFT' | 'STATE_PUBLISHED' | 'STATE_ARCHIVED' enum required

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.

Example response

{
  "metadata": {
    "accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
    "workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
    "profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
  },
  "info": {
    "createdBy": {
      "metadata": {
        "accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
        "profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
      }
    }
  }
}