# Computer Control API SUMMARY: Remote control of registered computers — queue commands, take screenshots, run scripts on remote machines. KEY CONTEXT: Two sides: user-facing (Mind Key/JWT) and agent-facing (Computer Token) Register agent: POST /computers/register { install_code } → returns computer_token List: GET /computers/list (Mind Key or JWT) Queue command: POST /computers/:id/commands { type, payload } Command types: screenshot, click, move, type, key, scroll, drag Agent poll: GET /computers/me/poll?wait=5 (Computer Token) Agent result: POST /computers/me/commands/:cid/result (Computer Token) One-shot screenshot: GET /computers/:id/screenshot (waits 30s for result) Pattern: register agent on remote machine → user queues commands → agent polls and executes Computer Control API The Computer Control API lets you remote-control registered computers. A small agent () runs on the target machine, polls for commands, executes them, and posts results back. This enables LLM-driven GUI automation. Architecture [CODE BLOCK] User-Facing Endpoints (Mind Key or JWT) GET /computers/list List all registered computers. [CODE BLOCK] GET /computers/:id Get details of a single computer. [CODE BLOCK] POST /computers/install-code Generate an install code for registering a new computer. [CODE BLOCK] Response: POST /computers/:id/commands Queue a command for the remote agent to execute. [CODE BLOCK] Response: GET /computers/:id/command (via query) Queue a command via GET (for simple cases). [CODE BLOCK] GET /computers/:id/commands List recent commands for a computer. [CODE BLOCK] GET /computers/:id/commands/:cid Get status + result of a specific command. [CODE BLOCK] GET /computers/:id/screenshot One-shot: queue a screenshot command and wait up to 30s for the result. [CODE BLOCK] POST /computers/:id/disable Disable a computer (revokes its token, keeps the record for audit). [CODE BLOCK] DELETE /computers/:id Delete a computer permanently. [CODE BLOCK] Agent-Facing Endpoints (Computer Token) These endpoints are used by the running on the target machine. They use a Computer Token (returned by ), not a Mind Key. POST /computers/register Redeem an install code and get a Computer Token. [CODE BLOCK] Response: > [!CRITICAL] > Save the — it's shown only once and is required for all > agent-side endpoints. GET /computers/me/poll Long-poll for new commands. The agent calls this in a loop. [CODE BLOCK] Returns immediately if commands are pending, or after seconds if not. POST /computers/me/commands/:cid/result Post the result of executing a command. [CODE BLOCK] Command Types | Type | Payload | Description | |------|---------|-------------| | | | Capture screen as PNG (base64) | | | | Click at coordinates | | | | Move mouse to coordinates | | | | Type text at cursor | | | | Press key combo | | | | Scroll wheel | | | | Drag and drop | Common Pattern: LLM-Driven GUI Automation [CODE BLOCK] Next Steps - Browser Proxy — separate service for browser automation - Self-Hosted Agents Guide