A stateful, multi-agent CLI automation engine that runs entirely on your phone via Termux. No cloud dependencies — inference routes through a local Copilot-to-LAMCAP proxy tunnel.
██ ████ ███ ███ █████ ████ █████
██ ██ ██ ███████ ██ ██ ██ ██ ██
██ ██████ ██ █ ██ ██ ██████ █████
██ ██ ██ ██ ██ ██ ██ ██ ██
███████ ██ ██ ██ ██ █████ ██ ██ ██
Download Termux from F-Droid (recommended) or the Play Store.
⚠️ The F-Droid version is kept up-to-date. The Play Store version is often outdated and may cause issues.
Open Termux and run:
pkg update && pkg upgrade -ypkg install python git -yThis installs Python 3.11+ and Git.
termux-setup-storageTap Allow when prompted. This lets LAMCAP access ~/storage/shared/ (your phone's internal storage).
You can install LAMCAP directly into your system as a global command!
pip install git+https://github.com/smdhussain06/LAMCAP.gitYou need to tell LAMCAP where your proxy tunnel is running and which model to use.
export ANTHROPIC_BASE_URL="http://localhost:4141"
export ANTHROPIC_API_KEY="your-api-key-here"
export ANTHROPIC_MODEL="gpt-4.1"To make these persistent across Termux sessions, add them to your shell profile:
echo 'export ANTHROPIC_BASE_URL="http://localhost:4141"' >> ~/.bashrc
echo 'export ANTHROPIC_API_KEY="your-api-key-here"' >> ~/.bashrc
echo 'export ANTHROPIC_MODEL="gpt-4.1"' >> ~/.bashrc
source ~/.bashrc| Model Trigger | Student Token Multiplier |
|---|---|
gpt-4.1 |
0x |
gpt-4o |
0x |
grok-code-fast-1 |
0.25x |
claude-haiku-4.5 |
0.33x |
gemini-3-flash-preview |
0.33x |
gemini-3.1-pro-preview |
1x |
Make sure your proxy tunnel is running on localhost:4141 before launching LAMCAP.
The proxy bridges Copilot inference to a LAMCAP-compatible API so your phone doesn't burn through local compute.
python lamcap.pyYou'll see the splash screen, then the interactive prompt:
lamcap>
| Command | What it does |
|---|---|
help |
Show all available commands |
status |
Display bridge connection info & model details |
history |
Show recent execution history from SQLite |
clear |
Clear the terminal screen |
exit/quit |
Exit LAMCAP |
| any text | Send a natural-language prompt to the agent pipeline |
User Prompt
│
▼
┌─────────────┐ ┌───────────────┐ ┌──────────────┐
│ Planner │────▶│ Validator │────▶│ Executor │
│ Agent │ │ Agent │ │ Agent │
└─────────────┘ └───────────────┘ └──────────────┘
│ │ │
▼ ▼ ▼
JSON plan Block dangerous subprocess.run()
from LLM commands (rm -rf, ➜ capture output
chmod 777, dd, ➜ save to SQLite
fork bombs)
All context flows through SQLite (lamcap.db) — prompts, plans, command outputs, and filesystem snapshots are persisted across sessions.
pkg install build-essential libffi openssl -y
pip install -r requirements.txtYour tunnel on localhost:4141 isn't running. Start it first, then relaunch LAMCAP.
Run termux-setup-storage again and grant access.
python --version # needs 3.11+
pkg install python -yMIT