Skip to content

Agents API

All agent endpoints require admin authentication.

GET /api/agents admin
List all agents across the cluster. Returns array of agent info objects with name, status, and readiness.

Response:

[
{
"name": "my-agent",
"namespace": "agent-my-agent",
"ready": true,
"status": "Running",
"image": "ghcr.io/manyclaws/agent:latest"
}
]
GET /api/agents/:name admin
Get detailed agent information including pods, resource quota, and health status.

Parameters:

  • name (path) — Agent name (e.g., my-agent)

Response:

{
"name": "my-agent",
"namespace": "agent-my-agent",
"ready": true,
"status": "Running",
"image": "ghcr.io/manyclaws/agent:latest",
"pods": [
{
"name": "openclaw-gateway-7d4f8b6c9-x2k4p",
"status": "Running",
"ready": true,
"restarts": 0,
"age": "14d"
}
],
"quota": {
"cpu": {"used": "250m", "hard": "4"},
"memory": {"used": "520Mi", "hard": "3Gi"},
"pods": {"used": "1", "hard": "10"}
}
}
POST /api/agents/:name/restart admin
Initiate a rolling restart of the agent's openclaw-gateway deployment.

Parameters:

  • name (path) — Agent name

Response:

{"ok": true, "message": "Agent my-agent restart initiated"}
GET /api/agents/:name/logs admin
SSE stream of the agent's pod logs (last 100 lines).

Parameters:

  • name (path) — Agent name

Response: Server-Sent Events stream:

data: {"line": "ManyClaws Agent Gateway started on port 18789"}
data: {"line": "[channel] Connected successfully"}
data: {"line": "[channel] Bot ready as YourAgent#0001"}