The host
The host is the program that gives the workbench this computer's files and the machines attached to it. There is exactly one host per computer. The desktop app is a host; so is the background service, started with commandagi daemon start. When the desktop app starts, it takes over from a running service.
The host listens on 127.0.0.1 only (port 4173 by default, or any free port), and keeps its state in ~/.commandagi:
| file | what it holds |
|---|---|
host.json | the account this host is linked to, its id and its link settings (owner-only) |
grants.json | the standing grants made on this host (owner-only) |
principals.json | hashes of principals' credentials and the trusted account keys (owner-only) |
mcp.json | the local MCP endpoint and its per-launch token (owner-only) |
daemon.json | which process is hosting, on which port |
settings.json, recents.json, devices/, worlds/ | your user-level settings and definitions |
daemon.log | the host's log |
Available today: the host ships inside the desktop app. The host's own command line — commandagi daemon, grant, mcp — is documented here as it is built, but it is not yet published as an installable package. (The commandagi package on npm today is the SDK's command line; see SDK and MCP.)
The commandagi command
commandagi daemon start [--port N] [--project DIR] [--name X] [--no-platform]
commandagi daemon status | stop | logs
commandagi daemon run [same flags, in the foreground]
commandagi mcp [--credential-file F]
commandagi grant add | list | revoke …
commandagi threed install | status
commandagi code eval <path> [--input name=value]…daemon startruns the host in the background and logs to~/.commandagi/daemon.log.--no-platformhosts locally without linking to an account.daemon stoprefuses while the desktop app is the host — quit it from the app instead.mcpis the stdio relay for agents (see SDK and MCP).grantmakes and revokes standing grants (see Agents and standing grants).threedinstalls the local 3D design service;code evalevaluates a code part headlessly and prints its operation graph as JSON.
Link the host to your account
A host linked to an account can be reached from that account's workbench anywhere, and acts as that account. Linking is signing in:
- in the desktop app, sign in when it asks;
- at the workbench page served by the host, sign in from the left dock — the host checks the key and keeps it;
- from a shell, set
COMMANDAGI_API_KEYto an API key before starting the daemon.
The account key is kept in host.json, an owner-only plain file, so a copied ~/.commandagi stays signed in. Signing out removes it.
Pair hosts with each other
Hosts on different computers can pair, both ways, in one act: one host offers, the other accepts. Pairing is always a person's decision. Once paired, agents can list the other hosts and call them — within whatever grants exist there.
Page drivers: USB and Bluetooth from the browser
Some drivers run in the workbench page itself, using WebSerial and Web Bluetooth. A browser opens a port only when you pick it, so an agent always uses a connection a person made and never opens one on its own. Network machines (a printer's HTTP API, a FluidNC controller on TCP) are driven by the host.
Drivers that listen for machines dialling in over the LAN need the setting "devices.lanListener": true.
Driver catalog
Every driver says what it has been verified against: none, loopback (against a faithful software fake of the protocol), bench or hardware. A driver never claims more than was done. No machine has been commissioned on hardware yet.
| driver | machine and protocol | runs in | verified |
|---|---|---|---|
grbl-serial | GRBL 1.1, USB serial | page | loopback |
grbl-tcp | FluidNC / grblHAL, telnet (TCP 23) | host | loopback |
marlin-serial | Marlin, USB serial | page | loopback |
smoothie-serial | Smoothieware, USB serial | page | loopback |
linuxcnc-rsh | LinuxCNC 2.9 linuxcncrsh (TCP 5007) | host | loopback |
octoprint-http | OctoPrint 1.x | host | loopback |
moonraker-http | Klipper via Moonraker | host | loopback |
prusalink-http | PrusaLink | host | loopback |
repetier-http | Repetier-Server | host | loopback |
duet-http | Duet / RepRapFirmware 3.1+ | host | loopback |
feetech-sts-serial | Feetech STS/SCS servo bus (SO-100/101) | page | loopback |
dynamixel2-serial | Dynamixel Protocol 2.0 (Koch, WidowX) | page | loopback |
xarm-tcp | UFACTORY xArm / Lite 6 (TCP 502) | host | loopback |
host-relay | CommandAGI ESP32 arm, LAN HTTP | host | loopback |
wifi8k-drone | WIFI_8K / E99 drone via an ESP32 link | page | loopback |
ble-hid-relay | BLE HID relay (ESP32) | page | loopback |
jpeg-push | network camera pushing JPEG (ESP32-CAM) | host | loopback |
openpnp-files | OpenPnP job hand-off (files) | host | loopback |
os-input | keyboard and pointer of this computer | host | loopback |
cdp-tab | a browser tab (Chrome DevTools Protocol) | host | loopback |
cdp-screencast | a browser tab's video | host | loopback |
pty-shell | a shell on this computer | host | loopback |
python-kernel | a Python kernel (notebooks) | host | loopback |
display-capture | screen capture | page | none |
uvc-camera | USB camera | page | none |
microphone | microphone | page | none |
Simulation worlds use two simulators instead: gcode-sim for G-code channels and servo-sim for servo buses.
Next
Give an agent authority over a machine: Agents and standing grants.