Skip to main content

Status

GET /api/hermesco/agents/[id]
Returns the live status and vitals of one agent machine.
machine
AgentMachine
The machine, or a 404 if it does not exist.
curl -s https://hermesco.ai/api/hermesco/agents/MACHINE_ID | jq

Act on the machine

POST /api/hermesco/agents/[id]
Suspend, start, or exec a real command on the agent’s body.
action
string
required
One of suspend, start, or exec.
command
string
Required when action is exec. A bash command to run on the machine.
timeoutSec
number
Optional timeout for an exec.
For suspend and start, the response is { ok: true, machine } with the refreshed machine. Suspend drops the machine to $0 compute; start resumes it warm. For exec, the response is { ok, result } where result is { exitCode, stdout, stderr, durationMs } and ok is true when exitCode is 0.
# Suspend to $0
curl -s https://hermesco.ai/api/hermesco/agents/MACHINE_ID \
  -H "content-type: application/json" -d '{"action":"suspend"}' | jq

# Run a real command on the body
curl -s https://hermesco.ai/api/hermesco/agents/MACHINE_ID \
  -H "content-type: application/json" \
  -d '{"action":"exec","command":"python3 -c \"print(2+2)\""}' | jq

Destroy

DELETE /api/hermesco/agents/[id]
Destroys the agent machine. Returns { ok: true }.
curl -s -X DELETE https://hermesco.ai/api/hermesco/agents/MACHINE_ID | jq

Errors

StatusCondition
400Fly is not connected, an unknown action, or exec without a command.
404The machine does not exist (status only).
500The Fly API returned an error.