This guide gets a local development stack running.
- Node.js 20+
- pnpm 9+
- Go 1.22+ (for agentd)
- PostgreSQL 15+
- tmux
pnpm installCopy the example env files and edit values:
cp services/control-plane/.env.example services/control-plane/.env
cp apps/dashboard/.env.example apps/dashboard/.envAt minimum, set:
DATABASE_URLJWT_SECRET(control plane)CONTROL_PLANE_JWT_SECRET(dashboard, must matchJWT_SECRET)NEXTAUTH_URLandNEXTAUTH_SECRET
pnpm db:migrateOption A: run everything with Turbo
pnpm devOption B: run services individually
pnpm --filter @agent-command/control-plane dev
pnpm --filter @agent-command/dashboard devVisit http://localhost:3000.
Host creation is an admin action. The control plane expects a short lived JWT
minted by the dashboard. After signing into the dashboard, request a token from
/api/control-plane-token and use it as the Authorization: Bearer value.
Create a host + token (admin role required):
curl -X POST http://localhost:8080/v1/hosts \
-H "Authorization: Bearer <control-plane-jwt>" \
-H "Content-Type: application/json" \
-d '{"name":"devbox"}'The response includes a host token (starts with ac_agent_...).
See agentd for full setup. The short version:
cd agents/agentd
go build -o agentd ./cmd/agentd
sudo cp agentd /usr/local/bin/
sudo mkdir -p /etc/agentd
sudo cp agents/agentd/config.example.yaml /etc/agentd/config.yaml
# edit /etc/agentd/config.yaml with your host id + token
sudo systemctl enable --now agentdOnce agentd connects, the host and tmux sessions appear in the dashboard.