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 a hybrid architecture: standalone HTTP/SSE to the Gateway for active chat, plus WatchConnectivity (WCSession) as a background relay from the paired iPhone for push-style notifications.
βββββββββββββββ HTTPS/SSE ββββββββββββββββββββ TDLib ββββββββββββ
β Apple Watch β βββββββββββββββββββΆ β OpenClaw Gateway β βββββββββββββββΆ β Telegram β
β (mudbug) β βββββββββββββββββββ β :18789 β βββββββββββββββ β Servers β
ββββββββ¬βββββββ text/event-stream ββββββββ¬ββββββββββββ ββββββββββββ
β β
β WCSession (background relay) β Operator Protocol
β βββββββββββββββββββββββββββββ β
β ββββββββ΄ββββββββ
βββββββββββββββββββββββββββββββββ iPhone App β
ββββββββββββββββ
| 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 + WCSession init
β βββ ComplicationBundle.swift # Widget extension entry
βββ Features/
β βββ Chat/
β β βββ ChatView.swift # Liquid Glass chat UI
β β βββ ChatViewModel.swift # Business logic & streaming
β β βββ MessageBubble.swift # Glass 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)
β βββ Connectivity/
β β βββ WatchConnectivityReceiver.swift # iPhone β Watch relay
β βββ 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
All message bubbles and the input bar use ultraThinMaterial with gradient overlays, inner stroke borders for glass-edge light refraction, and soft shadows for depth. Dark gradient background for maximum contrast.
Real-time token-by-token display using URLSession.bytes(for:) and AsyncThrowingStream. See the AI "type" on your wrist.
Bouncing dot animation in OpenClaw's signature orange while the agent processes your request β replaces the standard ProgressView.
Receives background push-style notifications from the paired iPhone via WCSession. Ported from the official OpenClaw WatchExtension with dedup and chat integration.
- 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. mudbug mitigates this via:
- WatchConnectivity β The iPhone OpenClaw app relays notifications to the Watch via
WCSessioneven when mudbug is backgrounded - Telegram fallback β Let your agent send results to your Telegram DM; the Telegram system notification hits your Watch
- v1.0 β Core chat with streaming SSE
- v1.1 β Liquid Glass interface
- v1.2 β WatchConnectivity hybrid relay
- v1.3 β HealthKit integration (workout context for the agent)
- v1.4 β 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.