@soundwisdomai/openclaw-nex-bridge
v0.1.3
Published
NEX Bridge channel plugin for OpenClaw - Mobile AI Agent management via Tether
Maintainers
Readme
clawdbot-ngx-bridge
NGX Bridge channel plugin for Clawdbot - Connect your local AI agent to Tether mobile app for remote management.
Quick Start (One Command Setup)
cd clawdbot-ngx-bridge
npm install
npm run setupThe setup script will:
- Ask for your API Key (from Tether mobile app)
- Automatically configure Clawdbot
- Build the plugin
Then just run:
clawdbot gateway startThat's it! Open Tether app and start chatting with your local AI agent.
Overview
This plugin enables bi-directional communication between your local Clawdbot AI agent and the Tether mobile app through the NGX cloud server. Users can send messages from their mobile devices and receive AI responses in real-time with streaming support.
Mobile App <--> Tether Cloud Server <--> clawdbot-ngx-bridge <--> Clawdbot AI AgentInstallation
Local Installation (Recommended for Development)
Clone or copy this directory to your machine
Install dependencies:
cd clawdbot-ngx-bridge npm install npm run buildAdd to your Clawdbot config (
~/.config/clawdbot/config.json5):{ plugins: { load: { paths: ["/path/to/clawdbot-ngx-bridge"] } }, channels: { ngx: { enabled: true, apiKey: "gw_xxxxxxxxxxxx" // Get this from Tether app } } }
NPM Installation (When Published)
clawdbot plugin install @anthropic/clawdbot-ngx-bridgeConfiguration
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| enabled | boolean | true | Enable/disable the NGX channel |
| apiKey | string | required | Gateway API key from Tether mobile app |
| serverUrl | string | wss://china.swgameai.com/ws | WebSocket server URL |
| reconnectInterval | number | 5000 | Reconnect interval in ms |
| heartbeatInterval | number | 30000 | Heartbeat interval in ms |
| dmPolicy | string | "open" | DM access policy: open, pairing, allowlist |
| allowFrom | string[] | [] | Allowed user IDs (when dmPolicy is allowlist) |
| textChunkLimit | number | 4000 | Max characters per message chunk |
Getting Your API Key
- Open the Tether mobile app
- Go to Settings > Gateway
- Create a new gateway or select existing one
- Copy the API Key (starts with
gw_)
Usage
Once configured, start the Clawdbot gateway:
clawdbot gateway startThe plugin will:
- Connect to the NGX cloud server
- Authenticate with your API key
- Listen for messages from your mobile app
- Route messages to your configured AI agent
- Stream responses back to the mobile app
Features
- Auto-reconnect: Automatically reconnects on connection loss
- Heartbeat: Keeps connection alive with periodic pings
- Streaming: Real-time streaming of AI responses to mobile
- Full integration: Works with Clawdbot's routing, sessions, and agents
Development
# Install dependencies
npm install
# Build
npm run build
# Watch mode
npm run dev
# Clean
npm run cleanWebSocket Protocol
The plugin communicates with the server using JSON messages:
| Direction | Type | Description |
|-----------|------|-------------|
| C→S | auth | Authentication with API key |
| S→C | auth.success | Authentication successful |
| S→C | message.send | Message from mobile app |
| C→S | message.reply | Reply to message |
| C→S | message.stream.start | Start streaming response |
| C→S | message.stream.chunk | Stream chunk |
| C→S | message.stream.end | End streaming |
| C↔S | ping/pong | Heartbeat |
License
MIT
