Skip to main content
GET
/
v1
/
agents
/
{agent_id}
Get Agent
curl --request GET \
  --url https://api.xpander.ai/v1/agents/{agent_id} \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api.xpander.ai/v1/agents/{agent_id}"

headers = {"x-api-key": "<api-key>"}

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

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://api.xpander.ai/v1/agents/{agent_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://api.xpander.ai/v1/agents/{agent_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 => [
"x-api-key: <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://api.xpander.ai/v1/agents/{agent_id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<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://api.xpander.ai/v1/agents/{agent_id}")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.xpander.ai/v1/agents/{agent_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "name": "<string>",
  "id": "<string>",
  "description": "<string>",
  "icon": "<string>",
  "model_provider": "<string>",
  "model_name": "<string>",
  "instructions": {
    "role": [],
    "goal": [],
    "general": ""
  },
  "knowledge_base_ids": [],
  "source_node_types": [],
  "tools": [],
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "created_by_details": {
    "id": "<string>",
    "name": "<string>",
    "email": "<string>"
  }
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
Returns a simplified agent view. Instead of the low-level graph, attached_tools, oas, and fully-resolved tool schemas, the agent’s tools are surfaced as one flat tools array (see the AgentTool shape below). Use the Tools API to add or remove tools.

Path Parameters

agent_id
string
required
Unique identifier of the agent (UUID format)

Response

id
string
Agent UUID
name
string
Display name
description
string
What the agent does (auto-generated on deploy from instructions)
icon
string
Emoji icon (e.g., 🚀)
type
string
Agent type (e.g., regular, manager)
status
string
ACTIVE (deployed) or INACTIVE
model_provider
string
LLM provider (e.g., anthropic)
model_name
string
LLM model (e.g., claude-sonnet-4-6)
instructions
object
knowledge_base_ids
string[]
IDs of attached knowledge bases
source_node_types
string[]
Trigger source types (e.g., sdk, webhook, slack)
tools
array
The agent’s attached tools, unified across kinds. Each item is an AgentTool:
created_at
string
ISO 8601 creation timestamp
created_by
string | null
UUID of the creating user
created_by_details
object | null
Resolved creator details (null when unavailable — null-check before reading).

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

agent_id
string
required

Response

Successful Response

Lean agent view exposing tools as one simple list, hiding low-level graph/oas internals.

name
string
required

Agent name.

id
string | null

Agent id.

description
string | null

Agent description.

icon
string | null

Agent icon.

type
enum<string> | null

Agent type.

Available options:
manager,
regular,
a2a,
curl,
orchestration
status
enum<string> | null

Agent status.

Available options:
DRAFT,
ACTIVE,
INACTIVE
model_provider
string | null

LLM provider.

model_name
string | null

LLM model.

instructions
AIAgentInstructions · object | null

Agent instructions.

knowledge_base_ids
string[] | null

Attached knowledge base ids.

source_node_types
string[] | null

Trigger source types (sdk, webhook, slack, ...).

tools
AgentTool · object[]

Tools attached to this agent.

created_at
string<date-time> | null

Creation timestamp.

created_by
string | null

Creator user id.

created_by_details
CreatedByDetails · object | null

Creator details.