ZeroAI
Android AI agent app. Kotlin + Rust via UniFFI.
Zero
Zero is an Android AI agent app built with Kotlin, Rust, and UniFFI. It runs a
long-lived on-device service, exposes tools through a native [Zeroclaw] Rust core, and provides a Compose UI for configuring and operating the agent.
Project status
- Experimental and actively evolving.
- Built for Android 9+ and validated most heavily on recent Pixel hardware. Other
devices and OEM builds may need additional validation. - Large portions of the project were created with AI-assisted tooling and are still being
audited and hardened. - Public collaboration and support are not available as this is a personal project. I just want you all
along for the journey!
The Rust core under zeroclaw/ is a stripped and modified descendant of the upstream
ZeroClaw project:
They deserve credit for the core runtime work. If you like what powers this app, please
support the upstream project directly.
Please do not file issues or support requests with ZeroClaw Labs for behavior that
comes from this downstream Android fork.
If you run this project, validate it against your own device, accounts, files, data, and
connected services before trusting it with anything important.
What Zero is
Zero is built for people who want an agent that feels personal, local-first, and always available on Android. The goal is for the app to feel less like a generic assistant shell and more like a home for your in-app Zero:
- Android app UI in Kotlin + Jetpack Compose
- Native agent core in Rust
- UniFFI bridge connecting Kotlin and Rust safely
- Foreground daemon/service model for persistent agent execution
- Tooling, channels, memory, scheduling, and plugins under one roof
Zero is designed to be private by default, configurable, and capable of running as more than a chat window. Your in-app Zero should be able to search, remember, route, schedule, and act through a native mobile-first stack.
Current capabilities
Providers
- OpenAI
- Anthropic
- Google Gemini
- xAI (Grok)
- DeepSeek
- Qwen (Alibaba DashScope) — International, China, and US regional endpoints
- Ollama
- OpenRouter
Channels
- Telegram
- Discord
- Google Messages
- in-app Terminal / REPL
That means your in-app Zero can live inside the app, speak through connected channels, and keep working through the daemon/runtime model.
Built-in tooling
- web search
- web fetch
- HTTP requests
- vision / multimodal support
- smart message routing + provider cascade
- Twitter/X browsing via authenticated cookies
- eval_script — sandboxed Rhai scripting (agent writes and runs scripts during its own reasoning)
Core systems
- agent config + routing
- memory backends
- cron / scheduling
- Rhai scripting engine with 24-capability security model
- plugin management (Hub: Apps, Skills, Plugins)
- ClawBoy — AI-played Game Boy emulator
- Android-native settings and service controls
Together, these systems make the in-app Zero more than a front-end character - they give Zero an actual runtime, memory, tools, and operational surface.
Usage
Terminal & REPL
The Terminal tab is your in-app command center. Type messages to talk to your Zero, or use slash commands:
/help— list available commands/nano <prompt>— on-device Gemini Nano inference/cost— current session cost summary@tty— switch to the full TTY terminal mode
SSH from your phone
Once in TTY mode (@tty), connect to any SSH server:
/ssh user@hostname
/ssh user@hostname -p 2222
Zero handles host key verification (TOFU), password and keyboard-interactive auth, and renders the remote session with a GPU-accelerated VT terminal (powered by libghostty-vt). The extra key row provides Tab, Ctrl, Esc, Alt, arrow keys, and Enter for comfortable terminal use on a touchscreen.
Manage SSH keys in Settings > SSH Keys (generate Ed25519/RSA, import from file, copy public key).
Channels
Connect your Zero to external channels so it can respond on your behalf:
- Telegram — link a bot token, Zero replies in your Telegram chats
- Discord — link a bot token, Zero joins your Discord servers
- Email — IMAP/SMTP, Zero reads and drafts email responses
- Google Messages — experimental Bugle protocol bridge
Configure channels in Hub > Apps.
ClawBoy
A Game Boy emulator that your Zero plays autonomously. Start a game by chatting "play pokemon" in the Terminal, Telegram, or Discord. Watch the AI make decisions in real-time through the Hub viewer.
Architecture
Zero is split into a few major parts:
app/- Android app, Compose UI, service orchestration, settings, plugin screenszeroclaw/- Rust core: tools, memory, config, runtime, channels, gatewayzeroclaw-android/zeroclaw-ffi/- UniFFI bridge layer exported to Kotlinlib/- Android library packaging for native bindingsscripts/- hooks, test helpers, release utilities
The Android layer owns UX, secret storage, and lifecycle for the in-app Zero.
The Rust layer owns the agent runtime, tools, config parsing, and execution engine that power Zero underneath.
Upstream ancestry
The zeroclaw/ Rust core in this repository is a stripped and modified version of the upstream project at:
For the zeroclaw/ directory, this repo uses the upstream MIT license option.
Acknowledgements
The terminal subsystem's safe Rust FFI wrappers were informed by patterns from
libghostty-rs by Uzair Aftab and
Leah Amelia Chen (MIT/Apache-2.0) — idiomatic Rust bindings for libghostty-vt.
Specific patterns adopted include the Object<T> RAII handle wrapper, structured
error handling with OutOfSpace retry, zero-allocation grapheme extraction,CellContentTag discrimination, mouse motion deduplication, focus event encoding,
paste safety validation, and the sized! macro for C struct initialization.
Why...?
Zero is not just "an Android chat app." It is an attempt to build a full agent platform around a native mobile runtime, with the in-app Zero at the center of the experience:
- private-first secret handling and local settings
- Rust core for safety and portability
- Android-native UX instead of a thin web wrapper
- persistent service model for always-on workflows
- extensible tool/plugin surface for adding real capabilities over time
Getting started
- Install JDK 17, the Android SDK for API 35, and a current Rust toolchain.
- Keep signing files,
local.properties, and other machine-local overrides outside
the repository tree. - Build the Android app with
./gradlew :app:assembleDebug. - Before sharing builds, run
./gradlew spotlessCheck detekt :app:testDebugUnitTest :lib:testDebugUnitTest.
Development notes
- Min SDK: Android 9 / API 28
- Target SDK: 35
- Languages: Kotlin + Rust
- Bridge: UniFFI
- Targets:
aarch64-linux-androidandx86_64-linux-android
Local configuration
- Keep
release.jks,local.properties, and scratch directories such as.tmp/out of
the repo tree and out of screenshots or support bundles. - The Gradle build can load machine-local properties from
ZEROAI_LOCAL_PROPERTIES_FILE
or from$HOME/.zeroai/local.propertiesoutside the repository.
Support status
- Issues and pull requests are temporarily closed (try making a fork you and your zero can grow together!)
- Please do not use upstream ZeroClaw Labs issue trackers for this downstream fork.
Research
Some of the reverse engineering and protocol work done for this project is documented
publicly in case it helps others building similar integrations:
- Google Messages Bugle Protocol — reverse engineering notes on Google's proprietary Messages-for-Web RPC protocol (pairing, encryption, contacts/message sync, media upload)
License
- Top-level app, docs, and assets are covered by the root
LICENSE. - The upstream-derived Rust engine under
zeroclaw/retains its upstream
licensing; seezeroclaw/LICENSE-MITandzeroclaw/LICENSE-APACHE.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi