List Agents
curl --request GET \
--url https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/agents \
--header 'apikey: <api-key>'import requests
url = "https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/agents"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/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://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/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 => [
"apikey: <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://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/agents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<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://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/agents")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"uid": "agent-uuid-1234",
"name": "Support Agent",
"icon": "https://example.com/icon.png",
"isActive": true,
"description": "A helpful support agent",
"tools": [
"gmail"
],
"files": [],
"websites": [],
"otherKbIntegrations": [],
"apiTools": [],
"mcpServers": [],
"frontendActions": [],
"ragVersion": "v2",
"lastMessageAt": null,
"instruction": "You are a helpful assistant",
"formattedInstruction": "You are a helpful assistant",
"metaData": {},
"model": "gpt-4o-mini",
"modelMetaData": {},
"createdAt": 1700000000000,
"updatedAt": 1700000000000
}
],
"meta": {
"previous": {
"affix": "prepend",
"createdAt": 1700000000000
},
"current": {
"limit": 10,
"count": 1
},
"next": {
"affix": "append",
"createdAt": 1700000000000
}
}
}Agents
List Agents
Retrieves a paginated list of agents for your CometChat app. Use this endpoint to browse, search, and manage your agents. Search: Use the search parameter to filter agents by name, description,
GET
/
ai-agents
/
agent-builder
/
agents
List Agents
curl --request GET \
--url https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/agents \
--header 'apikey: <api-key>'import requests
url = "https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/agents"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/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://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/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 => [
"apikey: <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://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/agents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<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://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/agents")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"uid": "agent-uuid-1234",
"name": "Support Agent",
"icon": "https://example.com/icon.png",
"isActive": true,
"description": "A helpful support agent",
"tools": [
"gmail"
],
"files": [],
"websites": [],
"otherKbIntegrations": [],
"apiTools": [],
"mcpServers": [],
"frontendActions": [],
"ragVersion": "v2",
"lastMessageAt": null,
"instruction": "You are a helpful assistant",
"formattedInstruction": "You are a helpful assistant",
"metaData": {},
"model": "gpt-4o-mini",
"modelMetaData": {},
"createdAt": 1700000000000,
"updatedAt": 1700000000000
}
],
"meta": {
"previous": {
"affix": "prepend",
"createdAt": 1700000000000
},
"current": {
"limit": 10,
"count": 1
},
"next": {
"affix": "append",
"createdAt": 1700000000000
}
}
}For the complete error reference, see Error Guide.
Authorizations
API Key (i.e. Rest API Key from the Dashboard).
Query Parameters
Maximum number of results to return per page.
To paginate over results, use the value of affix as prepend or append.
Available options:
prepend, append To be used with affix for pagination.
Search term to filter agents by name, description, or other fields
Was this page helpful?
⌘I