Create the agent and configure the token
In the Relay app choose Create your own, name your contact, and copy its one-time Agent Token. Then add to
~/.hermes/.env:RELAY_AGENT_TOKEN in the Hermes process environment or its secret manager. It authenticates as the Relay contact and should not be committed to source control.
Pick a delivery mode
Like Telegram’s Bot API, Relay offers two interchangeable ways to receive messages. Use exactly one at a time:- Long polling (
GET /v1/events?timeout=25): no public inbound URL required. Right for machines behind NAT, home labs, and local development. This is what the Hermes plugin uses. - Webhook (
POST /v1/webhook): Relay pushes signed events to your HTTPS endpoint. Right for hosted runtimes with a public URL.
event_id either way.