@msisside01/dashio-agent
v1.0.1
Published
Dashio Agent - Bridge between OpenClaw nodes and Dashio Dashboard
Maintainers
Readme
Dashio Agent
A lightweight Node.js agent that runs on OpenClaw nodes and connects to the Dashio Dashboard via WebSocket.
Features
- 🔌 Self-registration - One-command installation with invite token
- 🔄 Auto-reconnect - Exponential backoff on connection loss
- 📊 Data collection - Reads OpenClaw SQLite DB, system metrics, gateway status
- 📜 Log streaming - Real-time log forwarding from files and journalctl
- 🎮 Remote control - Execute commands from dashboard (start/stop agents, install skills)
- 🏥 Health checks - Local HTTP endpoint for monitoring
- 🔒 Secure - Token-based auth, command whitelist, no arbitrary execution
Installation
Prerequisites
- Node.js 22+ (LTS)
- Linux system with systemd (Ubuntu 20.04+, Debian 11+, Raspberry Pi OS)
- OpenClaw installed (optional - agent works without it)
Via NPM (GitLab Package Registry)
# Configure GitLab registry auth
npm config set @msisside01:registry https://gitlab.com/api/v4/projects/msisside01%2Fdashio/packages/npm/
npm config set //gitlab.com/api/v4/projects/msisside01%2Fdashio/packages/npm/:_authToken=YOUR_GITLAB_TOKEN
# Install globally
npm install -g @msisside01/dashio-agent
# Run agent
dashio-agent --register \
--dashboard-url https://dashio.example.com \
--token inv_xxxxxxxxxxxxxxxx \
--name "My Node"One-Command Install
curl -fsSL https://your-dashio-url/install-agent.sh | bash -s -- \
--dashboard-url https://dashio.example.com \
--token inv_xxxxxxxxxxxxxxxx \
--name "My Node"Manual Install
# Clone and build
git clone https://github.com/your-org/dashio-agent.git
cd dashio-agent
npm install
npm run build
# Register with dashboard
node dist/index.js --register \
--dashboard-url https://dashio.example.com \
--token inv_xxxxxxxxxxxxxxxx \
--name "My Node"
# Install systemd service
sudo cp install/dashio-agent.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable dashio-agent
sudo systemctl start dashio-agentUsage
CLI Options
dashio-agent [options]
Options:
--register Register this node with the Dashio Dashboard
--dashboard-url <url> Dashboard URL (required for --register)
--token <token> Invite token (required for --register)
--name <name> Node name (optional, defaults to hostname)
--force Force re-registration
--help, -h Show help messageEnvironment Variables
DASHIO_LOG_LEVEL- Log level (debug, info, warn, error) - default: infoDASHIO_HEALTH_PORT- Health check port - default: 19999DASHIO_OPENCLAW_BIN- Override OpenClaw binary pathDASHIO_OPENCLAW_DB- Override OpenClaw database pathDASHIO_OPENCLAW_LOGS- Override OpenClaw logs path
Health Check
# Check agent status
curl http://localhost:19999/health
# View logs
sudo journalctl -u dashio-agent -f
# Check service status
sudo systemctl status dashio-agentArchitecture
Node Machine Dashio Dashboard
┌─────────────────┐ ┌──────────────────┐
│ OpenClaw │ │ │
│ Gateway :18789 │◄────────────│ Dashio Agent │
│ SQLite DB │ WebSocket │ (Node.js) │
└─────────────────┘ (outbound) │ │
└──────────────────┘The agent:
- Registers with dashboard via HTTP POST
- Opens persistent WebSocket connection
- Streams data (agents, sessions, metrics, logs)
- Executes commands from dashboard
- Auto-reconnects on disconnect
WebSocket Protocol
Agent → Dashboard
heartbeat- Every 10 secondssnapshot- Full state every 60 secondsupdate- Incremental changeslog- Real-time log linesmetrics- System metrics every 30 secondscommand_result- Command responses
Dashboard → Agent
ping- Connection testgateway_start/stop/restart- Control OpenClaw gatewayagent_start/stop/restart- Control agentsskill_install/remove- Manage skillsmessage_send- Send messagesconfig_read- Read configuration
Development
# Install dependencies
npm install
# Run type check
npm run typecheck
# Build
npm run build
# Run locally
npm run devLicense
MIT
