curl --request GET \
--url https://api.chatsailer.com/v1/conversations/{conversation_id}/trace \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chatsailer.com/v1/conversations/{conversation_id}/trace"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chatsailer.com/v1/conversations/{conversation_id}/trace', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chatsailer.com/v1/conversations/{conversation_id}/trace",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.chatsailer.com/v1/conversations/{conversation_id}/trace"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.chatsailer.com/v1/conversations/{conversation_id}/trace")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chatsailer.com/v1/conversations/{conversation_id}/trace")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"conversation_id": "conv_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"run_ids": [
"run_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
],
"decisions": [
{
"edge_id": "<string>",
"taken": true,
"conditions": [
{
"passed": true,
"actual": "<string>",
"expected": "<string>",
"field": "<string>",
"note": "<string>",
"operator": "<string>"
}
],
"to": "<string>"
}
],
"likely_cause": "<string>",
"object": "conversation_trace"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Retrieve the routing trace for a conversation
Why the agent went where it did: every routing edge it considered, which conditions passed, and the values they compared.
The most useful part is the edges that lost. An agent that will not leave a step has almost always failed a condition comparing a field that was never collected, and likely_cause names it.
Pass since to scope this to one turn — without it the trace covers every run on the conversation.
curl --request GET \
--url https://api.chatsailer.com/v1/conversations/{conversation_id}/trace \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chatsailer.com/v1/conversations/{conversation_id}/trace"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chatsailer.com/v1/conversations/{conversation_id}/trace', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chatsailer.com/v1/conversations/{conversation_id}/trace",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.chatsailer.com/v1/conversations/{conversation_id}/trace"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.chatsailer.com/v1/conversations/{conversation_id}/trace")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chatsailer.com/v1/conversations/{conversation_id}/trace")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"conversation_id": "conv_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"run_ids": [
"run_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
],
"decisions": [
{
"edge_id": "<string>",
"taken": true,
"conditions": [
{
"passed": true,
"actual": "<string>",
"expected": "<string>",
"field": "<string>",
"note": "<string>",
"operator": "<string>"
}
],
"to": "<string>"
}
],
"likely_cause": "<string>",
"object": "conversation_trace"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
A workspace API token. Create one in Settings → API. Send it as Authorization: Bearer sk_live_....
Path Parameters
Unique identifier for a conversation.
^conv_[0-9a-f]{32}$"conv_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Query Parameters
Only decisions recorded at or after this time. Without it the trace covers every run on the conversation, which on a long thread is a great deal of history.
Response
Successful Response
Why the agent went where it did, on one stretch of a conversation.
Unique identifier for a conversation.
^conv_[0-9a-f]{32}$"conv_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
The AI runs this trace covers. A single turn spans several when the agent replans.
Unique identifier for an inference run.
^run_[0-9a-f]{32}$Show child attributes
Show child attributes
Set when edges lost because a field they compare was never collected — the answer to 'why is it stuck here'.
"conversation_trace"