Agents API

REST endpoints for listing, creating, and executing agents

Agents API

Base URL: https://api.hardalion.com (platform keys) or https://nexus.hardalion.com (workspace keys on tenant routes).

All requests require:

Authorization: Bearer {api_key}
Content-Type: application/json

Platform keys: hdl_live_… / hdl_test_… from the Developer portal.

GET/api/v1/agents
GET /api/v1/agents?status=ACTIVE&limit=25
POST/api/v1/agents
{
  "name": "Ops Monitor",
  "description": "Watches queue depth and escalates anomalies",
  "systemPrompt": "You are an operations monitoring agent...",
  "model": "gpt-4o",
  "allowedTools": ["send_slack_message", "create_task"],
  "status": "ACTIVE"
}
POST/api/v1/agents/{id}/execute
{
  "userPrompt": "Check pending approvals and summarize blockers"
}

Policy BLOCK responses include audit metadata and a stable error code. This is not a generic model refusal.

Errors follow Stripe-style shape: { "error": { "code": "...", "message": "..." } }.