Get an agent
curl --request GET \
--url https://agents.nanonets.com/api/v1/agents/{agent_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents.nanonets.com/api/v1/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://agents.nanonets.com/api/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://agents.nanonets.com/api/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 => [
"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://agents.nanonets.com/api/v1/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://agents.nanonets.com/api/v1/agents/{agent_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agents.nanonets.com/api/v1/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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123,
"status": "draft",
"name": "<string>",
"config": {},
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}Agents
Get agent
GET
/
api
/
v1
/
agents
/
{agent_id}
Get an agent
curl --request GET \
--url https://agents.nanonets.com/api/v1/agents/{agent_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents.nanonets.com/api/v1/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://agents.nanonets.com/api/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://agents.nanonets.com/api/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 => [
"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://agents.nanonets.com/api/v1/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://agents.nanonets.com/api/v1/agents/{agent_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agents.nanonets.com/api/v1/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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123,
"status": "draft",
"name": "<string>",
"config": {},
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}{
"error": "Invalid agent_id format"
}Authorizations
Workspace API key issued from the web app. Pass as
Authorization: Bearer YOUR_API_KEY.
Path Parameters
UUID of the agent.
Response
Agent details.
Full agent representation.
ID of this specific version of the agent.
Stable identifier across all versions of this agent. Use this when you need to refer to "the agent" as a logical entity rather than a specific version.
Sequential version number (1, 2, 3 …) within this agent group.
Lifecycle status of an agent version.
draft— work-in-progress, not yet runnable for end userspublished— live, runnablearchived— superseded by a newer version
Available options:
draft, published, archived Full agent configuration object. Free-form JSON — common keys include
system_prompt, tools, states, milestones, model. Treat unknown
keys as opaque.
Whether this agent can be run. Inactive agents reject runs with 403.