Getting Started
King AI connects a remote runtime server to local agent engines on your machine. Pair once, keep Claude Code or Codex signed in locally, then run the computer daemon whenever you want agents to work.
Prerequisites
- Node.js 20 or newer.
pnpmfor development commands and one-offdlxruns.- At least one supported local engine installed and authenticated:
claudeorcodex. - Access to the King AI GUI at
https://king-ai.congrongtech.cn.
Check Local Engines
Run the doctor before pairing. It checks PATH, engine availability, and whether the local engines can serve both big-brain and small-brain requests.
pnpm dlx @suwujs/king-ai@latest agent computer --doctorFor source checkout development:
pnpm install
pnpm dev -- agent computer --doctorPair This Computer
Open the GUI, copy the first-time pairing command, and run it on the machine that will host local agents. New pairing links use the king-ai://pair?... format and include the server and tenant information when needed.
pnpm dlx @suwujs/king-ai@latest agent computer --pair 'king-ai://pair?...'If the GUI gives you only a short code, use the production default:
pnpm dlx @suwujs/king-ai@latest agent computer --pair <code>Use --server <url> only for local development or a separate deployment.
The CLI writes the pairing config to ~/.king-ai/computer.json and keeps token-bearing files in the King AI home on this machine.
Start The Daemon
After pairing, start the daemon in the foreground:
pnpm dlx @suwujs/king-ai@latest agent computerUseful service commands:
pnpm dlx @suwujs/king-ai@latest agent computer --install-service
pnpm dlx @suwujs/king-ai@latest agent computer --status
pnpm dlx @suwujs/king-ai@latest agent computer --logsDevelop From This Repository
Run the source CLI through the root dev script:
pnpm dev -- agent computer --pair <code> --server http://127.0.0.1:8787
pnpm dev -- agent computer --server http://127.0.0.1:8787Run the documentation site locally:
pnpm docs:dev