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.
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.
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.
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.
On a phone you can instead install all three from F-Droid. Open Termux:Boot once so Android lets it run at startup.
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.
First run. Open Termux on the device (a USB or Bluetooth keyboard helps on a TV) and update packages:
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.
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):
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.
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.
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.
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.
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:
Run claude remote-control once by hand first so you've already accepted its one-time prompts; the boot script can't answer them.
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.
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.
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
Use a spare device with nothing personal on it. Don't sign in to your bank, main email or password manager on it, and don't give it ADB access to your everyday phone.
Lock the Telegram bot to your account with /telegram:access policy allowlist; anyone who can message an open bot can make the agent run commands.
Don't forward router ports to SSH or the agent. Use Tailscale or Remote Control, and switch SSH to key-only login once your key works.
A TV box from your provider may belong to them and can be reset or updated remotely. Keep your work in git and back up ~/agent somewhere else.
Phones left on a charger 24/7 can overheat or swell. Keep the device somewhere cool and open, turn on any battery-protection or charge-limit setting it has, and check temperature in your health check.
Give the agent its own API key or plan with a spending limit, and start with tasks that only read and report before letting it send, buy or delete anything.
Hermes Agent's Termux package is currently marked broken in its own docs; don't add random third-party APT keys to make it work.
Termux, Termux:Boot, Termux:API: Free (open source). Install from GitHub Releases or F-Droid. Termux needs Android 7 or newer.
The device: Whatever you already own. One builder used his TV provider's 2 GB Android box; another hosted a site on a $25 Walmart phone.
Claude Code: Claude Pro: $20 a month, or $17 a month billed yearly ($200 up front). Max starts at $100 a month. The free Claude plan doesn't include Claude Code. Remote Control needs a Pro or higher plan, not an API key.
Codex: Included in ChatGPT plans (limited on Free and Go). Or sign in with an OpenAI API key and pay standard API rates.
Tailscale (optional): Free Personal plan. Up to 6 users with unlimited devices. Only needed if you want SSH from outside your home.
Telegram bot: Free. Created in a minute with BotFather.
The Daily 5
Get five new use cases like these tomorrow morning
Five new real AI use cases every morning. Free. Unsubscribe any time.
A builder had Claude Code inspect the Android TV box from his TV provider from a prompt and one photo, install a Linux shell built for its chip, add a wake lock and battery whitelist so Android cannot kill the agent, and wire the agent to his own Telegram bot with no open ports.
A user's parents had an old Android TV that was slow and full of ads. Claude cleaned it up and built them a new home screen from scratch; he shared the exact steps and the prompt to do it on your own TV.
He found TizenTube Cobalt, an open-source app that looks like official YouTube TV but has no ads and skips sponsor segments with SponsorBlock, and says you can just tell Claude to set it up.
TechCrunch rounded up the trend: people point Claude Code or another agent at open-source repos like dumbtv and cleanyourtv to remove sponsored rows, ACR viewing trackers and bloat from Android TV, Google TV and Fire TV sets, often swapping in a cleaner launcher.
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.