Skip to main content

Coding agents

Hermes Agent

Run Hermes Agent in a sandbox from the prebuilt hermes template. Its terminal and file tools work on the sandbox, and its memory, sessions and skills stay there between turns.

Maintained by
E2B
How it works
Prebuilt hermes sandbox template
Package
e2b
Language
TypeScript, Python

Set it up

Get started

Paste the prompt into your coding agent, or follow the steps yourself.

Paste this into your coding agent

Run Hermes Agent in an E2B sandbox from this project.

  1. 1.Install the e2b SDK using the project's package manager.
  2. 2.The SDK needs the E2B_API_KEY environment variable, and Hermes needs a model provider key such as OPENROUTER_API_KEY. If E2B_API_KEY isn't set, ask me for my API key from https://console.e2b.dev/?tab=keys. Never hardcode either key.
  3. 3.Follow the Hermes Agent guide at https://docs.e2b.dev/agents/hermes: create a sandbox from the hermes template, pass the provider key in envs, and run hermes chat -Q --yolo -q for a single headless turn. Kill the sandbox when it's done.
  4. 4.Run one task and show me the output that came from the sandbox.

Or set it up yourself

  1. 1. Install the E2B SDK

    pip install e2b
  2. 2. Set your API keys

    export E2B_API_KEY="e2b_..."
    export OPENROUTER_API_KEY="..."
  3. 3. Run a headless turn

    import os
    from e2b import Sandbox
    
    sandbox = Sandbox.create("hermes", envs={
        "OPENROUTER_API_KEY": os.environ["OPENROUTER_API_KEY"],
    }, timeout=600)
    
    result = sandbox.commands.run(
        'hermes chat -Q --yolo --provider openrouter '
        '--model anthropic/claude-sonnet-4.6 '
        '-q "Inspect this workspace and summarize its purpose"',
    )
    
    print(result.stdout)
    sandbox.kill()
  4. 4. Continue the session

    hermes chat -Q --yolo -c -q "Continue the investigation and implement the first fix"

Security

What runs in the sandbox

Hermes runs inside the sandbox, so its terminal and file tools act on the sandbox, not your machine.

  • ToolsTerminal, file, browser, memory and skill tools, auto-approved with -⁠-⁠yolo and contained by the sandbox.
  • StateSkills under ~/.hermes/skills and memory under ~/.hermes/memories last as long as the sandbox does.
  • SessionsConversations are saved in the sandbox. -⁠c continues the latest one, -⁠-⁠resume picks one by ID or title.
  • SecretsYour host files and credentials stay out unless you copy or pass them into the sandbox.

3B+ sandboxes started

Give every agent a machine