Pular para o conteúdo

GET /v1/agents/{id}/test-runs/latest

GET
/v1/agents/{id}/test-runs/latest
curl --request GET \
--url https://seu-endereco-da-api/v1/agents/example/test-runs/latest \
--header 'Authorization: Bearer <token>'

Permissão que a Chave de acesso precisa: Ler agentes de IA (agents:read).

id
required
string
Media typeapplication/json
object
latest
required

The most recent run of the set; null before the first one

object
id
required
string format: uuid
status
required
string
Allowed values: running done interrupted
totalCases
required
number
pendingCases
required
number
estimatedMaxCents
required

Most the run can cost, in cents of real; the run only starts when the AI credit covers it

number
createdAt
required
string format: date-time
finishedAt
required
string format: date-time
nullable
startedTransferring
required

Turns the agent now hands off to a person and did not in the run compared

number
stoppedTransferring
required

Turns the agent no longer hands off to a person and did in the run compared

number
newCases
required

Cases answered in this run that the run compared did not have

number
comparedWith
required

The last finished run before this one; interrupted runs are never compared against

object
id
required
string format: uuid
createdAt
required
string format: date-time
cases
required
Array<object>
object
conversationId
required
string format: uuid
contactName
required
string
nullable
status
required
string
Allowed values: pending done interrupted failed
turns
required
Array<object>
object
messageId
required

The customer message of the original conversation this turn answers

string format: uuid
customer
required

What the customer wrote; null when the message was deleted or sits in a department the viewer cannot see

string
nullable
reply
required
string
transferred
required
boolean
previous
required

The same turn in the run compared against; null when there is none

object
reply
required
string
transferred
required
boolean
changed
required

The agent handed off to a person in one run and not in the other; a reply in other words alone never counts

boolean
isNew
required

Answered in this run but absent from the run compared, so there is nothing to compare it with

boolean

Example

{
"latest": {
"status": "running",
"cases": [
{
"status": "pending"
}
]
}
}