curl --request GET \
--url https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/agents/{agentId}/traces/{correlationId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/agents/{agentId}/traces/{correlationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/agents/{agentId}/traces/{correlationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"correlationId": "<string>",
"agent_id": "<string>",
"summary": {
"eventCount": 123,
"errorCount": 123,
"toolCallCount": 123,
"retrievalCount": 123,
"model": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"details_expired": true,
"timeline_truncated": true,
"workspaceId": "<string>"
},
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"cost": 123,
"duration_ms": 123,
"completions": 123
},
"retrieval": [
{
"query": "<string>",
"tool_name": "<string>",
"knowledge_base_id": "<string>",
"status": "<string>",
"returned": 123,
"total_found": 123,
"duplicates_filtered": 123,
"passages": [
{}
],
"timestamp": "2023-11-07T05:31:56Z"
}
],
"tool_calls": [
{
"type": "<string>",
"tool_call_id": "<string>",
"tool_name": "<string>",
"display_name": "<string>",
"status": "<string>",
"error": null,
"timestamp": "2023-11-07T05:31:56Z"
}
],
"timeline": [
{
"id": "<string>",
"workspaceId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"type": "<string>",
"automation": "<string>",
"appInstance": "<string>"
}
],
"errors": [
{
"id": "<string>",
"automation": "<string>",
"appInstance": "<string>",
"trigger": {},
"error": null,
"message": "<string>",
"details": null,
"timestamp": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Execution trace of one agent turn
Assembles the trace of one agent turn (identified by its
correlationId) for the agent’s editor: knowledge-base passages
retrieved and their scores, tool calls, the chronology of what ran,
errors, and the model, tokens, cost and latency of the turn (merged
from the LLM Gateway). Step inputs and outputs are not included;
fetch one on demand with
GET /v1/agents/{agentId}/traces/{correlationId}/events/{eventId}.
Requires the agent-factory:traces:read org permission (or the
agent-factory:* / * wildcards, or platform admin). Owning or
editing the agent is not enough.
Caveats reported in the payload: retrieval is only populated for
turns run from the editing surface, and summary.details_expired
flags traces older than the 14-day cleanup of step details. The
timeline is capped at 2000 events (summary.timeline_truncated).
curl --request GET \
--url https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/agents/{agentId}/traces/{correlationId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/agents/{agentId}/traces/{correlationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/agents/{agentId}/traces/{correlationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"correlationId": "<string>",
"agent_id": "<string>",
"summary": {
"eventCount": 123,
"errorCount": 123,
"toolCallCount": 123,
"retrievalCount": 123,
"model": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"details_expired": true,
"timeline_truncated": true,
"workspaceId": "<string>"
},
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"cost": 123,
"duration_ms": 123,
"completions": 123
},
"retrieval": [
{
"query": "<string>",
"tool_name": "<string>",
"knowledge_base_id": "<string>",
"status": "<string>",
"returned": 123,
"total_found": 123,
"duplicates_filtered": 123,
"passages": [
{}
],
"timestamp": "2023-11-07T05:31:56Z"
}
],
"tool_calls": [
{
"type": "<string>",
"tool_call_id": "<string>",
"tool_name": "<string>",
"display_name": "<string>",
"status": "<string>",
"error": null,
"timestamp": "2023-11-07T05:31:56Z"
}
],
"timeline": [
{
"id": "<string>",
"workspaceId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"type": "<string>",
"automation": "<string>",
"appInstance": "<string>"
}
],
"errors": [
{
"id": "<string>",
"automation": "<string>",
"appInstance": "<string>",
"trigger": {},
"error": null,
"message": "<string>",
"details": null,
"timestamp": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Authorizations
User-bound credential carrying an identity: either a session JWT
or a user access token (at:*) generated from the user settings UI.
Send as Authorization: Bearer <token>.
Org API keys (iak_*) are not accepted here - they carry
no user identity. Use the x-prismeai-api-key header instead
(see OrgApiKeyAuth).
Headers
Resolve the agent as its editor does (draft configuration).
true Path Parameters
64128Query Parameters
Comma-separated automation slugs to leave out of the timeline.
Defaults to _stream-event (one execution per streamed chunk).
Send __none__ to keep every step.
Response
Assembled trace.
Hide child attributes
Hide child attributes
Projected steps (never raw payloads), sorted by emission time.
Was this page helpful?