Get Session Runs
curl --request GET \
--url https://api.example.com/sessions/{session_id}/runs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/sessions/{session_id}/runs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/sessions/{session_id}/runs', 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.example.com/sessions/{session_id}/runs",
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.example.com/sessions/{session_id}/runs"
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.example.com/sessions/{session_id}/runs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/sessions/{session_id}/runs")
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{
"run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340",
"parent_run_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0",
"agent_id": "basic-agent",
"user_id": "",
"run_input": "Which tools do you have access to?",
"content": "I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!",
"run_response_format": "text",
"reasoning_content": "",
"metrics": {
"input_tokens": 82,
"output_tokens": 56,
"total_tokens": 138,
"time_to_first_token": 0.047505500027909875,
"duration": 4.840060166025069
},
"messages": [
{
"content": "<additional_information>\n- Use markdown to format your answers.\n- The current time is 2025-09-08 17:52:10.101003.\n</additional_information>\n\nYou have the capability to retain memories from previous interactions with the user, but have not had any interactions with the user yet.",
"from_history": false,
"stop_after_tool_call": false,
"role": "system",
"created_at": 1757346730
},
{
"content": "Which tools do you have access to?",
"from_history": false,
"stop_after_tool_call": false,
"role": "user",
"created_at": 1757346730
},
{
"content": "I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!",
"from_history": false,
"stop_after_tool_call": false,
"role": "assistant",
"metrics": {
"input_tokens": 82,
"output_tokens": 56,
"total_tokens": 138
},
"created_at": 1757346730
}
],
"events": [
{
"created_at": 1757346730,
"event": "RunStarted",
"agent_id": "basic-agent",
"agent_name": "Basic Agent",
"run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340",
"session_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0",
"model": "gpt-4o",
"model_provider": "OpenAI"
},
{
"created_at": 1757346733,
"event": "MemoryUpdateStarted",
"agent_id": "basic-agent",
"agent_name": "Basic Agent",
"run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340",
"session_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0"
},
{
"created_at": 1757346734,
"event": "MemoryUpdateCompleted",
"agent_id": "basic-agent",
"agent_name": "Basic Agent",
"run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340",
"session_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0"
},
{
"created_at": 1757346734,
"event": "RunCompleted",
"agent_id": "basic-agent",
"agent_name": "Basic Agent",
"run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340",
"session_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0",
"content": "I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!",
"content_type": "str",
"metrics": {
"input_tokens": 82,
"output_tokens": 56,
"total_tokens": 138,
"time_to_first_token": 0.047505500027909875,
"duration": 4.840060166025069
}
}
],
"created_at": "2025-09-08T15:52:10Z"
}{
"detail": "Bad request",
"error_code": "BAD_REQUEST"
}{
"detail": "Unauthenticated access",
"error_code": "UNAUTHENTICATED"
}{
"detail": "Not found",
"error_code": "NOT_FOUND"
}{
"detail": "Validation error",
"error_code": "VALIDATION_ERROR"
}{
"detail": "Internal server error",
"error_code": "INTERNAL_SERVER_ERROR"
}Sessions
Get Session Runs
Retrieve all runs (executions) for a specific session. Runs represent individual interactions or executions within a session. Response schema varies based on session type.
GET
/
sessions
/
{session_id}
/
runs
Get Session Runs
curl --request GET \
--url https://api.example.com/sessions/{session_id}/runs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/sessions/{session_id}/runs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/sessions/{session_id}/runs', 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.example.com/sessions/{session_id}/runs",
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.example.com/sessions/{session_id}/runs"
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.example.com/sessions/{session_id}/runs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/sessions/{session_id}/runs")
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{
"run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340",
"parent_run_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0",
"agent_id": "basic-agent",
"user_id": "",
"run_input": "Which tools do you have access to?",
"content": "I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!",
"run_response_format": "text",
"reasoning_content": "",
"metrics": {
"input_tokens": 82,
"output_tokens": 56,
"total_tokens": 138,
"time_to_first_token": 0.047505500027909875,
"duration": 4.840060166025069
},
"messages": [
{
"content": "<additional_information>\n- Use markdown to format your answers.\n- The current time is 2025-09-08 17:52:10.101003.\n</additional_information>\n\nYou have the capability to retain memories from previous interactions with the user, but have not had any interactions with the user yet.",
"from_history": false,
"stop_after_tool_call": false,
"role": "system",
"created_at": 1757346730
},
{
"content": "Which tools do you have access to?",
"from_history": false,
"stop_after_tool_call": false,
"role": "user",
"created_at": 1757346730
},
{
"content": "I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!",
"from_history": false,
"stop_after_tool_call": false,
"role": "assistant",
"metrics": {
"input_tokens": 82,
"output_tokens": 56,
"total_tokens": 138
},
"created_at": 1757346730
}
],
"events": [
{
"created_at": 1757346730,
"event": "RunStarted",
"agent_id": "basic-agent",
"agent_name": "Basic Agent",
"run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340",
"session_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0",
"model": "gpt-4o",
"model_provider": "OpenAI"
},
{
"created_at": 1757346733,
"event": "MemoryUpdateStarted",
"agent_id": "basic-agent",
"agent_name": "Basic Agent",
"run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340",
"session_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0"
},
{
"created_at": 1757346734,
"event": "MemoryUpdateCompleted",
"agent_id": "basic-agent",
"agent_name": "Basic Agent",
"run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340",
"session_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0"
},
{
"created_at": 1757346734,
"event": "RunCompleted",
"agent_id": "basic-agent",
"agent_name": "Basic Agent",
"run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340",
"session_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0",
"content": "I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!",
"content_type": "str",
"metrics": {
"input_tokens": 82,
"output_tokens": 56,
"total_tokens": 138,
"time_to_first_token": 0.047505500027909875,
"duration": 4.840060166025069
}
}
],
"created_at": "2025-09-08T15:52:10Z"
}{
"detail": "Bad request",
"error_code": "BAD_REQUEST"
}{
"detail": "Unauthenticated access",
"error_code": "UNAUTHENTICATED"
}{
"detail": "Not found",
"error_code": "NOT_FOUND"
}{
"detail": "Validation error",
"error_code": "VALIDATION_ERROR"
}{
"detail": "Internal server error",
"error_code": "INTERNAL_SERVER_ERROR"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Session ID to get runs from
Query Parameters
Session type (agent, team, or workflow)
Available options:
agent, team, workflow User ID to query runs from
Filter runs created after this Unix timestamp (epoch time in seconds)
Filter runs created before this Unix timestamp (epoch time in seconds)
Database ID to query runs from
Response
Session runs retrieved successfully
- RunSchema
- TeamRunSchema
- WorkflowRunSchema