Hermes Android · 2026
Native Android client for a private agent
In progressIndependent engineer
Operating an AI agent on your own server from a phone browser is fragile. Mobile browser tabs drop background connections, store tokens in cookies, and cannot comfortably render a live chat stream beside an interactive shell terminal.
The constraint
The agent stays on infrastructure you operate. The phone is a client; keys stay in the platform keystore. Interface captures will wait until they exist.
Built with
KotlinJetpack ComposeWebSocket
How it works
Jetpack Compose client on the phone. Two WebSockets connect to your private agent host: one for chat, one for the PTY terminal. Android Keystore gates access.
Architectural calls and their cost
Every design choice, the operational pressure behind it, what it bought, and the ongoing maintenance cost.
Kotlin and Compose
The client streams a conversation and carries a real terminal at the same time. A phone layout squeezed out of a desktop page cannot hold either of those properly.
I built the interface in Kotlin and Jetpack Compose with Material 3 components sized for one-handed switching between chat and terminal views, keeping frame rates smooth and keyboard handling native.
The cost: Android only. There is no shared web client to fall back on.
Two WebSockets, one process
Chat and a terminal are two live streams. Put them on one socket and a long command blocks the conversation; split them across processes and the app has two lifecycles to reconcile.
One WebSocket carries JSON-RPC chat messages while a second WebSocket streams raw PTY terminal bytes inside a six-module Hilt and MVVM architecture, keeping terminal output responsive while a conversation streams.
The cost: Two connection states to model, and every screen showing either one has to handle the other being down.
Keystore for the lock
An agent with shell and tool access executes whatever a valid token asks for. A persistent login on a lost phone hands the server to whoever picks up the handset.
Credentials sit behind Android Keystore and require biometric or PIN unlock before opening a session, providing hardware-backed key protection with no long-lived browser cookies.
The cost: You must unlock the app with a PIN or fingerprint whenever the session times out.
Running an autonomous agent on your own hardware gives you control over your keys and tools, but checking on a job away from your desk usually means fighting a desktop web UI inside a mobile browser.
Hermes Android is a native Kotlin and Jetpack Compose client built specifically to control a private agent host from a phone. The application is structured across six Gradle modules using Hilt and MVVM so network state, terminal emulation, and UI rendering stay cleanly separated.
Instead of multiplexing everything over one connection, the client maintains two independent WebSockets to your host: one carrying structured JSON-RPC conversation turns, and a second attached to a live PTY shell. A long-running terminal command keeps the chat view updating without blocking. Because an agent with shell access is a high-trust target, credentials are encrypted via the Android Keystore and gated behind biometric or PIN authentication every time the session lapses.
Current status and proof
In progress. Pairs with the autonomous agent operations case when you need both the runtime and a phone client.
- Native Android client: Material 3, MVVM, Hilt, six Gradle modules.
- Two WebSockets in one process: JSON RPC chat on one socket and a PTY terminal on the other.
- Unlock is a PIN or biometric through Android Keystore, so no session is stored.
- In progress. Interface captures will be added once they exist.
What was handed over
- Module map and how the two sockets are owned
- How the client is pointed at a host
- What the Keystore lock does and does not protect