Goal: Run 7 openclaw agents on one self-hosted Mac mini. Each has its own persona, files, and Gmail account accessed via gog.
Hard requirement: Strict credential isolation. Agent A must not be able to read Agent B's Gmail, e.g. by shelling out to gog --account agentB@gmail.com gmail search .... Hostile-agent / prompt-injection threat model.
Options as I see them
- Single gateway, multi-agent routing only. Per-agent
agentDir, workspace, auth profiles. But as I read it, this doesn't isolategog— it stores OAuth refresh tokens in the macOS Keychain (or~/Library/Application Support/gogcli), which is per-unix-user, not per-agent. All 7 agents run as the same gateway process, so any can read any other's tokens. Rules this out for me. - Single gateway + per-agent sandbox (
mode: "all",scope: "agent"),goginstalled in the sandbox image and authenticated inside each per-agent container. - 7 openclaw docker containers, one per agent, on OrbStack or Docker Desktop. Drop multi-agent — each container is one agent, with its own filesystem,
goginstall, and file-based keyring volume. Currently leaning this way. - Same as #3 but with 7 full Linux VMs.
Where I might be wrong
- Is it right that per-agent
auth-profiles.jsononly holds openclaw's auth (model providers, channel tokens), and has nothing to do withgog's OAuth tokens? That's the crux of why I think #1 doesn't work. - Anyone actually running 7+ gateway VMs on a Mac mini (option 4)?
Main concern with any Docker-based option: tool persistence. If an agent does an ad-hoc brew install or pip install during a task, it's gone next rebuild. Patterns I can think of:
- Bake common tools into the image, rebuild when needed.
- Persistent volume mounted at
/usr/localor wherever installs land (feels fragile). - Persistent
~/.local/binvolume +pip install --user(Python-only). - Just accept it and have the agent reinstall.
Any ideas?