Agents
List agent definitions
List all agent definitions for the authenticated user’s account. Includes run statistics (last run, tasks completed, success rate). Default agents are seeded automatically on first call if none exist.
Permission: agents:read (Pro plan and above)
GET
/
api
/
agents
List agent definitions
curl --request GET \
--url https://app.dacard.ai/api/agents \
--cookie __session=import requests
url = "https://app.dacard.ai/api/agents"
headers = {"cookie": "__session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: '__session='}};
fetch('https://app.dacard.ai/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://app.dacard.ai/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_COOKIE => "__session=",
]);
$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.dacard.ai/api/agents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "__session=")
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.dacard.ai/api/agents")
.header("cookie", "__session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dacard.ai/api/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = '__session='
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentType": "strategic_intelligence",
"name": "<string>",
"description": "<string>",
"status": "active",
"config": {
"schedule": "<string>",
"notifySlack": true,
"productIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"lastRunAt": "2023-11-07T05:31:56Z",
"lastRunStatus": "completed",
"totalRuns": 123,
"successRate": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Authorizations
clerkAuthbearerAuth
Clerk session cookie. Authentication is handled by Clerk. Sign in at https://app.dacard.ai/sign-in to obtain a session.
Response
List of agent definitions
Show child attributes
Show child attributes
Was this page helpful?
⌘I
List agent definitions
curl --request GET \
--url https://app.dacard.ai/api/agents \
--cookie __session=import requests
url = "https://app.dacard.ai/api/agents"
headers = {"cookie": "__session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: '__session='}};
fetch('https://app.dacard.ai/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://app.dacard.ai/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_COOKIE => "__session=",
]);
$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.dacard.ai/api/agents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "__session=")
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.dacard.ai/api/agents")
.header("cookie", "__session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dacard.ai/api/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = '__session='
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentType": "strategic_intelligence",
"name": "<string>",
"description": "<string>",
"status": "active",
"config": {
"schedule": "<string>",
"notifySlack": true,
"productIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"lastRunAt": "2023-11-07T05:31:56Z",
"lastRunStatus": "completed",
"totalRuns": 123,
"successRate": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}