Skip to content

Update Work Agent

PATCH
/work/agents/{agent_id}

Replace one agent’s profile, versioned.

expected_version is the version you read; a stale one is a 409 so two editors cannot silently overwrite each other’s instructions.

Authorizations

Parameters

Path Parameters

agent_id
required

Agent id

string format: uuid

Agent id

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

A versioned profile edit. Mirrors work.agent_profile_router.AgentProfileEdit.

object
expected_version
required

The version you read; a stale one is a 409

integer
>= 1
profile
required

The full new profile

object
avatar

Avatar glyph

string
default: spark
Allowed values: spark compass chart code pen search shield bolt
description
required

The agent’s instructions

string
>= 1 characters <= 20000 characters
name
required

Agent name

string
>= 1 characters <= 100 characters
role

Role shown beside the name

string
default: Assistant >= 1 characters <= 100 characters
visibility

private to its owner, or shared with the organization

string
default: private
Allowed values: private organization

Responses

200

Successful Response

object
data
required

One Work agent profile as the caller may see it.

object
agent_id
Any of:
string
avatar
Any of:
string
can_edit
Any of:
boolean
description
Any of:
string
name
Any of:
string
owner_id
Any of:
string
role
Any of:
string
updated_at
Any of:
string
version
Any of:
integer
visibility
Any of:
string
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string