Skip to content

Create Work Agent

POST
/work/agents

Create one Work agent and its conversation.

visibility: "organization" needs the share permission (see GET /work/agents/policy); 403 otherwise. Creating does not run it.

Authorizations

Parameters

Header Parameters

Idempotency-Key
Any of:
string format: uuid

Retry-safety key (a UUID). Replaying one returns the ORIGINAL agent instead of creating a second. Omit it and the server mints one, so a retried request creates again.

X-Target-Org-Id
Any of:
string

Request Body required

A Work agent’s profile. Mirrors work.agent_profiles.AgentProfileInput.

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

201

Successful Response

object
data
required

A newly created Work agent and its first conversation.

object
agent_id
Any of:
string
session_id
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