Get agent
curl --request GET \
--url https://app.outlit.ai/api/agents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.outlit.ai/api/agents/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.outlit.ai/api/agents/{id}")
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": {
"agent": {
"id": "<string>",
"agentKey": "<string>",
"displayName": "<string>",
"templateVersion": "<string>",
"actionKeys": [
"<string>"
],
"schedule": {
"enabled": true,
"nextRunAt": "2023-11-07T05:31:56Z",
"lastRunAt": "2023-11-07T05:31:56Z",
"lastSuccessfulRunAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"destinationSummary": {
"destinations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "<string>",
"channelId": "<string>",
"label": "<string>",
"isDefault": true
}
],
"label": "<string>",
"count": 1,
"missing": true
},
"automationSummary": {
"activeCount": 1,
"totalCount": 1,
"nextRunAt": "2023-11-07T05:31:56Z",
"primaryDestinationLabel": "<string>"
},
"automations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"enabled": true,
"conditionLabel": "<string>",
"audienceLabel": "<string>",
"destinationLabel": "<string>",
"destinationCount": 1,
"lastRunAt": "2023-11-07T05:31:56Z",
"nextRunAt": "2023-11-07T05:31:56Z"
}
],
"lastRun": {
"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
},
"outputs": [
{
"id": "<string>",
"deliveredAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
]
},
"recentRuns": [
{
"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
},
"outputs": [
{
"id": "<string>",
"deliveredAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}
],
"settings": {
"configSchemaKey": "<string>",
"configSchemaVersion": 2,
"custom": {
"instructions": "<string>",
"maxItemsToSurface": 25
}
}
}
},
"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": {}
}
}Platform API
Get agent
Get one configured Outlit agent by id. Read-only.
GET
/
api
/
agents
/
{id}
Get agent
curl --request GET \
--url https://app.outlit.ai/api/agents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.outlit.ai/api/agents/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.outlit.ai/api/agents/{id}")
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": {
"agent": {
"id": "<string>",
"agentKey": "<string>",
"displayName": "<string>",
"templateVersion": "<string>",
"actionKeys": [
"<string>"
],
"schedule": {
"enabled": true,
"nextRunAt": "2023-11-07T05:31:56Z",
"lastRunAt": "2023-11-07T05:31:56Z",
"lastSuccessfulRunAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"destinationSummary": {
"destinations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "<string>",
"channelId": "<string>",
"label": "<string>",
"isDefault": true
}
],
"label": "<string>",
"count": 1,
"missing": true
},
"automationSummary": {
"activeCount": 1,
"totalCount": 1,
"nextRunAt": "2023-11-07T05:31:56Z",
"primaryDestinationLabel": "<string>"
},
"automations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"enabled": true,
"conditionLabel": "<string>",
"audienceLabel": "<string>",
"destinationLabel": "<string>",
"destinationCount": 1,
"lastRunAt": "2023-11-07T05:31:56Z",
"nextRunAt": "2023-11-07T05:31:56Z"
}
],
"lastRun": {
"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
},
"outputs": [
{
"id": "<string>",
"deliveredAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
]
},
"recentRuns": [
{
"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
},
"outputs": [
{
"id": "<string>",
"deliveredAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}
],
"settings": {
"configSchemaKey": "<string>",
"configSchemaVersion": 2,
"custom": {
"instructions": "<string>",
"maxItemsToSurface": 25
}
}
}
},
"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
Outlit API key using the Bearer ok_... format.
Path Parameters
Agent ID to fetch.
Minimum string length:
1Was this page helpful?
⌘I