Autonomous Stack
Run Claude Code or Pi on your own box. Give the agent work over Telegram, put jobs on a schedule, and keep the same browser session between runs. When it gets stuck, open that browser on your tailnet and take the wheel.
Mailbox handles email. Plug in ModemBox for verification texts and KeePassBox for passwords and TOTP. Docker Compose holds the whole thing together.
Contents
Quick start
Run this on your Docker host with Compose v2.20 or newer, Make and Git. The checkout contains docker-compose.yml, the harness definitions, the agent instructions and the Telegram helper. Run the commands from that directory so Compose can find the files it mounts.
git clone https://github.com/psyb0t/autonomous-stack.git
cd autonomous-stack
make init
Edit .env and configure:
- Choose
HARNESS_PLATFORM=claudebox with Claude credentials or HARNESS_PLATFORM=pibox with a Z.ai token. See agent runtime.
- The Telegram bot token, numeric owner chat ID and numeric owner user ID.
- IMAP/SMTP credentials and the allowed sender address if you keep the
mailbox profile.
- The heartbeat schedule and prompts describing your tasks.
- A Tailscale or Headscale auth key and a unique
TS_HOSTNAME if you keep the tailscale profile.
Message the bot from your owner account before you start the stack. If an old process is polling with that token, stop it first.
make pull
make up
make status
make pull and make up run docker compose pull and docker compose up -d. Compose reads docker-compose.yml and .env in the checkout, then starts the services selected in COMPOSE_PROFILES. The Go image comes from Docker Hub and writes the private runtime config before its dependent containers start.
make init generates distinct internal API tokens and never replaces an existing .env. Real credentials, runtime settings and data stay ignored by Git.
What's running in this thing?
| Service |
Project |
Responsibility |
claude |
Claudebox or PiBox |
One agent runtime with heartbeat cron and owner-only Telegram |
browser |
Stealthy Auto-Browse |
Browser MCP, screenshots, persistent profile and viewer |
mailbox |
Mailbox |
Email MCP, IMAP reading and SMTP sending |
modembox (optional) |
ModemBox |
SMS and modem control over MCP from an existing USB modem gateway |
keepassbox (optional) |
KeePassBox |
Encrypted account storage and TOTP over MCP from an existing vault service |
handoff |
Autonomous Stack |
Help requests, Telegram notifications and the persistent viewer proxy |
tailscale |
Tailscale |
Private browser access under a persistent tailnet node name |
Each service has a matching Compose profile. Reuse a browser, Mailbox, ModemBox or KeePassBox you run elsewhere by removing its profile and setting its MCP URL and token. See local and remote services.
The helper uses servicepack for its lifecycle. The selected runtime owns scheduling and Telegram polling. For USB modem access, run ModemBox on the host that has the modem attached.
Open http://autonomous-stack on your tailnet to see the browser. Anyone your ACLs let through can drive it, so give that access to people you'd trust with the keyboard. Tailscale Serve exposes only the viewer. The stack's MCP and browser automation APIs stay on the Compose network behind bearer authentication.
When the agent gets stuck
The agent can try an encountered CAPTCHA once using a screenshot, or use an optional owner-configured solver. Solvers default off; see CAPTCHA settings. If the selected approach fails, it requests help and pauses that page.
- Telegram receives the reason and the stable browser URL. The agent pauses automation.
- Reply
ready when available.
- Open
http://autonomous-stack and complete the task.
- Reply
done so the agent can inspect the page and resume.
The same link works any time. Drop in to watch, or tell the agent to pause if you're taking over. See how handoffs work.
Persistent data
| Directory |
Contents |
data/browser/ |
Browser profile and cookies |
data/recordings/ |
Browser recordings |
data/workspace/agent/ |
Tasks, artifacts and generated MCP settings |
data/claude/ |
Default Claude auth directory |
data/claudebox/ |
Cron history and Telegram state |
data/pibox/ and data/pibox-agent/ |
PiBox cron, Telegram, and Pi session state |
data/mailbox/ |
Mailbox operation state |
data/modembox/ |
Local SMS history and encrypted SIM PINs |
data/keepassbox/ |
Local vaults and KeePassBox access config |
data/handoff/ |
Current help request |
data/tailscale/ |
Persistent tailnet identity and Serve settings |
Tracked .gitkeep files keep these directories present. Their runtime contents are ignored. Back up .env, data/ and any external auth directory privately. Cookies and login state are credentials.
Configuration and operation
.env.example lists operator settings. Configuration covers auth, prompts, mail and optional Dikciz, ModemBox and KeePassBox connections.
After changing .env, run make restart to recreate the selected services and remove containers from disabled profiles. make pull refreshes the selected images. make stop stops the containers, and make down removes them while keeping persistent data.
The agent can use its tools while you're away. Its accounts, mounts and network access decide what it can touch. Give it what it needs for the job and watch the first few runs.
See deployment for ownership, backup and privilege details.
Documentation
| Guide |
What it covers |
| Configuration |
Agent and Telegram settings, Compose profiles, and local or remote MCP services |
| Deployment |
Where the stack runs, data ownership, start and stop commands, and troubleshooting |
| Browser handoffs |
Taking over the browser with Telegram's ready and done replies |
| Development and CI |
Local checks, runtime tests, and how images get published |
| Changelog |
Release notes and upgrade steps |
Development
make format
make lint
make test-coverage
make sec
make generate
Tooling runs in the development image. Normal tests use the race detector and local fixtures, without live Telegram polling, paid model calls or public tunnels.
Development and CI describes the release pipeline. A release tag waits for the matching main commit to pass, then promotes its image without rebuilding it.
Sponsor
Sponsor on GitHub

License
MIT. See LICENSE, third-party notices and CHANGELOG.md.