Skip to content

Post Agent Chat

POST
/agent/chat

Say something to the agent and get its answer.

kind in the answer says which way the turn went: chat is a reply in message; work_item means the agent read the message as a job and STARTED it - work_item_id is the work item, and whether its workflow actually launched is in workflow_started.

Each turn runs a model and is charged. Omit session_id to start a new session.

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Mirror of agent_runtime.interfaces.routers.chat_router.ChatRequest.

object
attachment_ids

Uploaded file ids to attach, each at most once.

Array<string>
<= 20 items
client_turn_id
Any of:
string format: uuid
mentions
Any of:
Array<object>
object
key
additional properties
any
message

What you say to the agent. Required unless you attach a file.

string
"" <= 10000 characters
mode
Any of:
string
page
Any of:
string
session_id
Any of:
string format: uuid
subject_account_id
Any of:
string
subject_campaign_id
Any of:
string

Responses

200

Successful Response

object
data
required

An open envelope for the app’s answer.

Open because the chat answer (kind, message, chips, sources, work_item_id, …) and the oversight feed (approvals, blockers, autonomous_fixes, states, bounds) are both still growing, and a dropped field on an agent surface is one the caller does not know they lost.

object
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