List agents, or get one agent
curl --request GET \
--url https://www.asteragents.com/api/agents \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.asteragents.com/api/agents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.asteragents.com/api/agents', 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://www.asteragents.com/api/agents",
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://www.asteragents.com/api/agents"
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://www.asteragents.com/api/agents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.asteragents.com/api/agents")
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[
{
"id": 1,
"name": "Customer Support Agent",
"description": "Handles customer inquiries",
"logoUrl": null,
"conversationStarters": [
"How can I help you today?",
"What issue are you experiencing?"
],
"model": "openai:gpt-4o",
"maxToolRoundtrips": 50,
"tools": {
"search_knowledge_base": {
"config": {
"accessibleKnowledgeBaseIds": [
12
]
}
},
"ask_web": {}
},
"mcpServers": null,
"stage": "released",
"showInChat": true,
"emailSlug": "support-bot",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-20T14:00:00.000Z",
"tags": [
{
"id": 1,
"name": "Production"
}
]
}
]Agents API
List agents, or get one agent
Retrieve all agents in the authenticated user’s organization, sorted alphabetically by name, with their tags.
The list leaves out each agent’s systemPrompt, and gives each tool only its config
(an empty object when it has none), not its full definition. Pass id to get one agent
with its system prompt and full tool definitions.
GET
/
agents
List agents, or get one agent
curl --request GET \
--url https://www.asteragents.com/api/agents \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.asteragents.com/api/agents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.asteragents.com/api/agents', 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://www.asteragents.com/api/agents",
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://www.asteragents.com/api/agents"
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://www.asteragents.com/api/agents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.asteragents.com/api/agents")
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[
{
"id": 1,
"name": "Customer Support Agent",
"description": "Handles customer inquiries",
"logoUrl": null,
"conversationStarters": [
"How can I help you today?",
"What issue are you experiencing?"
],
"model": "openai:gpt-4o",
"maxToolRoundtrips": 50,
"tools": {
"search_knowledge_base": {
"config": {
"accessibleKnowledgeBaseIds": [
12
]
}
},
"ask_web": {}
},
"mcpServers": null,
"stage": "released",
"showInChat": true,
"emailSlug": "support-bot",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-20T14:00:00.000Z",
"tags": [
{
"id": 1,
"name": "Production"
}
]
}
]Authorizations
Query Parameters
Response
The list of agents, or with id, the one agent (an object, not an array)
- object[]
- object