curl --request GET \
--url https://api.reasonmachines.ai/v3/organizations/{orgId}/sessions/{sessionId}/trajectory \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reasonmachines.ai/v3/organizations/{orgId}/sessions/{sessionId}/trajectory"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reasonmachines.ai/v3/organizations/{orgId}/sessions/{sessionId}/trajectory', 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.reasonmachines.ai/v3/organizations/{orgId}/sessions/{sessionId}/trajectory",
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.reasonmachines.ai/v3/organizations/{orgId}/sessions/{sessionId}/trajectory"
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.reasonmachines.ai/v3/organizations/{orgId}/sessions/{sessionId}/trajectory")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reasonmachines.ai/v3/organizations/{orgId}/sessions/{sessionId}/trajectory")
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{
"schema_version": "ATIF-v1.7",
"agent": {
"name": "<string>",
"version": "<string>",
"model_name": "<string>",
"extra": {}
},
"steps": [
{
"step_id": 123,
"source": "system",
"message": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"model_name": "<string>",
"reasoning_effort": "<string>",
"reasoning_content": "<string>",
"tool_calls": [
{
"tool_call_id": "<string>",
"function_name": "<string>",
"arguments": {},
"extra": {}
}
],
"observation": {
"results": [
{
"source_call_id": "<string>",
"content": "<string>",
"extra": {}
}
]
},
"metrics": {
"prompt_tokens": 123,
"completion_tokens": 123,
"cached_tokens": 123,
"cost_usd": 123,
"extra": {}
},
"extra": {}
}
],
"session_id": "<string>",
"trajectory_id": "<string>",
"final_metrics": {
"total_prompt_tokens": 123,
"total_completion_tokens": 123,
"total_cached_tokens": 123,
"total_cost_usd": 123,
"total_steps": 123,
"extra": {}
},
"notes": "<string>",
"extra": {}
}{
"error": "prompt_required"
}{
"error": "session_not_found"
}Export session trajectory
Export the full session trajectory conforming to the Agent Trajectory Interchange Format (ATIF v1.7, RFC 0001). Contains sequential steps, user messages, agent reasoning, tool calls, environment observations, and token/cost metrics.
Scope:sessions:readcurl --request GET \
--url https://api.reasonmachines.ai/v3/organizations/{orgId}/sessions/{sessionId}/trajectory \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reasonmachines.ai/v3/organizations/{orgId}/sessions/{sessionId}/trajectory"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reasonmachines.ai/v3/organizations/{orgId}/sessions/{sessionId}/trajectory', 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.reasonmachines.ai/v3/organizations/{orgId}/sessions/{sessionId}/trajectory",
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.reasonmachines.ai/v3/organizations/{orgId}/sessions/{sessionId}/trajectory"
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.reasonmachines.ai/v3/organizations/{orgId}/sessions/{sessionId}/trajectory")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reasonmachines.ai/v3/organizations/{orgId}/sessions/{sessionId}/trajectory")
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{
"schema_version": "ATIF-v1.7",
"agent": {
"name": "<string>",
"version": "<string>",
"model_name": "<string>",
"extra": {}
},
"steps": [
{
"step_id": 123,
"source": "system",
"message": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"model_name": "<string>",
"reasoning_effort": "<string>",
"reasoning_content": "<string>",
"tool_calls": [
{
"tool_call_id": "<string>",
"function_name": "<string>",
"arguments": {},
"extra": {}
}
],
"observation": {
"results": [
{
"source_call_id": "<string>",
"content": "<string>",
"extra": {}
}
]
},
"metrics": {
"prompt_tokens": 123,
"completion_tokens": 123,
"cached_tokens": 123,
"cost_usd": 123,
"extra": {}
},
"extra": {}
}
],
"session_id": "<string>",
"trajectory_id": "<string>",
"final_metrics": {
"total_prompt_tokens": 123,
"total_completion_tokens": 123,
"total_cached_tokens": 123,
"total_cost_usd": 123,
"total_steps": 123,
"extra": {}
},
"notes": "<string>",
"extra": {}
}{
"error": "prompt_required"
}{
"error": "session_not_found"
}Authorizations
Your ara_ API key from Settings > Ara API. Keys are capability-scoped: run, mcp:read, mcp:write, secrets:read, secrets:write, sessions:read, sessions:debug, knowledge:read, memory:read, memory:write, skills:read, skills:write, repos:read, repos:write, reviews:read, reviews:write, deployment:read, analytics:read, org:read, org:write, attachments:read, attachments:write, guardrails:read, guardrails:write, automations:read, automations:write, agent_auth:read. mcp:write manages MCP server configuration only; it does not authorize remote MCP-tool execution. sessions:debug is privileged: it expands diagnostic session events only for organization owners/admins.
Path Parameters
Organization id or slug. Resolve it with GET /v3/self.
The session id.
Query Parameters
Trajectory format to export. Supported values: atif (default).
Response
The complete ATIF trajectory for the session.
Full session trajectory conforming to the Agent Trajectory Interchange Format (ATIF v1.7, RFC 0001).
ATIF schema version.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Run-scoped session identifier.
Unique identifier for this trajectory document.
Show child attributes
Show child attributes

