Liquid Glass Watch β’ iOS β’ OpenClaw Interface
A thin Gateway client for OpenClaw on watchOS 12, targeting the Apple Watch Series 11. One tap on your wrist to command your autonomous AI agent.
mudbug uses Path 1: Thin Gateway Client β the Watch sends messages to your self-hosted OpenClaw Gateway via the OpenAI-compatible REST API (/v1/chat/completions). The Gateway handles all the heavy lifting: Telegram routing, ClawHub skills, and persistent memory.
βββββββββββββββ HTTPS/SSE ββββββββββββββββββββ TDLib ββββββββββββ
β Apple Watch β βββββββββββββββββββΆ β OpenClaw Gateway β βββββββββββββββΆ β Telegram β
β (mudbug) β βββββββββββββββββββ β :18789 β βββββββββββββββ β Servers β
βββββββββββββββ text/event-stream ββββββββββββββββββββ ββββββββββββ
| Criteria | Gateway (mudbug) | Standalone TDLib |
|---|---|---|
| Binary size | ~5 MB | ~300 MB |
| Battery impact | Minimal | High |
| RAM pressure | Low | > 500 MB |
| Auth complexity | Bearer token | QR code sync |
| Supports all Skills | β | β |
| Requires server | β | β |
OpenClawWatch/
βββ App/
β βββ OpenClawApp.swift # Entry point
β βββ ComplicationBundle.swift # Widget extension entry
βββ Features/
β βββ Chat/
β β βββ ChatView.swift # Main chat UI
β β βββ ChatViewModel.swift # Business logic & streaming
β β βββ MessageBubble.swift # Chat bubble component
β β βββ SettingsView.swift # Gateway config & diagnostics
β βββ Complication/
β βββ QuickActionComplication.swift # Watch face widget
βββ Core/
β βββ Network/
β β βββ OpenClawAPI.swift # SSE streaming engine
β β βββ APIConstants.swift.sample # Config template (committed)
β β βββ APIConstants.swift # Your secrets (gitignored)
β βββ Models/
β β βββ OpenClawModels.swift # Protocol models
β βββ Persistence/
β β βββ ConversationStore.swift # UserDefaults chat history
β βββ Haptics/
β βββ HapticManager.swift # Tactile feedback
βββ Preview Content/
βββ PreviewData.swift # Mock data for previews
- Xcode 26 (or later) with watchOS 12 SDK
- An OpenClaw Gateway running and reachable (local network, Tailscale, or public URL)
- Gateway HTTP API enabled in
openclaw.json:{ "gateway": { "http": { "endpoints": { "chatCompletions": { "enabled": true } } } } }
-
Clone the repo:
git clone https://github.com/CryptoThaler/mudbug.git cd mudbug -
Configure your Gateway credentials:
cp OpenClawWatch/Core/Network/APIConstants.swift.sample \ OpenClawWatch/Core/Network/APIConstants.swift
Edit
APIConstants.swiftwith your Gateway URL and bearer token. -
Open in Xcode:
open OpenClawWatch.xcodeproj
Or create a new watchOS project in Xcode and drag in the
OpenClawWatch/source folder. -
Build & Run:
- Select the Watch App scheme
- Target: Apple Watch Series 11 (45mm) Simulator or your physical Watch
- Press βR
Real-time token-by-token display using URLSession.bytes(for:) and AsyncThrowingStream. See the AI "type" on your wrist.
Animated progress view with OpenClaw's signature orange while the agent processes your request.
- Click when you send a message
- Success when the AI finishes responding
- Failure on network errors
One-tap complication in circular, rectangular, corner, and inline styles. Shows the last assistant message preview and opens directly to chat.
Last 50 messages stored in UserDefaults so your chat survives app suspension and relaunch from the Watch Dock.
Automatic retry support, connection status banner, and Gateway health check from Settings.
APIConstants.swiftis gitignored β your token never leaves your machine- The
.sampletemplate is committed so collaborators know the expected structure - All connections use HTTPS with bearer token auth
- Consider using a proper cert (Let's Encrypt / Cloudflare) rather than self-signed
OpenClaw Gateway doesn't natively send Apple Push Notifications. For long-running tasks:
The Telegram Hack: Let your agent send results to your Telegram DM. The Telegram app's system notification hits your Watch; tap it to open mudbug.
A v2 could implement a lightweight push relay via CloudKit or a serverless function.
- v1.0 β Core chat with streaming SSE (this release)
- v1.1 β HealthKit integration (workout context for the agent)
- v1.2 β Siri Shortcuts / App Intents integration
- v2.0 β Push notification relay via CloudKit
- v2.1 β Multi-conversation support with SwiftData
- v2.2 β ClawHub skill browser on the wrist
- Fork the repo
- Create a feature branch (
git checkout -b feature/health-kit-integration) - Commit your changes (
git commit -m 'Add HealthKit context to chat') - Push to the branch (
git push origin feature/health-kit-integration) - Open a Pull Request
This project is open source. See LICENSE for details.
π¦ Built for the wrist. Powered by OpenClaw.
mudbug β because crawdads are just lobsters with ambition.