# How do I run Hermes Agent in the cloud with memory, skills, an inbox and Telegram?

> Create a Sanbox Hermes Computer template with the email and Telegram channels, then start one always-on run with an AgentMail address and your Telegram bot. Memory and skills stay on its disk.

- Source: Sanbox knowledge base, by Sanlabs GmbH
- URL: https://sanbox.cloud/kb/always-on-agents/hermes-agent-in-the-cloud/
- Type: how-to
- Section: Always-on personal agents
- Language: en
- Published: 2026-11-06
- Updated: 2026-11-06

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

```text
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@latest` and sign in with `sanbox 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.to` or 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

```bash
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.

```bash
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:

```bash
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-id`** makes 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-user`** is repeatable. Only the listed user IDs reach this Computer through Telegram.
- **Don't add `--wait`.** A Hermes Computer stays `running`; 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:

```bash
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](https://console.sanbox.cloud) 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.

```bash
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:

```bash
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:

```json
{
  "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?](https://sanbox.cloud/kb/security/api-keys-your-agent-cannot-see/)

## 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](https://sanbox.cloud/kb/teams/trigger-an-agent-from-slack-teams-or-whatsapp/) and [Give your AI agent its own phone number](https://sanbox.cloud/kb/always-on-agents/give-your-agent-a-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?](https://sanbox.cloud/kb/always-on-agents/mac-mini-vs-vps-vs-cloud-computer/)
- [Where should I host OpenClaw so it keeps running?](https://sanbox.cloud/kb/always-on-agents/where-to-host-openclaw/)
- [What survives when an agent's computer stops?](https://sanbox.cloud/kb/agent-computers/what-survives-a-stop/)
- [How do I restrict which domains an AI agent can reach?](https://sanbox.cloud/kb/security/restrict-which-domains-an-agent-can-reach/)

## Sources

- Nous Research, [Hermes Agent documentation](https://hermes-agent.nousresearch.com/docs/) (open source, MIT licence; persistent memory across sessions), checked 2026-11-06
- Hermes Agent, [Skills](https://hermes-agent.nousresearch.com/docs/user-guide/features/skills) (skills created from experience and reused), checked 2026-11-06
- Hermes Agent, [Telegram setup](https://hermes-agent.nousresearch.com/docs/user-guide/messaging/telegram) (@BotFather `/newbot` token, numeric user ID from @userinfobot), checked 2026-11-06

## Next step

Talk to us at sales@sanlabs.ai. Sanlabs' forward-deployed engineers build agent use cases with your team, with experience in aviation, pharmaceuticals, supply chain and logistics, and internal admin workflows. How we work: https://sanbox.cloud/kb/teams/forward-deployed-engineering.md

Existing customers can use Sanbox from a coding agent: install the CLI with `npm install -g @sanlabs/sanbox-cli@latest`, sign in with `sanbox login`, then run `sanbox skill` for the full agent guide.
