curl --request GET \
--url https://api.{environment}.corti.app/v2/agentic/contexts/{contextId}/trace \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Name: <api-key>'import { CortiClient, CortiEnvironment } from "@corti/sdk";
const client = new CortiClient({
environment: CortiEnvironment.Eu,
auth: {
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
},
tenantName: "YOUR_TENANT_NAME"
});
const pageableResponse = await client.agentic.contexts.trace("ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51");
for await (const item of pageableResponse) {
console.log(item);
}
// Or you can manually iterate page-by-page
let page = await client.agentic.contexts.trace("ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51");
while (page.hasNextPage()) {
page = page.getNextPage();
}
// You can also access the underlying response
const response = page.response;
using Corti.Agentic;
using Corti;
var client = new CortiClient(
"TENANT_NAME",
CortiClientEnvironment.Eu,
new CortiClientAuth.ClientCredentials("client_id", "client_secret")
);
var items = await client.Agentic.Contexts.TraceAsync(
"ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51",
new AgenticContextsTraceRequest()
);
await foreach (var item in items)
{
// do something with item
}
import requests
url = "https://api.{environment}.corti.app/v2/agentic/contexts/{contextId}/trace"
headers = {
"Authorization": "Bearer <token>",
"Tenant-Name": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/v2/agentic/contexts/{contextId}/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>",
"Tenant-Name: <api-key>"
],
]);
$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.{environment}.corti.app/v2/agentic/contexts/{contextId}/trace"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Tenant-Name", "<api-key>")
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.{environment}.corti.app/v2/agentic/contexts/{contextId}/trace")
.header("Authorization", "Bearer <token>")
.header("Tenant-Name", "<api-key>")
.asString();{
"traces": [
{
"trace": {
"id": "0192f4c85f3a7e8ab1c23d4e5f6a7b8c",
"name": "invoke_agent",
"start_time": "2026-05-19T12:00:00Z",
"thread_id": "ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51"
},
"spans": [
{
"name": "invoke_llm",
"span_id": "span.0192f4c8-6e1a-7f2b-9c3d-4e5f6a7b8c9d",
"start_time": "2026-05-19T12:00:00Z"
}
]
}
]
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}Export the observability trace for a context
Returns the execution traces for the context — LLM calls, tool
executions, and token usage — in OpenInference format. Traces are
ordered newest-first and paginated; each page returns up to pageSize
traces with their spans inlined.
curl --request GET \
--url https://api.{environment}.corti.app/v2/agentic/contexts/{contextId}/trace \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Name: <api-key>'import { CortiClient, CortiEnvironment } from "@corti/sdk";
const client = new CortiClient({
environment: CortiEnvironment.Eu,
auth: {
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
},
tenantName: "YOUR_TENANT_NAME"
});
const pageableResponse = await client.agentic.contexts.trace("ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51");
for await (const item of pageableResponse) {
console.log(item);
}
// Or you can manually iterate page-by-page
let page = await client.agentic.contexts.trace("ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51");
while (page.hasNextPage()) {
page = page.getNextPage();
}
// You can also access the underlying response
const response = page.response;
using Corti.Agentic;
using Corti;
var client = new CortiClient(
"TENANT_NAME",
CortiClientEnvironment.Eu,
new CortiClientAuth.ClientCredentials("client_id", "client_secret")
);
var items = await client.Agentic.Contexts.TraceAsync(
"ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51",
new AgenticContextsTraceRequest()
);
await foreach (var item in items)
{
// do something with item
}
import requests
url = "https://api.{environment}.corti.app/v2/agentic/contexts/{contextId}/trace"
headers = {
"Authorization": "Bearer <token>",
"Tenant-Name": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/v2/agentic/contexts/{contextId}/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>",
"Tenant-Name: <api-key>"
],
]);
$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.{environment}.corti.app/v2/agentic/contexts/{contextId}/trace"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Tenant-Name", "<api-key>")
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.{environment}.corti.app/v2/agentic/contexts/{contextId}/trace")
.header("Authorization", "Bearer <token>")
.header("Tenant-Name", "<api-key>")
.asString();{
"traces": [
{
"trace": {
"id": "0192f4c85f3a7e8ab1c23d4e5f6a7b8c",
"name": "invoke_agent",
"start_time": "2026-05-19T12:00:00Z",
"thread_id": "ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51"
},
"spans": [
{
"name": "invoke_llm",
"span_id": "span.0192f4c8-6e1a-7f2b-9c3d-4e5f6a7b8c9d",
"start_time": "2026-05-19T12:00:00Z"
}
]
}
]
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}Authorizations
OAuth 2.0 / OIDC bearer token.
The tenant the request operates within.
Path Parameters
Context identifier (prefixed UUIDv7).
Context identifier. Accepts ctx.<uuidv7> or a bare UUIDv7 on input; always returned prefixed.
^(ctx\.)?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51"
Query Parameters
Maximum number of items per page.
1 <= x <= 200Opaque cursor from a prior response's nextPageToken. Omit on the first request.
Response
OpenInference trace JSON (paginated).
A page of traces for a context in OpenInference format. Traces are ordered newest-first.
Traces for the context, newest first.
Show child attributes
Show child attributes
[
{
"trace": {
"id": "0192f4c85f3a7e8ab1c23d4e5f6a7b8c",
"name": "invoke_agent",
"start_time": "2026-05-19T12:00:00Z",
"thread_id": "ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51"
},
"spans": [
{
"name": "invoke_llm",
"span_id": "span.0192f4c8-6e1a-7f2b-9c3d-4e5f6a7b8c9d",
"start_time": "2026-05-19T12:00:00Z"
}
]
}
]
Opaque cursor to request the next page, or null if there are no more pages.
Total number of items matching the query, when known. Not currently populated by the server; treat as absent.
42
Was this page helpful?