Guide
How do I run Hermes Agent in the cloud with memory, skills, an inbox and Telegram?
Hermes Agent is Nous Research's open-source assistant: it keeps memory across sessions and turns work it has figured out into reusable skills. To run it in the cloud with an inbox and Telegram, create a Sanbox template of type hermes-computer with the email and Telegram channels, then start one run with an AgentMail address, your Telegram bot token and your numeric Telegram user ID. The Computer stays on until you stop it, and its memory, skills and files stay on its persistent disk. The general alternative is to install Hermes on a VPS or a home machine and run its gateway as a service yourself.
Run this with your agent
Read https://sanbox.cloud/kb/always-on-agents/hermes-agent-in-the-cloud.md and follow it to start an always-on Hermes Computer with email and Telegram.
If the Sanbox CLI is missing, install it with `npm install -g @sanlabs/sanbox-cli@latest`
and sign in with `sanbox login`. Show me each command before you create, stop or delete a Computer.
What do I need before I start?
- A Sanbox account and the CLI. Install it with
npm install -g @sanlabs/sanbox-cli@latestand sign in withsanbox login. Creating templates needs the organisation's owner or admin role. - A model provider connected in the Sanbox console. Hermes calls the model with your key; Sanbox doesn't sell models.
- For email: AgentMail connected to your organisation, and an address on
agentmail.toor on one of the AgentMail domains listed in the Sanbox console. - For Telegram: a bot token, which Telegram's @BotFather gives you when you send it
/newbot, and your numeric Telegram user ID, which @userinfobot replies with. The ID is a number, not your username.
1. Check your sign-in and pick a model
sanbox auth check --json
sanbox model-providers list --json
sanbox model-providers models <provider-id> --json
Use the exact provider ID and model ID these commands return.
2. Create the Hermes template
A Hermes template declares which channels its runs may use. The channel credentials never go into the template; you pass them when you start a run.
sanbox templates create --name "Hermes assistant" --type hermes-computer \
--model-provider <provider-id> --model <model-id> \
--channel email --channel telegram \
--network-policy policy.json --json
sanbox templates validate <template-id> --json
Leave out both --channel flags if you only want the hosted Hermes web UI. The policy.json file is described under "Lock down egress" below. Leave out --network-policy and the Computer stays deny-by-default.
3. Start the Computer with an inbox and Telegram
Read the bot token into an environment variable so it doesn't land in your shell history, then start the run:
read -rs SANBOX_TELEGRAM_BOT_TOKEN
export SANBOX_TELEGRAM_BOT_TOKEN
sanbox run --template <template-id> \
--external-run-id "hermes-assistant-1" \
--email-address "<name>@agentmail.to" \
--telegram-allowed-user <numeric-telegram-user-id> \
--json
--external-run-idmakes the command safe to repeat: run it again with the same ID and Sanbox returns the existing Computer instead of creating a second one.--telegram-allowed-useris repeatable. Only the listed user IDs reach this Computer through Telegram.- Don't add
--wait. A Hermes Computer staysrunning; it never reaches a finished state. - The task is optional. Without one, Hermes starts its gateways and waits for messages. With one (
--task "..."), the instruction seeds its persistent operating context.
Check that it's up:
sanbox runs get <run-id> --json
When the state is running, the Computer is ready.
4. Talk to it
- Web UI: open the run in the Sanbox console and use the hosted Hermes UI.
- Email: send mail to the address you chose.
- Telegram: message your bot from an allowed account.
All three reach the same agent, with the same memory and skills.
How do memory and skills survive a stop?
Hermes keeps its memory, skills, chat history and files on the Computer's disk. A stop ends compute and saves that disk. A resume boots the Computer fresh with the same disk, so the agent picks up its memory and skills again. What a stop doesn't keep is RAM, running processes and open network connections.
sanbox runs stop <run-id> --wait --json
sanbox runs resume <run-id> --wait --json
While it's stopped, the agent doesn't answer email or Telegram. Nothing stops it automatically: a Hermes Computer runs until you stop it.
To inspect what it has saved, open a terminal in the console or SSH in while it runs:
sanbox ssh <run-id>
Lock down egress
The network policy covers outbound traffic only, and it is deny-by-default. List the extra sites and APIs you want Hermes to use. The rules for the template's model provider and for the agent itself are managed by Sanbox. For example, to let Hermes read GitHub's API:
{
"default_action": "deny",
"rules": [
{ "destination": "api.github.com", "ports": [{ "from": 443, "to": 443 }] }
]
}
If Hermes needs an API key for one of those services, don't paste it into chat. Store it in a secret proxy, which adds the key to matching requests on their way out of the Computer, so the agent never sees it. See How do I give an AI agent API keys without exposing them?
What this doesn't do
- Other channels. The Hermes Computer activates email and Telegram. Slack, Microsoft Teams, WhatsApp and phone numbers are enabled on request: see Trigger an AI agent from Slack, Microsoft Teams or WhatsApp and Give your AI agent its own phone number.
- Forks and snapshots. A run with email or Telegram can't be forked, and snapshots follow the same rule. Plan one Computer per assistant.
- Sleep and wake. There's no automatic sleep. Stop it yourself when you don't need it.
- Large data. The disk is 1 to 8 GB, set per template with
sanbox templates storage set <template-id> --gb <1-8>. - Email domains. The address must use a listed AgentMail domain.
Related
- Mac mini vs VPS vs cloud computer for an always-on AI agent: what does it cost?
- Where should I host OpenClaw so it keeps running?
- What survives when an agent's computer stops?
- How do I restrict which domains an AI agent can reach?
Sources
- Nous Research, Hermes Agent documentation (open source, MIT licence; persistent memory across sessions), checked 2026-11-06
- Hermes Agent, Skills (skills created from experience and reused), checked 2026-11-06
- Hermes Agent, Telegram setup (@BotFather
/newbottoken, numeric user ID from @userinfobot), checked 2026-11-06