Skip to content

Local API

The standalone daemon exposes a REST API and WebSocket at http://localhost:3847.

REST Endpoints

Get Status

http
GET /api/v1/status

Returns daemon status, connected IDEs, and system info.

List Connected IDEs

http
GET /api/v1/ides

List CLI Sessions

http
GET /api/v1/clis

Send Command

http
POST /api/v1/command
Content-Type: application/json

{
  "type": "send_chat",
  "target": "standalone:ide:cursor_12345",
  "payload": {
    "message": "Fix the login bug"
  }
}

Available Command Types

CommandDescription
send_chatSend a message to the AI agent
read_chatRead current chat messages
screenshotCapture IDE screenshot
list_chatsList available chat sessions
new_chatStart a new chat session
switch_chatSwitch to a different chat
set_modeChange agent mode
change_modelSwitch AI model

WebSocket

Connect to ws://localhost:3847/ws for real-time updates:

javascript
const ws = new WebSocket('ws://localhost:3847/ws');
ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log('Update:', data);
};

Authentication

By default, the local API has no authentication. To enable:

bash
npx @adhdev/daemon-standalone --token mysecret

Then include the token in requests:

bash
curl -H "Authorization: Bearer mysecret" \
     http://localhost:3847/api/v1/status

Released under the AGPL-3.0 License (OSS) / Proprietary (Cloud)