Get a trial
SDK platic.agents.evals.runs.trial()
Open a trial conversation to understand why it passed or failed. Take launchId, runId and trialId from the launch, and read events in seq order. Events include messages, tool calls and results, agent changes and help requests.
Example
curl "https://api.platic.ai/v1/agents/$AGENT_ID/evals/runs/$LAUNCH_ID/trials/$RUN_ID/$TRIAL_ID" \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.agents.evals.runs.trial("agent_123", "launch_123", "run_123", "trial_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Agent ID | ✓ |
launchId | string | The launch | ✓ |
runId | string | The run, which must belong to that launch | ✓ |
trialId | string | The trial | ✓ |
The three IDs come in Get a launch.
Response
The trial fields, plus events:
{
"status": "success",
"data": {
"runId": "run_a1f3",
"trialId": "trial_4",
"scenarioId": "asks_for_person",
"scenarioVersion": 1,
"status": "passed",
"currentTurn": 1,
"endReason": "assistance_requested",
"assistanceAvailable": true,
"note": "Conversation ended (assistance_requested) after 1 turns.",
"explanation": "All required checks passed.",
"verdicts": [
{ "check": "assistance_requested:true", "severity": "must", "passed": true, "reason": "The agent asked a person for help.", "eventIds": ["ev_03"] }
],
"events": [
{ "eventId": "ev_01", "seq": 0, "turn": 1, "type": "message", "role": "user", "text": "I need to talk to someone from your team, please" },
{
"eventId": "ev_02",
"seq": 1,
"turn": 1,
"type": "tool_call",
"name": "call_for_help",
"args": { "query": "Wants to talk to a person", "context": "They asked in their first message." },
"result": null,
"error": null,
"round": 0,
"callIndex": 0
},
{
"eventId": "ev_03",
"seq": 2,
"turn": 1,
"type": "assistance_request",
"source": "agent",
"reason": "Wants to talk to a person. They asked in their first message.",
"waitingMessage": "I'm connecting you with someone from our team. They'll be with you shortly."
},
{ "eventId": "ev_04", "seq": 3, "turn": 1, "type": "message", "role": "agent", "text": "I'm connecting you with someone from our team. They'll be with you shortly." }
]
}
} Response fields
The trial fields are those of Get a launch. Each event in events has eventId, seq, turn and type, plus the fields of its type:
type | Fields | What it is |
|---|---|---|
message | role (user or agent), text | A message from the simulated customer or from the agent. |
tool_call | name, args, result, error, round, callIndex | A call to one of the agent's real tools. error has the error if it failed. round is the agent round that made it (several calls can be in the same round) and callIndex its place within that round; null if unknown. |
handoff | fromAgent, toAgent, payload | The agent handed the conversation to another agent (a subagent), with the data sent in payload. |
assistance_request | source, reason, waitingMessage | A request for human assistance. source records the origin: agent, guardrail or subagent. reason is the reason and waitingMessage the waiting message the customer would have received. |
state_change | key, old, new | A stored value that changed. The agent's real tools do not report it. |
Errors
| Status | details.code | When |
|---|---|---|
404 | AGENT_NOT_FOUND | The agent does not exist or belongs to another workspace. |
404 | EVAL_NOT_FOUND | The trial does not exist, the run does not belong to that launch or the launch does not belong to that agent. |
Notes
- Sort events by
seq. Each event has a stableeventId: it is the one the verdicts'eventIdscite. Do not interpret its format. - Treat any other
typeas unknown. - Read access to the agent is enough.
Assistance requests in the conversation
- An
assistance_requestgoes after that turn's tools and before that turn's agent message, whose text is the waiting message. If the agent asked for it (source: "agent"), itscall_for_helpcall comes before, withqueryandcontext. To know whether help was asked for, read theassistance_request, not the call. - With an
assistance_requestthe trial ends (endReason: "assistance_requested"): in evals no real request is created, nobody is notified and there is no person to continue the conversation.