Get Agent By Id
curl --request GET \
--url https://api.neuralfactory.ai/agents/{agent_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.neuralfactory.ai/agents/{agent_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.neuralfactory.ai/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.neuralfactory.ai/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 => [
"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://api.neuralfactory.ai/agents/{agent_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://api.neuralfactory.ai/agents/{agent_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neuralfactory.ai/agents/{agent_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{
"title": "<string>",
"description": "<string>",
"knowledge_bases": [
"<string>"
],
"prompt": "<string>",
"model": "<string>",
"id": "<string>",
"tags": [],
"allowed_groups": [],
"allowed_user_ids": [],
"visibility": "private",
"strict_mode": false,
"strict_mode_message": "",
"show_citations": false,
"core_tools": [
"web_search",
"knowledge_search",
"code_execution",
"file_editor",
"browser_automation",
"browser_control",
"image_generation"
],
"toolkits": [],
"workflows": [],
"agent_type": "agent",
"subagents": [
"<string>"
],
"workflow_config": {},
"skills": [],
"guardrails": {
"scope": "",
"cite_sources": true,
"hand_off": "<string>",
"approval_before": "<string>",
"language": "match the question",
"knowledge_only": false
},
"metadata": {},
"knowledge_base_details": [],
"avatar": "",
"created_by": "<string>",
"created_by_email": "<string>",
"created_by_name": "<string>",
"is_favourite": false,
"current_version_number": 0,
"published_revision": 123,
"next_revision": 123,
"draft": {
"spec": {
"title": "<string>",
"description": "<string>",
"knowledge_bases": [
"<string>"
],
"prompt": "<string>",
"model": "<string>",
"tags": [],
"allowed_groups": [],
"allowed_user_ids": [],
"visibility": "private",
"strict_mode": false,
"strict_mode_message": "",
"show_citations": false,
"core_tools": [
"web_search",
"knowledge_search",
"code_execution",
"file_editor",
"browser_automation",
"browser_control",
"image_generation"
],
"toolkits": [],
"workflows": [],
"agent_type": "agent",
"subagents": [
"<string>"
],
"workflow_config": {},
"skills": [],
"guardrails": {
"scope": "",
"cite_sources": true,
"hand_off": "<string>",
"approval_before": "<string>",
"language": "match the question",
"knowledge_only": false
},
"metadata": {},
"rationale": {}
},
"revision": 123,
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
},
"has_draft": false,
"from_use_case": {
"id": "<string>",
"version": 123
},
"subagent_info": [
{
"name": "<string>",
"agent_type": "<string>",
"description": "<string>",
"capabilities": [
"<string>"
],
"status": "ready"
}
],
"subagent_details": [
{
"id": "<string>",
"title": "<string>",
"description": "",
"model": "",
"toolkits": [
{}
],
"avatar": ""
}
],
"skill_details": [
{
"id": "<string>",
"display_name": "<string>",
"name": "<string>",
"description": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Agents
Get Agent By Id
Get a single agent by its ID with knowledge base details.
API key permission: Agents (Admin also opens it).
GET
/
agents
/
{agent_id}
Get Agent By Id
curl --request GET \
--url https://api.neuralfactory.ai/agents/{agent_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.neuralfactory.ai/agents/{agent_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.neuralfactory.ai/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.neuralfactory.ai/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 => [
"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://api.neuralfactory.ai/agents/{agent_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://api.neuralfactory.ai/agents/{agent_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neuralfactory.ai/agents/{agent_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{
"title": "<string>",
"description": "<string>",
"knowledge_bases": [
"<string>"
],
"prompt": "<string>",
"model": "<string>",
"id": "<string>",
"tags": [],
"allowed_groups": [],
"allowed_user_ids": [],
"visibility": "private",
"strict_mode": false,
"strict_mode_message": "",
"show_citations": false,
"core_tools": [
"web_search",
"knowledge_search",
"code_execution",
"file_editor",
"browser_automation",
"browser_control",
"image_generation"
],
"toolkits": [],
"workflows": [],
"agent_type": "agent",
"subagents": [
"<string>"
],
"workflow_config": {},
"skills": [],
"guardrails": {
"scope": "",
"cite_sources": true,
"hand_off": "<string>",
"approval_before": "<string>",
"language": "match the question",
"knowledge_only": false
},
"metadata": {},
"knowledge_base_details": [],
"avatar": "",
"created_by": "<string>",
"created_by_email": "<string>",
"created_by_name": "<string>",
"is_favourite": false,
"current_version_number": 0,
"published_revision": 123,
"next_revision": 123,
"draft": {
"spec": {
"title": "<string>",
"description": "<string>",
"knowledge_bases": [
"<string>"
],
"prompt": "<string>",
"model": "<string>",
"tags": [],
"allowed_groups": [],
"allowed_user_ids": [],
"visibility": "private",
"strict_mode": false,
"strict_mode_message": "",
"show_citations": false,
"core_tools": [
"web_search",
"knowledge_search",
"code_execution",
"file_editor",
"browser_automation",
"browser_control",
"image_generation"
],
"toolkits": [],
"workflows": [],
"agent_type": "agent",
"subagents": [
"<string>"
],
"workflow_config": {},
"skills": [],
"guardrails": {
"scope": "",
"cite_sources": true,
"hand_off": "<string>",
"approval_before": "<string>",
"language": "match the question",
"knowledge_only": false
},
"metadata": {},
"rationale": {}
},
"revision": 123,
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
},
"has_draft": false,
"from_use_case": {
"id": "<string>",
"version": 123
},
"subagent_info": [
{
"name": "<string>",
"agent_type": "<string>",
"description": "<string>",
"capabilities": [
"<string>"
],
"status": "ready"
}
],
"subagent_details": [
{
"id": "<string>",
"title": "<string>",
"description": "",
"model": "",
"toolkits": [
{}
],
"avatar": ""
}
],
"skill_details": [
{
"id": "<string>",
"display_name": "<string>",
"name": "<string>",
"description": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Query Parameters
Response
Successful Response