DEV Community

KRISHNA
KRISHNA

Posted on

How I Built a Mobile Workspace to Run Claude Code and AI Agents on Android

The Problem: Coding on the Go is Broken
As developers, we've all been there. You're away from your desk, maybe commuting or traveling, and you get an idea or need to fix a quick bug. You pull out your phone, open an SSH client, and try to use Claude Code or Codex.

It’s a terrible experience. Mobile terminals truncate long outputs, ANSI escape codes break, and you lose the structured UI—like tool approvals, diff viewers, and thinking blocks—that makes these AI agents so powerful.

So, I decided to build Intelli, an Android app that gives you a full Linux workspace and a native UI for AI coding agents, right on your phone.

Here is a deep dive into how it works under the hood.

The Architecture: No Root, Real Linux
The biggest challenge was providing a real Linux environment without requiring users to root their devices. I ended up using a patched Termux userland (ARM64). It runs silently in the background, providing standard Linux tools, package managers, and the ability to compile code (Kotlin, Flutter, React Native) directly on the device.

The "Go Bridge" and Structured JSON
The initial versions of the app just scraped the terminal screen for text. But AI agents like Claude Code output complex, structured data.

To solve this, I wrote a custom Go bridge (agy_ide_bridge). It sits between the Linux environment and the Android UI.

· The Go bridge launches the agent CLIs (Claude Code, Codex, OpenCode) as separate processes.
· It communicates over gRPC/WebSockets using structured JSON (like stream-json for Claude Code).
· The Android UI (built with Jetpack Compose) receives this JSON and renders it natively.

This is why Intelli can show live prompt-cache countdowns, context-window meters, and native diff views instead of just a wall of text.

Adding MCP (Model Context Protocol) Support
I wanted the agents to be able to interact with the phone. I bundled 10 built-in MCP servers into the app, which can be toggled per agent.

· Browser MCP: Lets the AI open tabs, click elements, and run JavaScript.
· ADB/Shizuku MCP: Allows device-level automation (if the user enables it).
· File Ops: Read/write files securely.

Since security is a huge concern, all agents run in a sandboxed environment. API keys and sensitive data are stored in a Private Space Vault encrypted with AES-256-GCM and Android's hardware Keystore. The agents cannot read this vault.

Honest Limitations
It’s not all perfect. Building this came with trade-offs:

  1. ARM64 Only: Right now, it only supports ARM64 architecture.
  2. Bootstrap Time: The initial Linux setup takes a few minutes on the first launch.
  3. Battery & Heat: Running local compiles and AI agents will drain your battery. It won't replace your laptop for massive projects, but for debugging and scripting, it's a lifesaver.

Try it out and Let me know what you think
I built Intelli because I genuinely needed it. It’s free to try right now.

 https://spidertox.github.io/Intelli/]

I would love to hear your thoughts on the Go bridge architecture, how you handle remote environments on mobile, or if you have any ideas for new MCP servers!

Let's discuss in the comments! 👇

Top comments (0)