Skip to main content
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>'
Retrieves the complete Agent object, including its full specification: environments, skills, instructions, and subagent configuration. Returns the Agent object if the name is valid and you have access. Returns 404 otherwise.

Path parameters

agent_name
string
required
The agent’s name (e.g., h/web or my-custom-bot). Slash-containing names are supported.

Query parameters

resolve
boolean
default:"false"
When true, string references in environments, skills, and subagents are expanded into their full specs in the response. When false (the default), they are returned as stored, keeping catalog ids as plain strings.

Examples

Retrieve an H catalog agent

curl "https://agp.eu.hcompany.ai/api/v2/agents/h/web-surfer-flash" \
  -H "Authorization: Bearer $HAI_API_KEY"
Response
{
  "name": "h/web-surfer-flash",
  "description": "General-purpose web browsing agent. Navigates websites, extracts information, fills forms, and completes multi-step web tasks.",
  "environments": [
    { "id": "h/browser", "kind": "web", "width": 1280, "height": 720, "start_url": "https://www.bing.com" }
  ],
  "model": null,
  "instructions": null,
  "skills": ["web-browse", "screenshot", "form-fill", "extract-data"],
  "subagents": null,
  "answer_format": null
}

Retrieve a custom agent

curl "https://agp.eu.hcompany.ai/api/v2/agents/price-checker" \
  -H "Authorization: Bearer $HAI_API_KEY"

Use case: inspect before using

Before using an agent in a session, you can inspect its capabilities:
curl "https://agp.eu.hcompany.ai/api/v2/agents/$AGENT_NAME" \
  -H "Authorization: Bearer $HAI_API_KEY" \
  | jq '{name, description, environments, skills, subagents}'

Errors

StatusCause
404Agent not found, or you don’t have access (e.g., querying another team’s custom agent).