Skip to content

Agent API

API reference for the Minion Server. Base URL: http://localhost:3001

Authentication: Authorization: Bearer $API_TOKEN (required unless noted otherwise)

No authentication required.

MethodEndpointDescription
GET/api/healthHealth check ({status:'ok', timestamp})
GET/api/statusAgent state, uptime, version, HQ connection status
POST/api/statusUpdate status. Body: {status, current_task}
MethodEndpointDescription
GET/api/list-skillsList locally deployed skills
DELETE/api/skills/:nameDelete a local skill
POST/api/skills/push/:namePush a local skill to HQ
POST/api/skills/fetch/:nameFetch a skill from HQ and deploy locally
GET/api/skills/remoteList skills on HQ
MethodEndpointDescription
GET/api/workflowsList local workflows (includes next_run)
POST/api/workflowsReceive/upsert a workflow (from HQ or local)
POST/api/workflows/push/:namePush a local workflow to HQ
POST/api/workflows/fetch/:nameFetch a workflow from HQ (pipeline skills auto-fetched)
GET/api/workflows/remoteList workflows on HQ
DELETE/api/workflows/:idDelete a local workflow
POST/api/workflows/triggerManual trigger. Body: {workflow_id}
MethodEndpointDescription
GET/api/executionsExecution history (?limit=50, ?workflow_id=)
GET/api/executions/:idIndividual execution details
GET/api/executions/:id/logGet execution log (?tail=N)
POST/api/executions/:id/outcomeReport outcome (no auth required). Body: {outcome, summary?, details?}

Outcome values: success, failure, partial

MethodEndpointDescription
GET/api/terminal/sessionsList tmux sessions
POST/api/terminal/sendSend keys. Body: {session, input?, enter?, special?}
POST/api/terminal/createCreate session. Body: {name?, command?}
POST/api/terminal/killKill session. Body: {session}
GET/api/terminal/captureCapture pane content. Query: ?session=&lines=100
GET/api/terminal/ttyd/statusttyd process status
POST/api/terminal/ttyd/startStart ttyd. Body: {session}
POST/api/terminal/ttyd/stopStop ttyd. Body: {session}
POST/api/terminal/ttyd/stop-allStop all ttyd processes

Files are stored under ~/files/. Maximum upload size: 50MB.

MethodEndpointDescription
GET/api/filesList files in directory. Query: ?path=subdir
GET/api/files/*Download file
POST/api/files/*Upload file (Content-Type: application/octet-stream)
DELETE/api/files/*Delete file or directory
MethodEndpointDescription
GET/api/commandsList available commands
POST/api/commandExecute command. Body: {command}

Available commands: restart-agent, update-agent, restart-display, status-services