@eyeclaw/sdk
v1.0.6
Published
EyeClaw channel plugin for OpenClaw - Connect your local OpenClaw instance to EyeClaw platform
Maintainers
Readme
@eyeclaw/sdk
EyeClaw channel plugin for OpenClaw - Connect your local OpenClaw instance to the EyeClaw platform.
Installation
openclaw plugins install @eyeclaw/sdkWindows Troubleshooting
If openclaw plugins install fails with spawn npm ENOENT, install manually:
# 1. Download the package
curl -O https://registry.npmjs.org/@eyeclaw/sdk/-/sdk-0.1.0.tgz
# 2. Install from local file
openclaw plugins install ./sdk-0.1.0.tgzConfiguration
1. Create a Bot on EyeClaw
- Sign up at https://eyeclaw.io
- Create a new bot in your dashboard
- Copy the Bot ID and SDK Token
2. Configure OpenClaw
openclaw config set channels.eyeclaw.enabled true
openclaw config set channels.eyeclaw.botId "your-bot-id"
openclaw config set channels.eyeclaw.sdkToken "your-sdk-token"
openclaw config set channels.eyeclaw.serverUrl "https://eyeclaw.io"3. Start OpenClaw
openclaw startYou should see the connection message:
✅ Successfully subscribed to BotChannel
🎉 Bot connected! Session ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxConfiguration Options
channels:
eyeclaw:
enabled: true
botId: "1"
sdkToken: "your-sdk-token-here"
serverUrl: "https://eyeclaw.io" # or self-hosted URL
reconnectInterval: 5000 # milliseconds (default: 5000)
heartbeatInterval: 30000 # milliseconds (default: 30000)| Option | Type | Default | Description |
|--------|------|---------|-------------|
| enabled | boolean | false | Enable/disable the plugin |
| botId | string | - | Bot ID from EyeClaw dashboard |
| sdkToken | string | - | SDK Token for authentication |
| serverUrl | string | https://eyeclaw.io | EyeClaw server URL |
| reconnectInterval | number | 5000 | Reconnect interval in ms |
| heartbeatInterval | number | 30000 | Heartbeat interval in ms |
Features
- WebSocket Connection: Real-time bidirectional communication with EyeClaw platform
- Auto-Reconnect: Automatically reconnects on connection loss
- Heartbeat: Keeps connection alive with periodic ping/pong
- Real-time Monitoring: View bot status, logs, and sessions in EyeClaw dashboard
- MCP Integration: Expose your bot as MCP plugin for platforms like Coze, Claude Desktop
- Session Management: Track connection sessions with uptime and activity logs
MCP Plugin Integration
Your bot automatically provides an MCP plugin URL that can be used with AI platforms:
https://eyeclaw.io/mcp/stream/your-bot-id?api_key=your-api-keySupported Platforms
- Coze: Add as custom MCP plugin
- Claude Desktop: Add to
claude_desktop_config.json - Other MCP-compatible platforms: Use the stream URL
Upgrade
openclaw plugins update eyeclawUninstall
openclaw plugins uninstall eyeclawTroubleshooting
Bot cannot connect
- Check your internet connection
- Verify
botIdandsdkTokenare correct - Ensure
serverUrlis accessible - Check OpenClaw logs:
openclaw logs
Connection drops frequently
- Check firewall settings
- Verify network stability
- Try increasing
heartbeatInterval:
openclaw config set channels.eyeclaw.heartbeatInterval 60000"Unauthorized" error
Your SDK token may be invalid or expired. Regenerate it in the EyeClaw dashboard:
- Go to your bot settings
- Click "Regenerate SDK Token"
- Update OpenClaw config with the new token
Architecture
┌─────────────────┐ WebSocket ┌──────────────────┐
│ Local OpenClaw │◄────────────────────────►│ EyeClaw Platform │
│ Instance │ ActionCable/BotChannel │ (Rails) │
└─────────────────┘ └──────────────────┘
│ │
│ │
▼ ▼
Execute commands Real-time dashboard
Process requests Status monitoring
Run tools Activity logsHow it Works
- Plugin Initialization: When OpenClaw starts, the plugin connects to EyeClaw via WebSocket
- Authentication: Uses SDK Token to authenticate with BotChannel
- Session Creation: Server creates a session and assigns a session ID
- Heartbeat: Plugin sends periodic pings to keep connection alive
- Event Forwarding: OpenClaw events (messages, tool execution, errors) are sent to EyeClaw
- Dashboard Updates: EyeClaw dashboard shows real-time status and logs
Development
Build from Source
cd sdk
npm install
npm run buildLink Locally
npm link
openclaw plugins install /path/to/eyeclaw/sdkRun TypeScript in Watch Mode
npm run watchAPI Reference
EyeClawClient
import { EyeClawClient } from '@eyeclaw/sdk'
const client = new EyeClawClient(config, logger)
// Connect to EyeClaw
await client.connect()
// Send log message
client.sendLog('info', 'Hello from OpenClaw')
// Send command result
client.sendCommandResult('execute_tool', { result: 'success' })
// Request bot status
client.requestStatus()
// Disconnect
client.disconnect()Support
- Documentation: https://eyeclaw.io/docs
- Issues: https://github.com/eyeclaw/eyeclaw/issues
- Discord: https://discord.gg/eyeclaw
License
MIT © EyeClaw Team
Related Projects
- OpenClaw - The AI assistant framework
- clawdbot-feishu - Feishu/Lark channel plugin (inspiration for this plugin)
