A lightweight, Docker-free environment for running Hermes Agent inside GitHub Codespaces, with remote access from the Hermes Desktop App.
/workspaces/GregDavies91/
├── requirements.txt # Python dependencies
├── setup.py # Writes ~/.hermes config and shell exports
├── .gitignore # Prevents committing ~/.hermes/.env
└── README.md # This file
~/.hermes/ # Created by setup.py
├── .env # Session token + provider keys
├── config.yaml # terminal.backend: local
└── .session_token # Persistent dashboard token
Open the terminal in your Codespace (Ctrl + `` / Cmd + `` ).
pip install -r requirements.txt
pip install modal
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bashpython -m modal setupFollow the printed link to authorize Codespaces with Modal. Alternatively, export tokens directly:
export MODAL_TOKEN_ID="your-token-id"
export MODAL_TOKEN_SECRET="your-token-secret"Verify the Modal config was created:
cat /home/codespace/.modal.tomlRun the repo setup script to create ~/.hermes, set the local backend, generate a persistent session token, and export the required environment variables:
python3 setup.py
source ~/.bashrcVerify the generated config files:
code ~/.hermes/.env
code ~/.hermes/config.yamlLink your LLM provider:
hermes setuphermes dashboard --host 0.0.0.0 --port 9119 --insecure --tui --no-open- Open the Ports tab in Codespaces.
- Right-click 9119 → Port Visibility → Public.
- Copy the Forwarded Address URL, e.g.
https://<codespace-id>-9119.app.github.dev.
- Open Hermes Desktop App → Settings → Gateway → Remote Connection.
- Remote URL: paste your Codespaces forwarded URL.
- Token: the same value stored as
HERMES_DASHBOARD_SESSION_TOKENin~/.hermes/.env. - Click Save & Reconnect.
- Keep
~/.hermes/.envprivate and out of git. - Only set port 9119 to Public while actively using Remote Gateway.