Retrieve an agent
curl --request GET \
--url https://agp.eu.hcompany.ai/api/v2/agents/{agent_name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}', 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://agp.eu.hcompany.ai/api/v2/agents/{agent_name}",
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://agp.eu.hcompany.ai/api/v2/agents/{agent_name}"
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://agp.eu.hcompany.ai/api/v2/agents/{agent_name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}")
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{
"name": "<string>",
"description": "<string>",
"environments": [
{}
],
"model": {},
"reasoning_effort": {},
"instructions": {},
"subagents": {},
"skills": {},
"answer_format": {},
"tools": {}
}Agents
Retrieve an agent
Get the full specification of a single agent by name, including pre-built h/ agents.
GET
/
api
/
v2
/
agents
/
{agent_name}
Retrieve an agent
curl --request GET \
--url https://agp.eu.hcompany.ai/api/v2/agents/{agent_name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}', 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://agp.eu.hcompany.ai/api/v2/agents/{agent_name}",
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://agp.eu.hcompany.ai/api/v2/agents/{agent_name}"
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://agp.eu.hcompany.ai/api/v2/agents/{agent_name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}")
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{
"name": "<string>",
"description": "<string>",
"environments": [
{}
],
"model": {},
"reasoning_effort": {},
"instructions": {},
"subagents": {},
"skills": {},
"answer_format": {},
"tools": {}
}Retrieves one agent’s full specification, including pre-built
h/ agents.
Returns the agent object.
Path parameters
string
required
The agent’s
name (e.g. h/web-surfer-flash or my-custom-bot). Slash-containing names are supported.Query parameters
integer
Read this revision instead of the latest. List them with List revisions.
boolean
default:"false"
When
true, string references in environments, skills, and subagents are expanded into their full specs. When false, they are returned as stored.Response
The agent object, also returned by create, list, update, and patch. Field constraints are on Create an agent. TheETag response header holds the revision you read, for example "3". Send it back as If-Match to update only if nobody changed the agent since. A resolve=true read has no ETag, since it also reflects the environments, skills, and subagents it expands.
string
Catalog identifier.
h/ names are H’s reserved, read-only agents.string
What the agent does.
array
Catalog id strings or inline environment specs.
string | null
Holo model id.
null uses the default, holo4-27b.string | null
disabled, low, medium, or xhigh. null uses the model’s default.string | null
Steering text appended to the system prompt.
array | null
Agents this one can delegate to: catalog names or inline agent specs.
array | null
Catalog skill names or inline skill specs.
object | null
JSON Schema of the final answer.
null returns free-form text.object[] | null
Custom tools executed by your code.
Examples
curl "https://agp.eu.hcompany.ai/api/v2/agents/h/web-surfer-flash" \
-H "Authorization: Bearer $HAI_API_KEY"
from hai_agents import Client
client = Client()
agent = client.agents.get_agent(agent_name="h/web-surfer-flash")
print(agent.description, agent.skills)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const agent = await client.agents.getAgent({ agentName: "h/web-surfer-flash" });
console.log(agent.description, agent.skills);
Response
{
"name": "h/web-surfer-flash",
"description": "Visual web agent for interactive or visually rendered pages.",
"environments": ["h/browser"],
"model": "holo4-35b-a3b",
"reasoning_effort": null,
"instructions": null,
"subagents": null,
"skills": ["h/company", "h/user-collaboration", "h/answering", "h/planning"],
"answer_format": null,
"tools": null
}
Errors
| Status | Cause |
|---|---|
404 | Agent not found, no such revision, or you don’t have access (e.g. another organization’s custom agent). |
Was this page helpful?