
I built a sandboxed autonomous AI agent for Termux (now I need your help)
Hey everyone,
I've been working on a project called Termux-AI.
It's basically a sandboxed autonomous AI agent designed specifically for Termux.
The AI can:
- execute shell commands
- inspect files
- reason step-by-step
- create projects
- interact with the internet
- maintain memory/logs
- operate inside a restricted filesystem sandbox
The idea was to create something practical and controllable instead of pretending to build AGI in a weekend and accidentally inventing malware with motivational speeches.
Features
- Autonomous shell execution
- Multi-step reasoning loop
- Gemini SDK integration
- Sandboxed filesystem
- Persistent memory system
- Command logging
- Tool calling support
- Protected core directory
- Internet access with controlled execution
Sandbox Model
The AI:
- can read files globally
- can write inside
~/ai_root - cannot modify
~/ai_root/corewithout permission - cannot modify system files automatically
So the agent stays useful without immediately becoming a digital raccoon inside your filesystem.
Example Flow
User:
create a cli game in python
AI:
mkdir ~/ai_root/game
printf "print('hello')" > ~/ai_root/game/main.py
The command output is fed back into the reasoning loop automatically.
Tech Stack
- Python
- Gemini API
- Termux
- Shell tools (
grep,find,sed, etc.)
Repo
https://github.com/opsonusdh/Termux-AI
Contribution Ideas
Would love help with:
- sandbox improvements
- better shell parsing
- memory optimization
- safer execution
- internet tools
- UI integration
- context trimming
- performance improvements
Final Note
I actually made the core idea and most of the project before I knew about OpenClaw (It wasn't released back then).
I'm uploading this now because I genuinely need help improving it.
The long-term goal is to integrate this AI into another project of mine called Termux-TUI.
So if the project interests you, contributions, ideas, criticism, or testing would genuinely help a lot.
Hope you'll help with your generosity.