reference

REST API

HTTP endpoints for the Ninetrix local API server.

The local API server runs at http://localhost:8000. All endpoints require Authorization: Bearer <token> using your machine secret from ~/.agentfile/.api-secret.

Threads

MethodPathDescription
GET/threadsList all threads — latest checkpoint per thread
GET/threads/{thread_id}Full thread detail with extracted logs
GET/threads/{thread_id}/checkpointsAll checkpoints ordered by step

Approvals

MethodPathDescription
GET/approvalsList pending HITL approvals
POST/approvals/{trace_id}/{step}/approveApprove a pending tool call
POST/approvals/{trace_id}/{step}/rejectReject a pending tool call

Runner events

MethodPathDescription
POST/internal/v1/runners/eventsAgent telemetry — batch of runner events
GET/v1/runners/threads/{thread_id}/latestFetch the latest checkpoint for a thread — used by agents on restart to resume from the last saved state

Channels

Channels connect inbound messaging platforms (Telegram, WhatsApp) to running agents. All /v1/channels/* endpoints require Authorization: Bearer <token> except the public webhook receiver.

MethodPathDescription
GET/v1/channelsList all configured channels
POST/v1/channelsCreate a channel (channel_type, name, config, session_mode, routing_mode)
GET/v1/channels/{id}Get channel details including bound agents
PATCH/v1/channels/{id}Update name, session_mode, routing_mode, or enabled
DELETE/v1/channels/{id}Remove a channel
POST/v1/channels/{id}/agentsBind an agent to a channel (agent_name, is_default, command)
DELETE/v1/channels/{id}/agents/{name}Unbind an agent from a channel
POST/v1/channels/{id}/setup-webhookRegister the webhook URL with the messaging platform. Body: {"base_url": "https://your-public-url"}.
POST/v1/channels/{id}/verifyVerify channel ownership with the 6-digit code. Body: {"code": "123456"}.
POST/v1/channels/webhook/telegramPublic — Telegram Bot API webhook receiver. No auth required. Dispatches inbound messages to bound agents.

Health

Bash
curl http://localhost:8000/health
# {"status": "ok", "version": "..."}
On this page