Phage OS (Code Name: CLAW) is an autonomous Android agent designed for the Google Agent Challenge. It inhabits your device using a high-fidelity multimodal loop, combining Gemini 2.5 Flash's reasoning with professional-grade Android automation.
- Project Isolation: Every instruction creates a physical laboratory folder on the device for isolation.
- Vision Protocol: Pixel-perfect UI navigation using simultaneous XML map and Screenshot analysis.
- Two-Way Terminal Sync: The Brain "sees" everything—terminal output, notification lists, and logs are synced in real-time.
- Decentralized Swarm: Supports multiple users with unique Telegram bots and isolated phone nodes.
- Self-Healing Loop: Autonomous watchdog automatically kills hanging processes and retries tasks creatively.
- Intelligence: Google Gemini 2.5 Flash.
- Backend: Python (Functions Framework) on Google Cloud Run.
- Database: Firebase Firestore (for history, status, and multi-user configuration).
- Client (Muscle): Bash + ADB + Termux on Android.
- Dashboard: React + Tailwind (Gemini-style laboratory interface).
Follow these precise steps to deploy your own Phage instance.
Phage requires deep system access to perform its functions. Follow these steps on the Android device:
A. Installation
- Install Termux and the Termux:API app from F-Droid.
- Open Termux and run:
pkg update && pkg upgrade -y pkg install termux-api jq curl adb -y termux-setup-storage
B. Permissions (Manual Action Required) Go to Android Settings -> Apps -> Termux:API -> Permissions and GRANT ALL:
- Camera
- Contacts
- Location (Always)
- Microphone
- Phone
- SMS
- Storage
C. Initialization
Run the launch command (Replace YOUR_BRAIN_URL with your Cloud Run deployment):
curl -s -L https://raw.githubusercontent.com/rusagusa/phage/main/phage.sh -o ~/phage.sh
chmod +x ~/phage.sh
# Start Phage!
DEVICE_ID="node_judge" URL="https://YOUR_BRAIN_URL" ~/phage.sh- Clone this repo and create a Google Cloud Project.
- Enable Cloud Run, Artifact Registry, and Cloud Build.
- Enable Firestore in Native Mode.
- Generate a service account key in Firebase Console and save it as
firebase_key.jsonin the root. - Deploy using the provided script (Injected with your API Keys):
gcloud run deploy phage-gatway \ --source . \ --set-env-vars="TELEGRAM_TOKEN=YOUR_BOT_TOKEN,GEMINI_API_KEY=YOUR_API_KEY,DEVICE_ID=node_judge"
- Get a token from @BotFather.
- Initialize the bot by sending
/start. - Phage will begin reporting heartbeats to the Firestore
statuscollection.
- API Reference: Phage leverages the
google-genaiSDK for multimodal reasoning. - Video Demo: Watch the High-Order Agent in action
Created for the Google Agent Challenge. #GeminiLiveAgentChallenge




