Harden Hermes: Route All Tool Calls Through Docker Containers
Advanced · 30 minutes · 5 tasks, checked automatically · 100 points
By default, Hermes Agent executes tool calls directly on the host process. This is a significant security risk — a misbehaving or malicious tool invocation can read host files, exfiltrate environment variables, or damage the system. In this lab you will reconfigure Hermes to use its Docker execution backend, so every tool call spawns a throwaway container that is destroyed after the call completes. You will install Hermes, inspect its default backend, write the Docker backend configuration, verify the backend is active via `hermes doctor`, and finally confirm that a tool invocation is sandboxed by checking that it runs inside a container rather than on the host.
What you’ll learn
- Install Hermes Agent inside the toolbox container and verify connectivity to the local Ollama model sandbox
- Understand the default (host) execution backend and its security implications by inspecting the baseline configuration
- Switch Hermes to the Docker execution backend by writing the correct cli-config.yaml stanza so tool calls run in isolated, throwaway containers
- Confirm the Docker backend is active and healthy using `hermes doctor`
- Prove end-to-end isolation by running a tool call and verifying it executed inside a container, not on the host
How this lab works
- Start the lab: One click starts a sandbox with a local model and the agent’s toolbox: no API key and no token bill.
- Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work inspects the agent, its config and its output, and says what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Runs: Locally, against a model on your computer: no API key, no tokens
- Model: qwen2.5:3b
- Open source: github.com/NousResearch/hermes-agent
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Docker Desktop (or Podman / Rancher Desktop) installed and running
- A model sandbox started in the Agent Playground
Topics: hermes-agent, docker-backend, tool-isolation, execution-sandbox, cli-config-yaml, security-hardening, ollama, qwen2.5, container-security, throwaway-containers
Create a free account to start this lab.
Keep going
- Lock OpenClaw Down: Pairing Approval, Per-Skill Permission Scoping, and Shell Command Allowlisting
- Sandbox a Filesystem MCP Server: Path Allowlisting, Traversal Denial, and Escape Proof
- Sandboxed Shell: Giving a CrewAI Agent an Allowlisted Command Executor
- Safe Filesystem MCP Server: Path Allowlisting & Inspector-Driven Testing
- Persistent OpenClaw: docker-compose with Surviving Volumes
- Autonomous File Triage & Daily Digest with OpenClaw