Skip to main content
GET
/
api
/
v1
/
agents
/
{agent_id}
/
tools
/
{tool_id}
/
executions
Get Tool Executions
curl --request GET \
  --url https://agent-studio.thena.ai/api/v1/agents/{agent_id}/tools/{tool_id}/executions \
  --header 'x-api-key: <api-key>'
import requests

url = "https://agent-studio.thena.ai/api/v1/agents/{agent_id}/tools/{tool_id}/executions"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://agent-studio.thena.ai/api/v1/agents/{agent_id}/tools/{tool_id}/executions', 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://agent-studio.thena.ai/api/v1/agents/{agent_id}/tools/{tool_id}/executions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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://agent-studio.thena.ai/api/v1/agents/{agent_id}/tools/{tool_id}/executions"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<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://agent-studio.thena.ai/api/v1/agents/{agent_id}/tools/{tool_id}/executions")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://agent-studio.thena.ai/api/v1/agents/{agent_id}/tools/{tool_id}/executions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
[
  {
    "agent_tool_id": "123e4567-e89b-12d3-a456-426614174001",
    "duration_ms": 1500,
    "executed_at": "2023-01-01T00:00:00Z",
    "execution_id": "123e4567-e89b-12d3-a456-426614174002",
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "input_parameters": {
      "query": "how to reset password"
    },
    "output_result": {
      "results": [
        "Found 3 articles"
      ]
    },
    "status": "completed"
  }
]
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

x-api-key
string
header
required

Path Parameters

agent_id
string
required
tool_id
string<uuid>
required

Query Parameters

limit
integer
default:50

Maximum number of executions to return

offset
integer
default:0

Number of executions to skip

status
string

Filter by execution status

Response

Successful Response

id
string<uuid>
required

Unique identifier for the execution

agent_tool_id
string<uuid>
required

ID of the agent tool that was executed

status
string
required

Execution status: 'running', 'completed', 'failed'

executed_at
string<date-time>
required

When the tool was executed

execution_id
string<uuid> | null

ID of the flow execution this tool execution belongs to

input_parameters
Input Parameters · object

Input parameters passed to the tool

output_result
Output Result · object | null

Result returned by the tool

duration_ms
integer | null

Execution duration in milliseconds

error
string | null

Error message if execution failed