Real AI agent use cases, with sources and setup prompts

How to run an AI agent 24/7 on an old Android phone or TV box

Short answer: Install Termux (free, Android 7 or newer) on the spare device, sideloading it over ADB if it's a TV box. Inside Termux, add an Ubuntu environment with proot-distro and install Claude Code or Codex there; both need a 64-bit (ARM64) device, and Claude Code lists 4 GB of RAM, though one builder runs agents on a 2 GB box. Keep it alive with a wake lock, a battery-optimization exemption and Termux:Boot, then reach it from Telegram through Claude Code's Telegram channel or from the Claude app with Remote Control, so you don't open any ports. Termux and its add-ons are free; you pay for the AI plan, for example Claude Pro at $20 a month ($17 a month billed yearly).

Real setups where builders turned a TV provider's 2 GB Android box into a 24/7 agent host wired to Telegram, ran a website on a $25 phone with Termux and nginx, and let agents drive and debug apps on spare phones. 7 matching use cases below, each with a public source.

Looking for something else? Search all 1965 use cases or .

What you need

ToolWhat it does herePriceLink
TermuxLinux terminal and package manager for Android. No root needed. Latest release v0.118.3; needs Android 7 or newer.Free (open source)Official site
Termux:BootAdd-on that runs your scripts in ~/.termux/boot/ when the device starts, so the agent comes back after a power cut.FreeOfficial site
Termux:APIOptional add-on that lets scripts read battery, send notifications and more (termux-battery-status, termux-notification).FreeOfficial site
proot-distroRuns a full Ubuntu or Debian userland inside Termux, so tools built for normal Linux (Claude Code, Codex, Bun) install as usual.Free (open source)Official site
Android platform tools (adb)Run on your computer to install Termux on a TV box and apply keep-alive settings.FreeOfficial site
Claude CodeCoding and terminal agent. Runs on ARM64 Linux; Remote Control and the Telegram channel let you use it from your phone.Claude Pro $20/mo ($17/mo billed yearly); Max from $100/moOfficial site
Codex CLIOpenAI's terminal agent. Installs with npm and supports device-code sign-in on headless machines.Included in ChatGPT plans (limited on Free and Go), or API rates with a keyOfficial site
Telegram + BotFatherFree chat app; BotFather gives you a bot token for Claude Code's Telegram channel.FreeOfficial site
TailscalePrivate network so you can SSH into the device from anywhere without opening router ports. Has an Android TV app.Free Personal plan (up to 6 users)Official site

Prices are from each official page, checked Oct 25, 2026; they exclude tax and can change. Swipe the table sideways on a phone.

Get Termux onto the phone or TV box

Phones can install straight from F-Droid or GitHub. TV boxes usually have no browser-friendly installer, so push the APKs from a computer over ADB. Install Termux and every add-on from the same source; F-Droid and GitHub builds are signed with different keys and won't work together.

  1. Turn on Developer options and ADB. Android phone: Settings > About phone > tap Build number 7 times, then Developer options > USB debugging (or Wireless debugging). Android TV / Google TV: Settings > System (or Device Preferences) > About > press select on the build entry 7 times, then turn on USB debugging. Fire TV: Settings > My Fire TV > Developer Options > ADB Debugging; on some versions you first press select 7 times on Settings > My Fire TV > About > your device name.
  2. Connect from your computer. Install Android platform tools, find the device's IP address in its network settings, and connect. Accept the "Allow USB debugging?" prompt on the TV.
    bash
    adb connect 192.168.1.50:5555
    adb devices
    adb shell getprop ro.product.cpu.abi
    adb shell getprop ro.build.version.release

    arm64-v8a means Claude Code and Codex can run. armeabi-v7a is 32-bit: Termux works, but these agents don't.
  3. Install Termux and the add-ons. Download the matching APKs from the GitHub releases for Termux, Termux:Boot and Termux:API, then install them:
    bash
    adb install termux-app_v0.118.3+github-debug_arm64-v8a.apk
    adb install termux-boot-app_v0.8.1+github.debug.apk
    adb install termux-api-app_v0.53.0+github.debug.apk

    On a phone you can instead install all three from F-Droid. Open Termux:Boot once so Android lets it run at startup.
  4. Stop Android from killing it. Exempt Termux from battery optimization (or do it in Settings > Apps > Termux > Battery). On Android 12L, 13 and newer, also turn off the phantom process killer; on Android 14+ you can instead use Developer options > Disable child process restrictions.
    bash
    adb shell dumpsys deviceidle whitelist +com.termux
    adb shell "settings put global settings_enable_monitor_phantom_procs false"

    On Android 12 (not 12L) use adb shell "/system/bin/device_config set_sync_disabled_for_tests persistent" then adb shell "/system/bin/device_config put activity_manager max_phantom_processes 2147483647". Phone makers add their own killers; dontkillmyapp.com lists the extra settings per brand.
  5. First run. Open Termux on the device (a USB or Bluetooth keyboard helps on a TV) and update packages:
    bash
    pkg update && pkg upgrade
    pkg install tmux openssh proot-distro termux-api
    termux-wake-lock

Run Claude Code or Codex inside Ubuntu

Claude Code and Codex are built for normal Linux, so run them in an Ubuntu environment that proot-distro creates inside Termux. No root needed.

  1. Install Ubuntu. From Termux:
    bash
    proot-distro install ubuntu:24.04
    proot-distro login ubuntu
  2. Install Claude Code. Inside Ubuntu, add the basics and run Anthropic's native installer, then check it works:
    bash
    apt update && apt install -y curl git unzip
    curl -fsSL https://claude.ai/install.sh | bash
    export PATH="$HOME/.local/bin:$PATH"
    claude --version

    Run claude and follow the sign-in link on your phone or laptop. Claude Code needs a Pro, Max, Team, Enterprise or Console account. Run claude doctor if something looks wrong.
  3. Or install Codex. Codex installs through npm. On a device with no browser, use device-code sign-in (turn it on first in your ChatGPT security settings):
    bash
    apt install -y nodejs npm
    npm install -g @openai/codex
    codex login --device-auth
  4. Give it a small, safe workspace. Make a project folder and a note telling the agent where it runs, so it doesn't try Docker or systemd, which don't work here:
    bash
    mkdir -p ~/agent && cd ~/agent
    cat > CLAUDE.md <<'EOF'
    This runs in Ubuntu (proot) inside Termux on an Android device with little RAM.
    No Docker, no systemd, no sudo. Use tmux for long jobs. Keep memory use low.
    Ask before installing large packages or deleting files.
    EOF

    Codex reads AGENTS.md, so copy the same text there if you use Codex.

Talk to it from your phone, with no open ports

Both options make outbound connections only, so nothing on your router has to be opened. Run them inside tmux so they survive when you close Termux.

  1. Option A: Claude Remote Control. Inside Ubuntu, in your project folder, start a server session. It prints a URL and, if you press space, a QR code; open it in the Claude app or at claude.ai/code. Needs a Pro or higher plan; API keys don't work.
    bash
    tmux new -s agent
    proot-distro login ubuntu
    cd ~/agent && claude remote-control --name "TV box"

    Detach with Ctrl+B then D. The session keeps running on the device.
  2. Option B: Telegram channel. Create a bot by sending /newbot to @BotFather and copy the token. The channel plugin needs Bun, so install it in Ubuntu first:
    bash
    curl -fsSL https://bun.sh/install | bash

    Then start claude, run /plugin install telegram@claude-plugins-official (choose user scope), then /telegram:configure YOUR_TOKEN, and exit.
  3. Start it with the channel and pair your account. Restart Claude Code with the channel inside tmux, message your bot on Telegram to get a pairing code, then lock it to your account:
    bash
    claude --channels plugin:telegram@claude-plugins-official
    # then, at the Claude prompt:
    /telegram:access pair 123456
    /telegram:access policy allowlist

    Channels are a research preview. Messages only arrive while this session is running.

Survive reboots and log in remotely

Power cuts and updates restart the device. Termux:Boot runs your start script automatically.

  1. Write a boot script. In Termux (not Ubuntu), create the boot folder and a start script that takes a wake lock, starts SSH and opens the agent in a detached tmux session:
    bash
    mkdir -p ~/.termux/boot
    cat > ~/.termux/boot/start-agent <<'EOF'
    #!/data/data/com.termux/files/usr/bin/sh
    termux-wake-lock
    sshd
    tmux new -d -s agent "proot-distro login ubuntu -- bash -lc 'cd ~/agent && claude remote-control --name TV-box'"
    EOF
    chmod +x ~/.termux/boot/start-agent

    Run claude remote-control once by hand first so you've already accepted its one-time prompts; the boot script can't answer them.
  2. Set up SSH. Termux's SSH server listens on port 8022. Set a password, then add your computer's public key and use that instead:
    bash
    passwd
    whoami
    sshd
    # from your computer:
    ssh -p 8022 USER@192.168.1.50

    Replace USER with what whoami printed. Once ssh-copy-id -p 8022 USER@IP works, set PasswordAuthentication no in $PREFIX/etc/ssh/sshd_config.
  3. Reach it from outside your home. Install Tailscale on the device (it has an Android TV app; sign in with the QR code or a code you enter in the admin console) and on your laptop. Then SSH to the device's Tailscale address instead of opening ports.
  4. Reboot and test. Restart the device, wait two minutes, and check that the Telegram bot or Remote Control session answers. If not, SSH in and run tmux attach -t agent to see the error.

Copy-paste prompts

Written for this setup. Replace anything in [brackets] before you send it.

1. What can this device run?

Paste into Claude Code or Codex on your computer, with the TV box or phone connected over ADB.

An Android [TV box / phone], model [model], is connected over ADB at [IP]:5555. Using only read-only adb commands, tell me: Android version, CPU ABI (ro.product.cpu.abi), total and free RAM (/proc/meminfo), free storage, and whether it's Fire OS or Google TV. Then tell me which Termux APK from github.com/termux/termux-app/releases matches, whether Claude Code or Codex can run (they need arm64), and which phantom-process fix applies to this Android version. Don't install or change anything yet.

2. Install Termux and keep it alive

After the check above, still from your computer.

Install Termux v0.118.3 for [arm64-v8a], Termux:Boot and Termux:API on the device at [IP]:5555, all from their official GitHub releases. Verify each APK against the sha256 file in the release before installing. Then exempt com.termux from battery optimization and apply the phantom-process fix for Android [version]. Show me each command and wait for my OK before running it. Don't change any other settings.

3. Set up the Ubuntu workspace

Inside Termux on the device, run Claude Code or Codex in Ubuntu and paste this.

You are running inside Ubuntu under proot-distro in Termux on an Android device with [2] GB of RAM. There's no Docker, systemd or sudo. Set up ~/agent as a git repo with a README of what's installed, check free memory and disk, and tell me which of these I can run comfortably: [a Telegram bridge, a daily web check, a small website]. Keep memory low and ask before installing anything over 100 MB.

4. Write the boot and health-check scripts

Once the agent works by hand.

Write ~/.termux/boot/start-agent for Termux:Boot that takes a wake lock, starts sshd and starts my agent in a detached tmux session named agent with: [the exact command I run]. Also write ~/check-agent.sh that checks the tmux session exists, the device is on Wi-Fi, battery level and temperature (termux-battery-status) and free memory, restarts the session if it's gone, and sends me a short [Telegram / termux-notification] alert when it restarts. Explain how to test both without rebooting.

5. A daily job worth running 24/7

Send from Telegram or Remote Control once it's running.

Every day at [7:00 AM, my time zone], check [the pages, feeds or inbox you want] and send me a short summary here with only what changed since yesterday. Store yesterday's results in ~/agent/data so you can compare. Use cronie from the Termux packages or a loop in tmux, whichever survives reboots on this device, and tell me how to stop it.

6. Why did my agent die?

When the bot stops answering.

My agent on this Android [TV box / phone] stopped responding around [time]. Check: uptime, whether the tmux session agent still exists, the end of its output, free memory, battery and temperature (termux-battery-status), and whether Android killed Termux (dumpsys deviceidle whitelist, settings get global settings_enable_monitor_phantom_procs). Tell me the most likely cause and the smallest fix. Don't reinstall anything.

Safety checklist

Related guides: How to self-host AI agents on a Raspberry Pi, Mac mini or homelab · How to build Telegram, Discord and WhatsApp bots with AI · How to let an AI agent use your phone (iPhone and Android) · How to use AI agents for Linux, servers and homelabs

What it costs

The Daily 5

Get five new use cases like these tomorrow morning

Five new real AI use cases every morning. Free. Unsubscribe any time.

Real examples (7)

Common questions

How do you run an AI agent 24/7 on an old Android phone or TV box?
Install Termux (free, Android 7 or newer) on the spare device, sideloading it over ADB if it's a TV box. Inside Termux, add an Ubuntu environment with proot-distro and install Claude Code or Codex there; both need a 64-bit (ARM64) device, and Claude Code lists 4 GB of RAM, though one builder runs agents on a 2 GB box. Keep it alive with a wake lock, a battery-optimization exemption and Termux:Boot, then reach it from Telegram through Claude Code's Telegram channel or from the Claude app with Remote Control, so you don't open any ports. Termux and its add-ons are free; you pay for the AI plan, for example Claude Pro at $20 a month ($17 a month billed yearly).
Can an old Android phone run Claude Code?
Yes, if it's 64-bit. Run Claude Code inside an Ubuntu environment that proot-distro creates in Termux. Claude Code lists 4 GB+ RAM and an x64 or ARM64 processor; one builder below runs his agents on a 2 GB Android TV box but says a Mac mini is far faster. Check with `uname -m`: `aarch64` works, `armv7l` or `armv8l` doesn't.
Do I need to root the phone or TV box?
No. Termux, proot-distro, Termux:Boot and the keep-alive settings in this guide all work without root. For TV boxes you need ADB debugging turned on in Developer options, which is a settings toggle, not a root.
Why does Android keep killing my agent?
Battery optimization, Doze and, on Android 12 and newer, the phantom process killer stop long-running Termux jobs. Run `termux-wake-lock`, exempt Termux from battery optimization, and apply the phantom-process fix for your Android version. Hermes Agent's Termux docs warn these help but can't guarantee Android won't stop it, so add a boot script and a health check.
Does this work on a Fire TV Stick or Google TV?
The builder below says the same method works on Android TV, Google TV and Fire TV boxes on Android 7+. Fire OS devices turn on ADB in Developer Options (on some versions you unlock it by pressing select 7 times on Settings > My Fire TV > About > your device name). Newer Vega OS Fire TV sticks aren't Android and don't allow sideloading, so they won't run Termux.
Can I run Hermes Agent or OpenClaw instead of Claude Code?
Hermes Agent publishes an official Termux package, but its docs currently say Termux support is broken, and a GitHub issue reports the stable package channel returning 404. Use the Claude Code or Codex path in this guide until that's fixed, and check the Hermes docs before you try it.
Is an old phone better than a Raspberry Pi or a cloud server?
It's the cheapest if you already own one: it has a battery backup, Wi-Fi and a screen built in. A Raspberry Pi or mini PC runs normal Linux with fewer workarounds, and a cloud server never sleeps. Use the phone or TV box for light, always-on jobs like messaging bridges, reminders and small scripts, not for heavy builds.
Which AI tools do people use to run an AI agent 24/7 on an old Android phone or TV box?
Across the 7 sourced use cases in this guide, the most used tools are Claude Code, Android TV, Claude, Claude Opus 5.5, DeepSeek.
How much does it cost to get started?
0 of the 7 use cases can start on a free plan. The most common paid starting price is $17/mo (4 use cases). Prices come from each tool's official pricing page.
How long does setup take?
1 of the 7 use cases lists a setup time of an hour or less. Each card shows the setup time the builder reported.
Are these real examples?
Yes. Every use case links to its public source (an X post, a Hacker News thread or a GitHub repo) with the author and date, so you can check it yourself.

The Daily 5

Liked this guide? Get five new use cases tomorrow morning

Five new real AI use cases every morning. Free. Unsubscribe any time.

More how-to guides

How to make faceless YouTube videos with AI · How to automate work with n8n and AI · How to vibe code an app with Claude Code · How to build AI agents for SEO and ads · How to run multiple coding agents together · How to build an MCP server for AI agents · How to add memory to coding agents · How to secure vibe-coded apps and agents · How to observe and debug AI agents · How to build agent memory and context layers · How to control coding agents from your phone · How to add payments to vibe-coded apps · How to run local LLMs with AI agents · How to set up Grok Bot agents for real work · How to build with Gemini 4 Argon and Gemini agents · How to use AI agents for taxes, bills and budgets · How to make AI video ads and Reels with agents · How to set up Hermes Agent workflows · How to vibe code a game with AI · How to replace SaaS subscriptions with vibe-coded tools · How to use AI agents for errands, calls and shopping · How to use Cursor agents and automations · How to make 3D scenes and models with AI and Blender · How to use Claude Code skills and plugins · How to cut AI coding agent costs and token use · How to automate a small business with AI agents · How to compare AI models on the same prompt · How to build hardware projects with AI agents · How to make AI music videos and songs · How to use AI agents with Obsidian and your notes · How to build apps and games for your kids with AI · How to use ChatGPT for real projects and everyday tasks · How to make AI agents ask for approval before they act · How to build AI trading and investing agents · How to build AI agents that make and answer phone calls · How to plan meals and groceries with AI agents · How to use AI agents for fitness and health · How to undo, checkpoint and stop runaway coding agents · How to use AI agents for job hunting · How to automate social media posts with AI agents · How to build a smart home and voice assistant with AI agents · How to make money with AI agents · How to build a website with AI agents · How to use AI agents for research and science · How to build an iPhone or Android app with AI · How to automate email and your inbox with AI agents · How to use AI agents for Linux, servers and homelabs · How to build Telegram, Discord and WhatsApp bots with AI · How to research memecoins and crypto with AI agents · How to remove ads and bloatware from your smart TV with AI · How to self-host AI agents on a Raspberry Pi, Mac mini or homelab · How to learn anything with an AI tutor · How to build an AI second brain and personal wiki · How to reverse-engineer and revive old devices with AI · How to edit videos with Claude Code and Codex · How to set up an AI family assistant · How to make a Godot, Unity or 3D game with AI agents · How to build a custom Android TV or Google TV launcher with AI · How to use Claude Code and Codex together · How to build your own invoicing and bookkeeping app with AI · How to make a browser arcade game with AI · How to make a product demo or launch video with AI · How to fix Wi-Fi and secure your home network with AI · How to control Claude Code and Codex by voice · How to design a PCB and electronics with AI · How to save, share and resume coding agent sessions · How to run AI coding agents in a sandbox · How to make a multiplayer game with AI · How to let AI control your computer (computer use) · How to build a Mac menu bar app with AI · How to port code to another language with AI · How to make an AI animated short film or anime · How to build your own coding agent or harness · How to get notified when Claude Code or Codex needs you · How to build a Chrome extension with AI · How to use AI agents with Excel and Google Sheets · How to run Claude Code and Codex in a desktop app (T3 Code, Codex app, Claude Desktop) · How to make a song or album with AI · How to vibe code classroom apps and quizzes as a teacher · How to plan and book a trip with an AI agent · How to make motion graphics and animated videos with Claude Code · How to mod and reverse engineer games with AI · How to run AI agents overnight while you sleep · How to negotiate bills and get refunds with an AI agent · How to let an AI agent use your phone (iPhone and Android) · How to build a Polymarket bot with AI (and Kalshi) · How to use Claude Duet: real examples and tips · How to build private apps just for yourself with AI · How to design and 3D print things with AI agents · How to automate customer support with AI agents: real setups · How to find leads and automate sales outreach with AI agents · How to run a Shopify or online store with AI agents · How to launch an app and get your first users with AI · How to build a team of AI agents with a chief of staff · How to make a hand-tracking or gesture-controlled game with AI · How to test your app with AI agents before you ship · How to give an AI agent a budget or a card safely · How to share passwords and logins with an AI agent safely · How to get AI code review on your pull requests · How to review contracts, leases and fine print with AI · How to make slides and presentations with AI · How to take meeting notes and track follow-ups with AI · How to scrape websites and extract data with AI agents · How to make a podcast with AI · How to use AI agents for security scans and threat intel · How to build a dashboard with AI agents · How to clone your voice and make AI voiceovers · How to make AI images, thumbnails and product photos · How to write a CLAUDE.md or AGENTS.md rules file · How to build an AI chatbot for your own documents · How to port or remake a classic game with AI · How to build a VST plugin or synth with AI · How to trigger AI agents with webhooks and events · How to find a home or rental with AI agents · How to track Claude Code and Codex usage limits · How to build a daily AI briefing or news digest · How to check if your devices are spying on you with AI · How to track smart-money wallets and copy trade with AI · How to translate and localize your app or content with AI · How to write and publish a book with AI · How to control your TV with an AI agent · How to take your robot vacuum off the cloud with AI · How to connect an AI agent to Home Assistant · How to let an AI agent do your bookkeeping (Xero and QuickBooks)