Hermes Agent Sandbox For Automation

Julian Goldie — founder, AI Profit Boardroom
By Julian Goldie · 8 min read
Get The AI Profit Stack Join AIPB →
🎯 1,000+ done-for-you AI agent workflows 📅 4 live coaching calls every week 🛡️ 7-day refund + 30-day ROI guarantee 👥 3,400+ AI operators inside

A Hermes Agent sandbox means switching Hermes off the default local backend and onto an isolated one, usually Docker, so the agent's shell commands run inside a container or on a separate machine instead of directly on your computer. One setting does it: hermes config set terminal.backend docker.

📺 Watch: NEW Hermes Agent NOW CHANGES HOW AI WORKS!

🔥 Get the Agent OS as a free bonus: AI Profit Boardroom members get the full Agent OS zip, prompt libraries, daily tutorials and weekly live coaching calls. → Get inside

That's the answer. Now let me show you why it matters, which backends you can pick, how to harden Docker, how to keep your API keys out of the sandbox, and exactly how to set it up.

I run Hermes every day inside my Agent OS with a profile per model. The sandbox is the setting I'd tell anyone to look at before they let an agent loose on real work.

Why you'd sandbox Hermes at all

The default backend is local. Commands run directly on your machine with no isolation. The Hermes docs are blunt about it: the agent has the same filesystem access as your user account.

Think about what that means. Everything your user can read, the agent can read. Everything your user can delete, the agent can delete. Local tool subprocesses even keep your real home directory by default, so CLIs like git, ssh and gh find the credentials they already use.

That's handy for personal use. It's also a lot of trust to hand a model.

The docs give you two ways to reduce it: use hermes tools to disable tools you don't want, or switch to Docker for sandboxing. Sandboxing is the bigger lever.

Here's the old way versus the new way. The old way: run the agent on your laptop and hope it behaves. The new way: give it its own box, decide what goes in, and let it work freely inside that boundary.

If you want to learn Hermes setups like this step by step, the AI Profit Boardroom has Hermes courses, daily updates, my Agent OS zip and 4 coaching calls a week, for $69/mo.

Hermes Agent sandbox backends compared

Hermes supports seven terminal backends. The backend decides where the agent's shell commands actually run. Six of them give you some kind of isolation. This table comes straight from the Hermes docs.

BackendIsolationBest for
localNoneDevelopment, personal use
dockerFull (namespaces, cap-drop)Safe sandboxing, CI/CD
sshNetwork boundaryRemote dev, powerful hardware
modalFull (cloud VM)Ephemeral cloud compute, evals
daytonaFull (cloud container)Managed cloud dev environments
vercel_sandboxFull (cloud microVM)Cloud execution with snapshot-backed filesystem persistence
singularityNamespaces (--containall)HPC clusters, shared machines

For a deeper look at every backend option, read my guide to the Hermes Agent backend.

📺 Watch: Hermes3D Is INSANE: AI Agents Now Have a 3D Office

Docker hardening: what you get out of the box

The Docker backend runs commands with security hardening built in: all capabilities dropped, no privilege escalation and PID limits. You don't have to configure that part.

On top of that, you get knobs to tighten it further:

One warning from the docs: docker_extra_args gets appended to the docker run command and can override Hermes defaults. Flags that conflict with the hardening will quietly weaken isolation. Use it sparingly.

Shared container vs per-session isolation

By default, Hermes starts one long-lived container and routes every terminal, file and code call into it. That container is shared across sessions, /new, /reset and subagents. Installed packages, files in /workspace and background processes all carry over.

That's great for getting work done. It's not a security boundary between conversations.

If you want that boundary, set container_persistent to false. Now every chat gets its own fresh sandbox, created on its first terminal or file call and removed when the session closes or sits idle past lifetime_seconds. Nothing carries over between sessions. No files, no mounts, no background processes.

Add docker_mount_cwd_to_workspace set to true and only the workspace attached to that session is mounted at /workspace. A fresh session with no attached folder gets an empty workspace. Subagents still share their parent session's container.

My take: if one person uses the agent, the shared container is fine. If your agent talks to different people, for example through a bot, use per-session isolation. That pairs well with Hermes Agent bot mode.

Not sure which setup fits your business? Book a free AI strategy session and we'll work it out.

📺 Watch: Hermes AI Agents Just Went Portable

The egress credential-injection proxy

Here's the part most people miss. Even in a sandbox, if you pass your real API keys into the container, the agent can see them.

Hermes fixes that with the egress credential-injection proxy. With it on, the sandbox never sees your real API keys. It only gets opaque proxy tokens that work exclusively from behind a local TLS-intercepting daemon. The daemon swaps those tokens for the real credentials at the network boundary.

Your code inside the sandbox still reads the normal variable names, like OPENROUTER_API_KEY. It just gets a proxy token instead of the real secret.

Setup per the docs is: hermes egress setup and then hermes egress start. The setup command is an interactive wizard. There's also hermes egress setup --from-bitwarden if you keep secrets in Bitwarden Secrets Manager, and hermes egress setup --rotate-tokens to mint fresh proxy tokens.

Know the limit: Docker is the only backend wired for this right now. The docs say Modal, SSH, Daytona and Singularity are not wired yet. It's also disabled by default, so you have to turn it on.

How to set it up, step by step

Here's the simple path with Docker.

  1. Install Docker. You need Docker Desktop or Docker Engine installed and running. Podman also works if you set HERMES_DOCKER_BINARY to podman.
  2. Switch the backend. Run hermes config set terminal.backend docker. For a remote server instead, run hermes config set terminal.backend ssh.
  3. Set your limits. In your config, under terminal, set container_cpu, container_memory and container_disk. The docs example uses 1 CPU, 5120 MB of memory and 51200 MB of disk.
  4. Pick shared or per-session. Leave container_persistent as true for one shared container, or set it to false for a fresh sandbox per session.
  5. Decide on network. Leave docker_network as true, or set it to false to air-gap the container.
  6. Turn on the egress proxy. Run hermes egress setup, then hermes egress start. Running hermes setup terminal also points Docker users at it.

A minimal config looks like this:

terminal:
backend: docker
docker_image: "nousresearch/hermes-sandbox:desktop"
container_cpu: 1
container_memory: 5120
container_persistent: false
docker_network: true

Or skip the typing. Ask your Hermes agent: "Switch my terminal backend to Docker with per-session isolation and set up the egress proxy." Let it run the commands and tell you what changed. That's how I'd tell anyone in my community to do it. If you'd rather have someone walk you through it, book a free AI strategy session.

What runs inside the sandbox

This is where it gets good. On Docker, the browser and computer use run inside the sandbox too, not on your desktop.

Per the docs, computer_use, the bot's browser and the screen they act on always run in the same place. With docker, ssh or singularity, the default placement is inside the sandbox. The desktop stack, Chromium and cua-driver run in the container or on the SSH host. The pane streams the sandbox's screen, and nothing of your host desktop is reachable.

With modal, daytona or vercel_sandbox, the screen is refused for now, because those backends can't host a display yet. Hermes tells you so rather than quietly running the screen on your host. You can force the old behaviour with placement set to gateway, but that's an explicit opt-in.

The sandbox needs the desktop stack, and nousresearch/hermes-sandbox:desktop is the default image for the container backends. Use another image and shell work still runs, but the screen then needs placement set to gateway.

Want to know which tools are worth enabling once your sandbox is up? See my list of the best Hermes Agent tools. Before you trust any model in that setup, test it, which is why I built Goldie Bench. And for the full system of profiles, skills and sandboxes working together, read my Agent OS guide.

FAQ

Does Hermes run in a sandbox by default?

No. The default backend is local, which has no isolation, and the agent has the same filesystem access as your user account. You switch to a sandbox by changing terminal.backend to docker, ssh, modal, daytona, vercel_sandbox or singularity.

Which Hermes Agent sandbox backend should I use?

Docker for most people: full isolation with dropped capabilities, no privilege escalation and PID limits, and it's the only backend wired for the egress proxy right now. Use ssh for remote hardware, and modal, daytona or vercel_sandbox for cloud execution.

Can the sandbox see my API keys?

Only if you pass them in. With the egress credential-injection proxy on Docker, the sandbox only gets opaque proxy tokens, and the real keys are swapped in at the network boundary. Run hermes egress setup, then hermes egress start.

How do I stop sessions sharing one container?

Set container_persistent to false on the Docker backend. Each session then gets its own fresh container, removed when the session closes or goes idle past lifetime_seconds.

Want Hermes courses, daily updates and 4 coaching calls a week? Join the AI Profit Boardroom for $69/mo. Or get a plan for your own setup with a free AI strategy session.

What members say about the AI Profit Boardroom

Read all 114 reviews on Skool →

★ 4.9 out of 5 from 114 member reviews on Skool

Yosuke Sato, AI Profit Boardroom member review (5 stars, paying member for 17 months): The best Skool course you get for AI! I have attended a few Skool courses before, but AI Profit Boardroom is the most active community and has great support from the management team, including Julian! You can get the most up-to-date information and practical implementations in this community. I highly recommend this!Mazzie T, AI Profit Boardroom member review (5 stars, paying member for 10 months): My mind is blown everyday with all the content and the incredible information. So much support and I love the personalised attention and quick responses. The community is great and people are very responsive and helpful.Rene Clayton, AI Profit Boardroom member review (5 stars, paying member for 9 months): The AI Profit Boardroom is a GAME CHANGER people. I could not be more thrilled that I joined!! So much support, more information than you can even consume, a huge value for what the small fee was. I have grown my business, my knowledge and my FUN!. SUCH a fantastic leader and group of humans. I am incredibly honored to be a part of this fantastic group of intelligent humans :-) THANK YOU!Arpiet Malpani, AI Profit Boardroom member review (5 stars, paying member for 8 months): Incredible learning from Julian and team. I started out in march and was able to build end to end SAAS with the help and learning from this group. I am incredibly thankful to Julian for crazy support and prompt response.James Grimm, AI Profit Boardroom member review (5 stars, paying member for 7 months): I asked Julian for help finding local business websites with little to no traffic. Julian was gracious in providing me my personal "how-to" video instruction. Wow, this is the pinnacle of customer service! I am just one of 3,400 subscribers and Julian took the time to help me personally. Thank you Julian for your assistance and outstanding custoemr support and care. James (Jim) GrimmNick Good, AI Profit Boardroom member review (5 stars, paying member for 4 months): I’m part of many AI groups and hands down, what Julian Goldie, has built here…the classroom trainings are amazing, but the community he has created is second to none (the community is worth the cost of joining!). If you’re looking to become the AI expert and build/create something meaningful, then AI Profit Boardroom is for YOU!Steven Gray, AI Profit Boardroom member review (5 stars, paying member for 4 months): Been in awhile. I’m a dad on a factory shift, not a tech bloke. Julian’s lot showed me how to use AI without drowning in tools. Avatar, voice, the workflow thinking — that’s what I needed. If you’re stuck on “where do I start,” this group’s worth it. I always read them.Steve Erickson, AI Profit Boardroom member review (5 stars, paying member for 4 months): I asked Julian a simple question, and he ended up creating a 10-minute video and a guide breaking down in extreme detail what I had asked. Amazing response!Rod Martin, AI Profit Boardroom member review (5 stars, paying member for 3 months): Julian is brilliant, and more prolific than I can keep up with (which is a great thing). His AgentOS is remarkable, and he is THE go-to guy for what you can really do (and not do) with the ever-increasing deluge of new AI upgrades and tools. HIGHLY recommend.Daniel Shulman, AI Profit Boardroom member review (5 stars, paying member for 4 months): Julian is very helpful. He doesn't try sell stuff you dont need and will give you a straight answer to your questions.Rj Herzog, AI Profit Boardroom member review (5 stars, paying member for 5 months): Top notch. If you are searching & searching thinking there is always something better out there.... You just found it. No need to look any further. Goldie covers it all & is super helpful. Can't beat the group either. Really can't recommend this group enough.Jermey Matthews, AI Profit Boardroom member review (5 stars, paying member for 6 months): While he has the capacity to do it, Julian is definitely doing the unscalable things to support his community.

Ready To Join The #1 AI Community?

Join 3,400+ entrepreneurs inside the AI Profit Boardroom. Get the Agent OS, 1,000+ plug-and-play AI agent workflows, daily Q&A with Julian and 4 live coaching calls every week.

Join The AI Profit Boardroom →

7-Day No-Questions Refund • 30-Day ROI Guarantee

← Back to all posts