Even Realities G2 × OpenClaw Bridge
name: even-g2-bridge
by daaab · published 2026-03-22
$ claw add gh:daaab/daaab-even-g2-bridge---
name: even-g2-bridge
description: "Connect Even Realities G2 smart glasses to OpenClaw via Cloudflare Worker. Deploys a bridge that routes G2 voice commands to your OpenClaw Gateway — same agent, same memory, same tools, just voice instead of typing. Supports short conversations (direct reply on glasses), long tasks (background processing with Telegram delivery), and image generation (DALL-E → Telegram). Use when: setting up G2 glasses with OpenClaw, deploying the G2 bridge worker, or troubleshooting G2 ↔ OpenClaw connectivity."
license: MIT
compatibility: "Requires: Cloudflare account (free plan works), OpenClaw Gateway with HTTP API enabled. Optional: OpenAI API key (image gen), Telegram bot (rich content delivery)."
metadata:
author: dAAAb
version: "5.0.0"
repository: https://github.com/dAAAb/openclaw-even-g2-bridge-skill
icon: assets/icon.png
required_secrets:
- name: GATEWAY_URL
description: "Your OpenClaw Gateway URL (e.g. https://your-gateway.example.com)"
required: true
- name: GATEWAY_TOKEN
description: "OpenClaw Gateway auth token — stored in CF Worker secrets, never exposed to glasses"
required: true
- name: G2_TOKEN
description: "Token for G2 glasses authentication — you choose this value"
required: true
- name: ANTHROPIC_API_KEY
description: "Anthropic API key for fallback when Gateway is unreachable"
required: true
- name: TELEGRAM_BOT_TOKEN
description: "Telegram bot token for delivering rich content (images, code, long text)"
required: false
- name: TELEGRAM_CHAT_ID
description: "Telegram chat ID for content delivery"
required: false
- name: OPENAI_API_KEY
description: "OpenAI API key for DALL-E image generation"
required: false
security_notes: |
Two-layer token auth: G2 glasses only know G2_TOKEN. GATEWAY_TOKEN stays in
Worker secrets, never exposed to glasses. If glasses are lost, change only G2_TOKEN.
Consider using a scoped, least-privilege Gateway token for the Worker.
---
# Even Realities G2 × OpenClaw Bridge
Deploy a Cloudflare Worker that connects Even Realities G2 smart glasses to your OpenClaw Gateway.
What It Does
G2 Glasses → (voice→text) → CF Worker → OpenClaw Gateway → Full Agent
↓ ↓
G2 display (text) Telegram (rich content)Prerequisites
1. Even Realities G2 glasses with Even app (v0.0.7+ with "Add Agent" support)
2. OpenClaw Gateway with HTTP API enabled
3. Cloudflare account (free plan works)
4. Anthropic API key (fallback)
5. Optional: OpenAI API key (image gen), Telegram bot token (rich content delivery)
Setup
1. Enable OpenClaw Gateway HTTP API
On your OpenClaw host, enable the chat completions endpoint:
openclaw config set gateway.http.endpoints.chatCompletions.enabled true
openclaw gateway restartVerify:
curl -X POST https://YOUR_GATEWAY_URL/v1/chat/completions \
-H "Authorization: Bearer YOUR_GATEWAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"model":"openclaw","messages":[{"role":"user","content":"hi"}]}'2. Deploy Cloudflare Worker
Copy `scripts/worker.js` to your project, then deploy:
# Install wrangler
npm install -g wrangler
# Login to Cloudflare
wrangler login
# Deploy
wrangler deployOr use the Cloudflare Dashboard: Workers & Pages → Create → Upload `worker.js`.
3. Set Secrets
# Required
wrangler secret put GATEWAY_URL # Your OpenClaw Gateway URL
wrangler secret put GATEWAY_TOKEN # Your Gateway auth token
wrangler secret put G2_TOKEN # Token for G2 glasses auth (you choose)
wrangler secret put ANTHROPIC_API_KEY # Fallback when Gateway is down
# Optional (for Telegram delivery of rich content)
wrangler secret put TELEGRAM_BOT_TOKEN
wrangler secret put TELEGRAM_CHAT_ID
# Optional (for image generation)
wrangler secret put OPENAI_API_KEY4. Configure G2 Glasses
In Even app → Settings → Add Agent:
5. Test
curl -X POST https://YOUR_WORKER.workers.dev \
-H "Authorization: Bearer YOUR_G2_TOKEN" \
-H "Content-Type: application/json" \
-d '{"model":"openclaw","messages":[{"role":"user","content":"Hello, who are you?"}]}'Architecture
Request Flow
1. G2 converts speech → text, sends as OpenAI chat completion format
2. Worker authenticates via `G2_TOKEN`
3. Worker classifies request:
- **Image gen** → DALL-E + Telegram (immediate G2 ack)
- **Long task** → immediate G2 ack + background Gateway call → Telegram
- **Short task** → proxy to Gateway → return to G2
4. Gateway runs full agent loop (memory, tools, skills)
5. Response filtered for G2 display (no URLs, code blocks → Telegram)
Security
Two-layer token auth:
G2 --[G2_TOKEN]--> Worker --[GATEWAY_TOKEN]--> GatewayG2 Display Limitations
Customization
Edit the task classification regex in `worker.js`:
Troubleshooting
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...