Always-On Personal Agent Stack: Docker Isolation, Allowlists and Spend Caps
Connecting Hermes Agent or OpenClaw to Telegram, Discord, or Slack turns chat messages into commands on your machine. Pair container isolation, explicit user-ID allowlists, manual approval gates and provider spend limits so your persistent assistant stays safe.
- Power users who want to trigger research, file workflows or scheduled checks from mobile chat apps without giving up self-hosting control.
- Replacing closed hosted proactive assistants with an auditable local/VPS stack.
- Running unauthenticated gateways on your main laptop alongside banking logins and production SSH keys.
- Simple one-off Q&A—standard web chat is simpler and carries zero host execution risk.
Architecture & flow
Stack layers & catalog tools
Layer 1 · Persistent agent & chat gateway
Source: Hermes Agent security docs ↗Maintains long-running sessions, scheduled triggers and messaging bridges (Telegram, Discord, Slack, WhatsApp).
Wiring & protocols: Authenticates inbound senders via allowlists/pairing codes and connects MCP tools.
Hermes Agent
A self-hosted, multi-channel agent that builds skills and retains context across sessions.
OpenClaw Personal Assistant
A personal AI assistant that runs on your devices and meets you in the messaging channels you already use.
nanobot
A self-hosted Python runtime that brings personal AI assistants, tools, chat channels, and automation into one lightweight gateway.
Hermes Agent offers straightforward manual/docker controls; OpenClaw covers 20+ messaging surfaces.
Layer 2 · Isolated command backend
Source: OpenClaw gateway security docs ↗Moves shell execution off your host OS into Docker containers or a dedicated sandbox VM with scoped directory mounts.
Wiring & protocols: Configured via Hermes terminal.backend: docker or OpenClaw sandbox.mode: non-main.
Hermes Agent
A self-hosted, multi-channel agent that builds skills and retains context across sessions.
OpenClaw Personal Assistant
A personal AI assistant that runs on your devices and meets you in the messaging channels you already use.
If Docker is unavailable, run under a separate low-privilege OS user or disposable VPS.
Layer 3 · Persistent memory & audited `SKILL.md` packs
Source: Personal AI agents rankingRetains cross-session preferences and reusable skills while gating untrusted third-party skill code.
Wiring & protocols: Uses open SKILL.md manifests and optional external memory services.
Browse vetted SKILL.md packs on FollowSkills.com and inspect every bundled script first.
Find companion SKILL.md packs on FollowSkills.com → Discover compatible MCP servers on FollowMCP.com →
Wiring & hardening steps
1. Switch execution to Docker and tighten command approvals to `manual`
Hermes Agent defaults to terminal.backend: local and approvals.mode: smart. Lock both down before connecting external messaging.
hermes config set approvals.mode manual
hermes config set terminal.backend docker
2. Pin explicit user-ID allowlists before starting the gateway
Put only your own numeric user ID in ~/.hermes/.env (never GATEWAY_ALLOW_ALL_USERS=true), and keep OpenClaw dmPolicy closed to strangers.
# ~/.hermes/.env
TELEGRAM_ALLOWED_USERS=123456789
3. Bind the gateway to localhost and enforce API spend caps
Autonomous loops and heartbeat jobs can burn tokens rapidly if triggered unexpectedly. Use revocable keys with hard monthly caps and never expose port 18789 unauthenticated on the public internet.
Common traps & fixes
GATEWAY_ALLOW_ALL_USERS=true or wildcard dmPolicy: "open" in a group chat.sandbox.mode: "non-main" for any multi-user surfaces.~/.ssh or .env.~/.ssh into the agent container and read every downloaded SKILL.md and script before enabling.Pre-flight safety checklist
- Execution backend set to Docker or an isolated VM with only scoped working folders mounted.
- Explicit user-ID allowlists configured on every enabled chat gateway.
- Gateway dashboard/API bound to
127.0.0.1or protected behind an authenticated tunnel. - Dedicated, revocable API keys with hard monthly spend caps at the model provider.
- All third-party skills inspected prior to installation.
FAQ
Should I build this stack on Hermes Agent or OpenClaw?
Choose Hermes Agent for built-in manual approval + Docker/Modal backend switches and structured skill learning; choose OpenClaw if you need 20+ messaging channels and native companion apps (with Docker sandboxing enabled).
Why can always-on personal agents rack up high token bills?
Long memory histories plus autonomous multi-step loops multiply token volume per task. Route routine summarization to lower-cost models and set provider spend caps.
Can I run this on Windows?
Yes—run it inside WSL 2 with Docker isolation rather than exposing your native host shell directly.
Related hubs, guides & concepts
Agent Workflow Stacks
Thanks — we use this to improve the page.