Agent monitoring and control interface for Even Realities G2 smart glasses, built on the Even Hub SDK.
Lineage: Built for Clawdbot (codename: Zoid), a personal AI agent system. Paths like
~/clawd/reflect that system layout.
- Dashboard — Running/total agent count and top agents with live status icons
- Agent Detail — Per-agent status, current task, and ASCII progress bar
- Notifications — Scrollable list of system notifications with priority icons
- Quick Reply — Predefined response options to send back to agents
- OpenClaw WebSocket client — Auto-reconnecting client with handshake, subscription, and event routing
- Agent tracker & notification store — In-memory state with filtering, stats, and export
- G2 audio bridge — Microphone capture for voice commands with level monitoring
| Property | Value |
|---|---|
| Resolution | 576 × 288 |
| Color depth | 4-bit greyscale |
| Max text containers | 4 |
| Input events | tap, double-tap, scroll up/down |
| Input | Action |
|---|---|
| Tap | Advance to next screen (or commit selection on Quick Reply) |
| Double tap | Return to dashboard |
| Scroll up | Previous item in list screens |
| Scroll down | Next item in list screens |
Note: the Even Hub SDK 0.0.9 does not expose swipe-left/right events to WebView apps, so navigation is tap-driven rather than swipe-driven.
openclaw-g2-hud/
├── index.html # Web UI
├── app.json # Even Hub metadata
├── package.json # Dependencies and scripts
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript configuration
└── src/
├── main.ts # Application entry point
├── bridge/
│ ├── display.ts # DisplayBridge — text container rendering
│ ├── input.ts # InputBridge — tap/scroll event dispatch
│ └── audio.ts # G2AudioBridge — microphone capture
├── screens/
│ ├── dashboard.ts
│ ├── agent-detail.ts
│ ├── notifications.ts
│ └── quick-reply.ts
├── services/
│ ├── openclaw-ws.ts # OpenClaw gateway WebSocket client
│ ├── agent-tracker.ts # Agent state tracking
│ ├── notification-store.ts
│ └── index.ts
├── utils/
│ ├── constants.ts # DISPLAY, Screen, AgentStatus, InputAction re-export
│ └── text-formatter.ts
└── integration-example.ts # End-to-end wiring example
npm install
npm run dev # Vite dev server
npm run build # Production build (tsc + vite build)
npm run preview # Preview the production buildThe production build compiles cleanly with tsc in strict mode and bundles to a single ~72 kB JS file.
The HUD connects to the OpenClaw gateway over WebSocket for real-time agent monitoring.
OpenClaw WebSocket Client (src/services/openclaw-ws.ts)
Connects to the OpenClaw gateway at ws://127.0.0.1:18790, performs protocol handshake and authentication, subscribes to agent events, chat events, and completions, and auto-reconnects with exponential backoff.
Agent Tracker (src/services/agent-tracker.ts)
Tracks agent state (idle, busy, error, offline), monitors activity, auto-detects inactive agents, and exposes stats and filtering.
Notification Store (src/services/notification-store.ts)
Stores notifications from agent events with filtering by agent/type/read-status, auto-trims to a configurable max size, and supports search and export.
G2 Audio Bridge (src/bridge/audio.ts)
Captures microphone input for voice commands with real-time level monitoring and voice segment recording.
import {
initializeOpenClawHUD,
getHUDStatus,
subscribeToAgent,
sendMessageToAgent,
startVoiceRecording,
} from './integration-example';
await initializeOpenClawHUD();
const status = getHUDStatus();
// {
// connected: true,
// agents: { total: 3, idle: 1, busy: 2, error: 0, offline: 0 },
// notifications: { total: 12, unread: 3, ... },
// recording: false
// }
await subscribeToAgent('session-key');
await sendMessageToAgent('agent-id', 'Hello!');
await startVoiceRecording();Default gateway URL is ws://127.0.0.1:18790. Override via the OpenClawWebSocket constructor:
new OpenClawWebSocket({
url: 'ws://custom-host:port',
reconnect: true,
reconnectInterval: 1000,
maxReconnectInterval: 30000,
});Built against Even Hub SDK 0.0.9 (@evenrealities/even_hub_sdk). Inspired by community reference apps:
- weather-even-g2 — simple single-screen example
- EvenChess — modular multi-screen example
- even-g2-notes — community SDK documentation
MIT — see LICENSE.