Skip to main content
The terminal backend determines where the agent executes shell commands. You can run commands on your local machine, inside a Docker container, on a remote server over SSH, or in serverless cloud sandboxes that hibernate when idle.

What terminal backends are

Every call to the terminal and file tools routes through an execution backend. The backend provides an isolated environment with its own filesystem, shell, and process namespace. Backends are persistent across a conversation — the same shell session (with its working directory and environment) stays alive between tool calls.

Configuring the backend

Set the backend in ~/.hermes/config.yaml under terminal.backend:
Or set the TERMINAL_ENV environment variable:

Backends

The default backend. Commands run directly on your machine in your current working directory.
When to use: everyday development, scripts that need access to your local filesystem and tools.The local backend requires no setup and has no overhead. Use pty: true on the terminal tool for interactive programs (Python REPL, editors).

Common configuration options

Environment lifecycle

Backends are created lazily on first use and kept alive for the duration of the session. A background cleanup thread removes inactive environments after terminal.lifetime_seconds (default: 300 seconds) of inactivity — but only if there are no active background processes. To manually clean up an environment, end your session or run:
The TERMINAL_ENV environment variable overrides terminal.backend in config.yaml. This is useful for overriding the backend for a single session without changing your config.