Get Agent Run
curl --request GET \
--url https://api.example.com/api/agents/{agentId}/runs/{runId}import requests
url = "https://api.example.com/api/agents/{agentId}/runs/{runId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/agents/{agentId}/runs/{runId}', 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/api/agents/{agentId}/runs/{runId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/api/agents/{agentId}/runs/{runId}"
req, _ := http.NewRequest("GET", url, nil)
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/api/agents/{agentId}/runs/{runId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/agents/{agentId}/runs/{runId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"runId": "550e8400-e29b-41d4-a716-446655440001",
"agentId": "550e8400-e29b-41d4-a716-446655440000",
"roomId": "660e8400-e29b-41d4-a716-446655440002",
"startTime": 1703001234567,
"endTime": 1703001235890,
"status": "completed",
"events": [
{
"type": "action:started",
"timestamp": 1703001234600,
"data": { "action": "REPLY" }
},
{
"type": "model:used",
"timestamp": 1703001234800,
"data": {
"modelType": "text:large",
"provider": "openai",
"tokens": { "prompt": 150, "completion": 50 }
}
},
{
"type": "action:completed",
"timestamp": 1703001235800,
"data": { "action": "REPLY", "success": true }
}
],
"tokensUsed": {
"promptTokens": 150,
"completionTokens": 50,
"totalTokens": 200
},
"errors": []
}
RUNS
Get Agent Run
GET
/
api
/
agents
/
{agentId}
/
runs
/
{runId}
Get Agent Run
curl --request GET \
--url https://api.example.com/api/agents/{agentId}/runs/{runId}import requests
url = "https://api.example.com/api/agents/{agentId}/runs/{runId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/agents/{agentId}/runs/{runId}', 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/api/agents/{agentId}/runs/{runId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/api/agents/{agentId}/runs/{runId}"
req, _ := http.NewRequest("GET", url, nil)
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/api/agents/{agentId}/runs/{runId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/agents/{agentId}/runs/{runId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"runId": "550e8400-e29b-41d4-a716-446655440001",
"agentId": "550e8400-e29b-41d4-a716-446655440000",
"roomId": "660e8400-e29b-41d4-a716-446655440002",
"startTime": 1703001234567,
"endTime": 1703001235890,
"status": "completed",
"events": [
{
"type": "action:started",
"timestamp": 1703001234600,
"data": { "action": "REPLY" }
},
{
"type": "model:used",
"timestamp": 1703001234800,
"data": {
"modelType": "text:large",
"provider": "openai",
"tokens": { "prompt": 150, "completion": 50 }
}
},
{
"type": "action:completed",
"timestamp": 1703001235800,
"data": { "action": "REPLY", "success": true }
}
],
"tokensUsed": {
"promptTokens": 150,
"completionTokens": 50,
"totalTokens": 200
},
"errors": []
}
Get detailed information about a specific agent run, including the full event history.
Path Parameters
string
required
The UUID of the agent
string
required
The UUID of the run
Response
string
Unique run identifier
string
Agent that executed this run
string
Room where the run occurred
number
Unix timestamp when run started
number
Unix timestamp when run ended
string
Run status:
completed, failed, timeout, cancelledarray
object
array
Array of error messages if any occurred
{
"runId": "550e8400-e29b-41d4-a716-446655440001",
"agentId": "550e8400-e29b-41d4-a716-446655440000",
"roomId": "660e8400-e29b-41d4-a716-446655440002",
"startTime": 1703001234567,
"endTime": 1703001235890,
"status": "completed",
"events": [
{
"type": "action:started",
"timestamp": 1703001234600,
"data": { "action": "REPLY" }
},
{
"type": "model:used",
"timestamp": 1703001234800,
"data": {
"modelType": "text:large",
"provider": "openai",
"tokens": { "prompt": 150, "completion": 50 }
}
},
{
"type": "action:completed",
"timestamp": 1703001235800,
"data": { "action": "REPLY", "success": true }
}
],
"tokensUsed": {
"promptTokens": 150,
"completionTokens": 50,
"totalTokens": 200
},
"errors": []
}
Was this page helpful?

