curl --request GET \
--url https://agents-api.kolena.com/api/v1/client/agents/{agent_id}/runs \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents-api.kolena.com/api/v1/client/agents/{agent_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://agents-api.kolena.com/api/v1/client/agents/{agent_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://agents-api.kolena.com/api/v1/client/agents/{agent_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://agents-api.kolena.com/api/v1/client/agents/{agent_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://agents-api.kolena.com/api/v1/client/agents/{agent_id}/runs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agents-api.kolena.com/api/v1/client/agents/{agent_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{
"runs": [
{
"agent_id": 1,
"completed": "2025-01-01T12:02:00",
"created": "2025-01-01T12:00:00",
"data": {
"Another Example": {
"end_time": "2025-01-05T03:13:59.000013",
"metadata": {
"citations": [
{
"file": "demo2.csv"
}
],
"confidence": 1,
"reasoning": "The order amount is listed in demo2.csv",
"url_citations": []
},
"start_time": "2025-01-05T03:13:45.000051",
"status": "success",
"usage": {
"credits_used": 0.071
},
"value": 123
},
"Example Prompt": {
"end_time": "2025-01-05T03:05:10.000102",
"metadata": {
"citations": [
{
"file": "demo1.pdf",
"pages": [
2,
5
],
"regions": [
{
"page": 2,
"point": [
20,
15
],
"text": "Account number"
}
]
}
],
"confidence": 1,
"reasoning": "Looking at file demo1.pdf, ...",
"url_citations": [
{
"cited_text": "Example text from website",
"title": "Kolena Example",
"url": "https://example.com/kolena"
}
]
},
"start_time": "2025-01-05T03:05:05.000057",
"status": "success",
"usage": {
"credits_used": 0.052
},
"value": "foo"
}
},
"files": [
"demo1.pdf",
"demo2.csv"
],
"order": [
"Example Prompt",
"Another Example"
],
"run_id": 1,
"run_url": "https://agents.kolena.com/my_org/agents/1/runs/1",
"status": "success",
"updated": "2025-01-05T00:00:00",
"usage": {
"credits_used": 0.123
}
}
],
"total_pages": 123,
"page_number": 123,
"page_size": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}List Agent Runs
Return all Runs for an Agent, including results
curl --request GET \
--url https://agents-api.kolena.com/api/v1/client/agents/{agent_id}/runs \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents-api.kolena.com/api/v1/client/agents/{agent_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://agents-api.kolena.com/api/v1/client/agents/{agent_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://agents-api.kolena.com/api/v1/client/agents/{agent_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://agents-api.kolena.com/api/v1/client/agents/{agent_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://agents-api.kolena.com/api/v1/client/agents/{agent_id}/runs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agents-api.kolena.com/api/v1/client/agents/{agent_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{
"runs": [
{
"agent_id": 1,
"completed": "2025-01-01T12:02:00",
"created": "2025-01-01T12:00:00",
"data": {
"Another Example": {
"end_time": "2025-01-05T03:13:59.000013",
"metadata": {
"citations": [
{
"file": "demo2.csv"
}
],
"confidence": 1,
"reasoning": "The order amount is listed in demo2.csv",
"url_citations": []
},
"start_time": "2025-01-05T03:13:45.000051",
"status": "success",
"usage": {
"credits_used": 0.071
},
"value": 123
},
"Example Prompt": {
"end_time": "2025-01-05T03:05:10.000102",
"metadata": {
"citations": [
{
"file": "demo1.pdf",
"pages": [
2,
5
],
"regions": [
{
"page": 2,
"point": [
20,
15
],
"text": "Account number"
}
]
}
],
"confidence": 1,
"reasoning": "Looking at file demo1.pdf, ...",
"url_citations": [
{
"cited_text": "Example text from website",
"title": "Kolena Example",
"url": "https://example.com/kolena"
}
]
},
"start_time": "2025-01-05T03:05:05.000057",
"status": "success",
"usage": {
"credits_used": 0.052
},
"value": "foo"
}
},
"files": [
"demo1.pdf",
"demo2.csv"
],
"order": [
"Example Prompt",
"Another Example"
],
"run_id": 1,
"run_url": "https://agents.kolena.com/my_org/agents/1/runs/1",
"status": "success",
"updated": "2025-01-05T00:00:00",
"usage": {
"credits_used": 0.123
}
}
],
"total_pages": 123,
"page_number": 123,
"page_size": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>. The <token> represents your API key, which must be acquired from the Kolena platform.
Path Parameters
Query Parameters
Optionally specify the index of the Runs page to fetch.
x >= 0Optionally specify the maximum number of Runs to fetch.
0 <= x <= 1000Optionally specify specific Run IDs to fetch.
Optionally filter by the status of Runs, e.g. running or success.
running, success, failed Optionally filter by user_defined_ids of Runs.
Optionally filter Runs created on or after this timestamp (inclusive). Accepts ISO 8601 format (e.g., 2024-01-15T10:30:00Z or 2024-01-15T10:30:00+00:00).
Optionally filter Runs created on or before this timestamp (inclusive). Accepts ISO 8601 format (e.g., 2024-01-15T23:59:59Z or 2024-01-15T23:59:59+00:00).
Response
Successful Response
The fetched page of Runs from this Agent.
Show child attributes
Show child attributes
The total number of pages of Runs. Use the request arguments page_number and page_size to control which Runs are fetched.
The number of the fetched page.
The page size, i.e. number of Runs, fetched.
Was this page helpful?
