Skip to main content
GET
/
api
/
agents
/
{agentId}
/
runs
/
{runId}
Get agent run
curl --request GET \
  --url https://app.outlit.ai/api/agents/{agentId}/runs/{runId} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://app.outlit.ai/api/agents/{agentId}/runs/{runId}"

headers = {"Authorization": "Bearer <token>"}

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

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://app.outlit.ai/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://app.outlit.ai/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",
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://app.outlit.ai/api/agents/{agentId}/runs/{runId}"

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://app.outlit.ai/api/agents/{agentId}/runs/{runId}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.outlit.ai/api/agents/{agentId}/runs/{runId}")

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
{
  "ok": true,
  "commandId": "<string>",
  "commandVersion": 123,
  "correlationId": "<string>",
  "result": {
    "operationId": "<string>",
    "status": "<string>",
    "resources": [
      {
        "type": "<string>",
        "id": "<string>"
      }
    ],
    "data": {
      "run": {
        "id": "<string>",
        "runId": "<string>",
        "agentId": "<string>",
        "summary": "<string>",
        "errorSummary": "<string>",
        "sandboxStatus": "<string>",
        "startedAt": "2023-11-07T05:31:56Z",
        "endedAt": "2023-11-07T05:31:56Z",
        "durationMs": 1,
        "counts": {
          "candidates": 1,
          "tools": 1,
          "artifacts": 1,
          "outputs": 1
        },
        "agentKey": "<string>",
        "executionStrategy": "<string>",
        "model": "<string>",
        "thinkingLevel": "<string>",
        "visibility": {
          "hiddenCustomerCount": 1,
          "hiddenOutputCount": 1,
          "debugLedgerHidden": true
        },
        "triggerEvidence": {
          "automationRunId": "<string>",
          "policy": {
            "requiredCount": 1,
            "selectedCount": 1,
            "matchedCount": 1
          },
          "selectedSignals": [
            {
              "id": "<string>",
              "key": "<string>",
              "name": "<string>",
              "kind": "<string>"
            }
          ],
          "matchedSignals": [
            {
              "id": "<string>",
              "key": "<string>",
              "name": "<string>",
              "kind": "<string>"
            }
          ],
          "window": {
            "value": 2,
            "startAt": "2023-11-07T05:31:56Z",
            "endAt": "2023-11-07T05:31:56Z"
          },
          "primaryOccurrence": {
            "id": "<string>",
            "eventName": "<string>",
            "eventChannel": "<string>",
            "eventOccurredAt": "2023-11-07T05:31:56Z"
          }
        },
        "candidates": [
          {
            "id": "<string>",
            "customerId": "<string>",
            "customerName": "<string>",
            "customerDomain": "<string>",
            "billingStatus": "<string>",
            "lastActivityAt": "2023-11-07T05:31:56Z",
            "candidateKey": "<string>",
            "fingerprint": "<string>",
            "outputId": "<string>",
            "disposition": "<string>",
            "surfaceReason": "<string>",
            "reasons": [
              "<string>"
            ],
            "metrics": [
              "<string>"
            ]
          }
        ],
        "outputs": [
          {
            "id": "<string>",
            "contractType": "<string>",
            "contractVersion": 2,
            "error": "<string>",
            "processedAt": "2023-11-07T05:31:56Z",
            "deliveredAt": "2023-11-07T05:31:56Z",
            "createdAt": "2023-11-07T05:31:56Z",
            "notificationCount": 1,
            "referencedCandidateCount": 1,
            "referencedCandidateIds": [
              "<string>"
            ],
            "titles": [
              "<string>"
            ],
            "markdownPreviews": [
              "<string>"
            ],
            "deliverySummary": "<string>",
            "actions": [
              {
                "id": "<string>",
                "label": "<string>",
                "url": "<string>"
              }
            ]
          }
        ],
        "toolCalls": [
          {
            "id": "<string>",
            "toolName": "<string>",
            "error": "<string>",
            "startedAt": "2023-11-07T05:31:56Z",
            "endedAt": "2023-11-07T05:31:56Z",
            "latencyMs": 1,
            "inputSummary": "<string>",
            "outputSummary": "<string>"
          }
        ],
        "artifacts": [
          {
            "id": "<string>",
            "kind": "<string>",
            "mimeType": "<string>",
            "bodySizeBytes": 1,
            "redactionStatus": "<string>",
            "createdAt": "2023-11-07T05:31:56Z",
            "metadataSummary": "<string>"
          }
        ]
      }
    },
    "warnings": [
      "<string>"
    ],
    "auditId": "<string>"
  }
}
{
"error": "Invalid credentials"
}
{
"ok": true,
"commandId": "<string>",
"commandVersion": 2,
"error": {
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"details": {}
}
}
{
"ok": true,
"commandId": "<string>",
"commandVersion": 2,
"error": {
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"details": {}
}
}
{
"error": "Internal server error"
}
{
"ok": true,
"commandId": "<string>",
"commandVersion": 2,
"error": {
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"details": {}
}
}

Authorizations

Authorization
string
header
required

Outlit API key using the Bearer ok_... format.

Path Parameters

agentId
string
required

Agent ID.

Minimum string length: 1
runId
string
required

Agent run database ID or public run ID.

Minimum string length: 1

Response

Agent run details were returned.

ok
boolean
required
commandId
string
required
Allowed value: "agent.run.get"
commandVersion
integer
required
correlationId
string
required
result
object
required