Work
Chats
Conversations between a user and an assistant. Add a message, then process the chat to get the assistant's reply.
/chatsList chats
Returns the user's chats, most recent first.
Query parameters
Responses
activearchivedchatemailslackteamssmswhatsappimessagercsphonediscordtelegramtask_activityphoneemaillowmediumhighultralowmediumhighxhighmaxRequest
curl 'https://api.agnt.ai/chats' \
-H "Authorization: Bearer ak_live_..." \
-H "X-User-Email: [email protected]"Response
{
"ok": true,
"chats": [
{
"id": "6660c4a1f2e3b7d8a9c01234",
"status": "active"
}
],
"page": 1,
"perPage": 20
}/chatsCreate a chat
Creates a chat between the user and one of their assistants.
Request body
lowmediumhighultraResponses
activearchivedchatemailslackteamssmswhatsappimessagercsphonediscordtelegramtask_activityphoneemaillowmediumhighultralowmediumhighxhighmaxRequest
curl 'https://api.agnt.ai/chats' \
-X POST \
-H "Authorization: Bearer ak_live_..." \
-H "X-User-Email: [email protected]" \
-H "Content-Type: application/json" \
-d '{
"assistantId": "6702b1e8f9a0b1c2d3e4f5a6"
}'Response
{
"ok": true,
"chat": {
"id": "6660c4a1f2e3b7d8a9c01234",
"status": "active"
}
}/chats/{chatId}Retrieve a chat
Retrieves a chat's channel, user, assistant, participants and message count.
Path parameters
Responses
activearchivedchatemailslackteamssmswhatsappimessagercsphonediscordtelegramtask_activityphoneemaillowmediumhighultralowmediumhighxhighmaxRequest
curl 'https://api.agnt.ai/chats/<chatId>' \
-H "Authorization: Bearer ak_live_..." \
-H "X-User-Email: [email protected]"Response
{
"ok": true,
"chat": {
"id": "6660c4a1f2e3b7d8a9c01234",
"status": "active"
}
}/chats/{chatId}Delete a chat
Deletes a chat.
Path parameters
Responses
trueRequest
curl 'https://api.agnt.ai/chats/<chatId>' \
-X DELETE \
-H "Authorization: Bearer ak_live_..." \
-H "X-User-Email: [email protected]"Response
{
"ok": true,
"chat": {
"id": "6660c4a1f2e3b7d8a9c01234"
}
}/chats/{chatId}/messagesCreate a message
Adds a message to a chat without running the assistant. To get a reply, process the chat.
Path parameters
Request body
Responses
Request
curl 'https://api.agnt.ai/chats/<chatId>/messages' \
-X POST \
-H "Authorization: Bearer ak_live_..." \
-H "X-User-Email: [email protected]" \
-H "Content-Type: application/json" \
-d '{
"content": "Prefers morning meetings."
}'Response
{
"ok": true,
"message": {
"id": "6660c4a1f2e3b7d8a9c01234",
"role": "role",
"from": "from",
"to": [
"to"
]
}
}/chats/{chatId}/messagesList messages
Returns a chat's messages, paginated.
Path parameters
Query parameters
Responses
truestagedheldprovider_acceptedunknownRequest
curl 'https://api.agnt.ai/chats/<chatId>/messages' \
-H "Authorization: Bearer ak_live_..." \
-H "X-User-Email: [email protected]"Response
{
"ok": true,
"messages": [
{
"id": "6660c4a1f2e3b7d8a9c01234",
"role": "role",
"content": "Prefers morning meetings.",
"timestamp": "2026-10-15T14:30:00Z"
}
]
}/chats/{chatId}/processProcess a chat
Runs the assistant on the chat and streams the result as `text/event-stream`: `status_update` and `interim_message` events during the run, then a `message` event with the reply or an `error` event. The HTTP status is `200` even when an `error` event is sent. Events can arrive together when the run ends.
Path parameters
Request body
Responses
Request
curl 'https://api.agnt.ai/chats/<chatId>/process' \
-X POST \
-H "Authorization: Bearer ak_live_..." \
-H "X-User-Email: [email protected]" \
-H "Content-Type: application/json" \
-d '{
"message": {
"content": "What is still open on the Brightline renewal?"
}
}'/chats/{chatId}/usageRetrieve a chat's usage
Returns the tokens the chat used, per run and in total, and the credits charged for each run.
Path parameters
Responses
Request
curl 'https://api.agnt.ai/chats/<chatId>/usage' \
-H "Authorization: Bearer ak_live_..." \
-H "X-User-Email: [email protected]"Response
{
"total": {
"inputTokens": 1840,
"outputTokens": 1840,
"cacheReadTokens": 1840,
"cacheCreationTokens": 1840
},
"rows": [
{
"runId": "6660c4a1f2e3b7d8a9c01234",
"seq": 1,
"modelTier": "modeltier",
"inputTokens": 1840
}
],
"credits": {
"total": 42,
"runs": [
{
"chargedCredits": 5,
"isBillable": true,
"createdAt": "2026-10-15T14:30:00Z"
}
]
}
}