Skip to content

henrycode03/clawmobile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

107 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🦞 ClawMobile

A native Android client for OpenClaw and Orchestrator β€” monitor and control your AI agent sessions from your phone.

Release Downloads License Platform


Features

Chat

  • Real-time streaming β€” token-by-token typewriter response via WebSocket
  • Ed25519 authentication β€” full device pairing handshake with OpenClaw Gateway 2.13+
  • Agent selector β€” switch between Main / Engineer / QA agents on the fly
  • Markdown rendering β€” bold, italic, inline code, code blocks, headings, lists
  • Chat history β€” local Room database, sortable, per-session
  • Voice input β€” Android Speech-to-Text integration

Orchestrator (session control plane)

  • Session management β€” start, pause, resume, and stop Orchestrator sessions from your phone
  • Live log streaming β€” WebSocket log tail with phase/error/checkpoint filters; auto-reconnect with exponential backoff
  • Task progress β€” per-session task counts (pending / running / done / failed)
  • Checkpoint management β€” view, load, and delete session checkpoints
  • Human-in-the-loop interventions β€” approve, deny, or provide guidance when the agent pauses for operator input
  • Background intervention polling β€” WorkManager job notifies you when any session is paused awaiting operator input
  • Permission approval β€” review and approve/reject tool permission requests
  • Replan flow β€” when a session fails, view the AI-generated failure summary, add operator feedback, and send it back to Project Architect to seed a new planning session
  • Project & task explorer β€” browse projects, task lists, file trees, and task detail

General

  • Offline banner β€” detects network drops; falls back to REST polling silently
  • Dark theme β€” consistent slate/navy UI across all screens

Tech Stack

Layer Technology
Language Kotlin
UI XML Views + ViewBinding
Architecture MVVM (ViewModel + LiveData + Repository)
Local storage Room Database
Networking OkHttp (WebSocket + REST)
Auth Ed25519 via BouncyCastle
Background jobs WorkManager
Build Gradle KTS + KSP

Project Structure

app/src/main/java/com/user/
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ OrchestratorModels.kt   # All Orchestrator API response models
β”‚   β”œβ”€β”€ PermissionModels.kt
β”‚   β”œβ”€β”€ PrefsManager.kt         # Server URL, API key, gateway token, prefs
β”‚   └── ...                     # Room entities, DAOs, database
β”œβ”€β”€ repository/
β”‚   └── OrchestratorRepository.kt
β”œβ”€β”€ service/
β”‚   β”œβ”€β”€ OrchestratorApiClient.kt    # All Orchestrator REST calls
β”‚   β”œβ”€β”€ WebSocketManager.kt         # Live log streaming with reconnect
β”‚   β”œβ”€β”€ InterventionPollService.kt  # WorkManager background poller
β”‚   β”œβ”€β”€ PermissionPollService.kt
β”‚   β”œβ”€β”€ GatewayClient.kt
β”‚   β”œβ”€β”€ Ed25519Manager.kt
β”‚   └── OpenClawService.kt
β”œβ”€β”€ ui/
β”‚   β”œβ”€β”€ activities/
β”‚   β”‚   β”œβ”€β”€ MainActivity.kt
β”‚   β”‚   β”œβ”€β”€ SessionsActivity.kt
β”‚   β”‚   β”œβ”€β”€ SettingsActivity.kt
β”‚   β”‚   └── OnboardingActivity.kt
β”‚   β”œβ”€β”€ tasks/
β”‚   β”‚   β”œβ”€β”€ SessionDetailActivity.kt   # Live logs, interventions, replan
β”‚   β”‚   β”œβ”€β”€ ProjectDetailActivity.kt
β”‚   β”‚   β”œβ”€β”€ TaskDetailActivity.kt
β”‚   β”‚   β”œβ”€β”€ TaskListActivity.kt
β”‚   β”‚   └── CheckpointsBottomSheet.kt
β”‚   β”œβ”€β”€ permissions/
β”‚   β”‚   └── PermissionsActivity.kt
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ OfflineBannerView.kt
β”‚   β”‚   └── StatusBadgeView.kt
β”‚   └── FailureSummary.kt, MarkdownRenderer.kt, OutputHighlighter.kt, ...
└── viewmodel/
    β”œβ”€β”€ SessionViewModel.kt
    β”œβ”€β”€ TaskViewModel.kt
    └── ...

Architecture

ClawMobile
  β”‚
  β”œβ”€β”€β”€ Chat/voice ──────────────────────> OpenClaw Gateway (:18789)
  β”‚                                           └── OpenClaw agent runtime
  β”‚
  └─── Session control / monitoring ──> Orchestrator API (:8080)
           β”œβ”€β”€ Projects, tasks, sessions
           β”œβ”€β”€ Live WebSocket log stream
           β”œβ”€β”€ Human-in-the-loop interventions
           β”œβ”€β”€ Permission approvals
           └── Replan flow

Both connections run through Tailscale or LAN. They are independent β€” the Gateway token is for chat; the Orchestrator URL + API key are for session control.

Gateway provider status

ClawMobile can read provider metadata from Gateway/Hermes through GET /providers/status after the Gateway connection is configured. Android stores only the Gateway/Hermes connection settings needed to authenticate to your server. OpenAI, Anthropic, OpenRouter, and other third-party provider API keys stay server-side behind Gateway/Hermes and are not stored in the Android app.

Quick Start

Prerequisites

  • Android Studio Hedgehog (2023.1.1) or newer
  • JDK 17+
  • Android SDK API 29+ (Android 10+)
  • OpenClaw running locally or on a server
  • Orchestrator running (for session management features)

Network Setup

Recommended β€” Tailscale

Orchestrator URL: http://<tailscale-ip>:8080
Gateway URL:      http://<tailscale-ip>:18789

SSH tunnel (emulator or different network)

ssh -N -L 8080:localhost:8080 -L 18789:localhost:18789 \
    -o ServerAliveInterval=30 USER@YOUR_SERVER_IP

Same WiFi

Orchestrator URL: http://192.xxx.x.xx:8080
Gateway URL:      http://192.xxx.x.xx:18789

Get Credentials

Gateway token:

cat ~/.openclaw/openclaw.json
# Copy gateway.auth.token

Orchestrator API key:
Settings β†’ API Keys in the Orchestrator dashboard.

Build & Run

./gradlew assembleDebug
# APK β†’ app/build/outputs/apk/debug/app-debug.apk

Or Run β†’ Run 'app' in Android Studio.

First Launch

  1. App opens Settings if no token is set
  2. Enter Gateway URL + Token β†’ Save (for chat)
  3. Enter Orchestrator URL + API Key β†’ Save (for session control)
  4. First Gateway connection shows Device Pairing Required:
openclaw gateway call device.pair.list --json
openclaw gateway call device.pair.approve --params '{"requestId":"<id>"}' --json
  1. Restart β†’ ● Connected

Troubleshooting

Issue Fix
● Handshaking… stuck Check tunnel; verify gateway token
Pairing required on every launch Use real device (emulator clears data on restart)
Software caused connection abort Add -o ServerAliveInterval=30 to SSH tunnel
Orchestrator sessions not loading Verify Orchestrator URL and API key in Settings
Intervention notifications not firing Check that POST_NOTIFICATIONS permission is granted
KSP build errors Ensure KSP version prefix matches Kotlin version in libs.versions.toml
Cannot resolve symbol File β†’ Invalidate Caches / Restart

Related Projects

Project Description
OpenClaw AI Agent framework
orchestrator Automates software projects with OpenClaw agents

Privacy

  • All messages stored locally on device via Room
  • No analytics, no cloud sync, no third-party SDKs
  • Only outbound connections are to your own OpenClaw and Orchestrator servers

Star History

Consider giving it a star β€” it helps others discover the project and keeps us motivated!

GitHub Stars

Star History Chart

License

MIT

About

Mobile-First Personal AI Assistant

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors