AI agents

Email for Hermes Agent without your personal Gmail

Create agent@yourdomain.com in your own Cloudflare account, give Hermes Agent a key that reaches only that mailbox, and install the MarkRelay skill. Hermes Agent can then read, search, send and reply from that address, and nothing else.

Facts checked

In short

Deploy MarkRelay to your Cloudflare account, create agent@yourdomain.com, create an API key scoped to that one mailbox, and install the MarkRelay skill in Hermes Agent. Install it with hermes skills install https://<your-deployment>/skills/SKILL.md; Hermes makes it a slash command, /markrelay-mail. Hermes Agent can then check, read, search, send, reply to and forward mail from that address, and nothing else. Mail stays in your own Cloudflare D1 and R2, and MarkRelay charges nothing per inbox or per message.

What Hermes Agent can do with its mailbox

List the mailboxes its key can use

MarkRelay
GET /mailboxes

Check and search mail

MarkRelay
By folder, read state, sender, subject, text and date

Read a message and its attachments

MarkRelay
Yes

Send from its own address

MarkRelay
Up to 50 recipients, 5 MiB per message

Reply and forward in the same thread

MarkRelay
Yes

Mark read, star, move to a folder

MarkRelay
Yes

Reach other mailboxes

MarkRelay
No: the key reaches only the mailboxes you grant

Hear about new mail at once

MarkRelay
Signed webhook to your own runner

How it connects

MarkRelay
Agent Skill + HTTP API, or the remote MCP server

Needs

MarkRelay
A domain on Cloudflare DNS; Workers Paid to send

Its own address

agent@yourdomain.com, on your domain and in your Cloudflare account.

One mailbox, one key

The key reaches that mailbox and nothing else.

Installs as a skill

Hermes Agent loads the skill your deployment serves at /skills/SKILL.md.

People stay in the loop

Review and take over the agent's threads in webmail.

Set it up in Hermes Agent

1. Deploy MarkRelay with the Deploy to Cloudflare button and add your domain. 2. Create a mailbox for the agent, such as agent@yourdomain.com. 3. In Developer → API keys, create a key with Specific mailboxes scope and pick only that mailbox. 4. Install the skill your deployment serves at /skills/SKILL.md and give the agent the API URL and key.

The quickest way is to paste one message into Hermes Agent: it downloads the skill, asks you for the key, stores it and checks the connection.

The address you open MarkRelay at. The prompts and commands below fill it in; until then the prompt asks your agent to ask you.

Install the MarkRelay skill in Hermes Agent

Fastest: paste this into Hermes Agent

It installs the skill, asks you for the key, stores it, and checks the connection.

prompt
Set up the MarkRelay email skill for yourself. First ask me for my MarkRelay address (for example https://mail.example.com); below it is called MARKRELAY_URL. Then, run: hermes skills install MARKRELAY_URL/skills/SKILL.md. Then save MARKRELAY_API_URL=MARKRELAY_URL/openapi/v1 and MARKRELAY_API_KEY in ~/.hermes/.env, and list both in terminal.env_passthrough in ~/.hermes/config.yaml. Ask me for the key; never put it in a repository. Finally, use the skill to list the mailboxes the key can reach.

Or do it yourself

1. Install the skill

terminal
hermes skills install https://<your-deployment>/skills/SKILL.md

2. Give it the API URL and key

~/.hermes/.env
MARKRELAY_API_URL=https://<your-deployment>/openapi/v1
MARKRELAY_API_KEY=sk-...
~/.hermes/config.yaml
terminal:
  env_passthrough: [MARKRELAY_API_URL, MARKRELAY_API_KEY]

Hermes keeps secrets in ~/.hermes/.env and forwards only the variables you list to its terminal tool.

3. Ask, or call /markrelay-mail

  • Hermes installs the skill into ~/.hermes/skills and makes it a slash command: /markrelay-mail check support@ for new mail.
  • Install it again after you update MarkRelay to pick up the latest skill.

What to ask Hermes Agent

Talk to the agent in plain language. The skill tells it which calls to make, how to page through results, and never to retry a send without checking first.

  • “/markrelay-mail check support@ for new mail.”
  • “Who emailed agent@ this week, and what do they want?”
  • “Reply to the invoice question from Northwind.”
  • “Forward anything about the outage to ops@acme.com.”
hermes agent — ~/acme
›Check agent@acme.com for unread mail. Answer password-reset requests yourself and flag anything else for me.
●Using skill markrelay-mail
$curl -s -H "Authorization: Bearer $MARKRELAY_API_KEY" "$MARKRELAY_API_URL/emails?mailbox=agent@acme.com&read=false"
2 unread: “Reset my password please” (Sam Patel) · “Where is order #4830?” (Elena García)
$curl -s -X POST … "$MARKRELAY_API_URL/emails/b68419a2-…/reply" -d '{"text":"Hi Sam, I have sent a fresh reset link…"}'
{"id":"528a8469-74ee-4dc4-8023-0d3882699ad2"}
●Replied to Sam Patel with a fresh reset link. Elena García is asking about order #4830, which needs a tracking lookup, so I left it unread for you.
The API calls and answers are from a demo deployment; the conversation is illustrative.

Why not your personal Gmail

A key scoped to agent@yourdomain.com cannot open any other mailbox, so Hermes Agent never sees your personal or customer mail. The agent sends from your own domain, and its mail stays in your own Cloudflare account.

Everything the agent sends appears in MarkRelay's webmail with an API badge, so a person can review a thread, take over or reply by hand.

mail.yourdomain.com
The API keys page with the Create API key dialog open, its scope set to the agent@acme.com mailbox only
A key that reaches agent@acme.com and nothing else.

How it connects to Hermes Agent

Hermes Agent's built-in email gateway logs into a mailbox over IMAP and SMTP. MarkRelay connects through the skill instead: Hermes reads and sends over MarkRelay's HTTP API whenever you ask, from the terminal or any platform Hermes is connected to.

Keep the API URL and key in ~/.hermes/.env and list both in terminal.env_passthrough in ~/.hermes/config.yaml, so Hermes forwards only those two variables to its terminal tool.

MarkRelay, AgentMail or your own Gmail

Three ways to give an agent email, compared on what matters for an agent.

The agent's address

MarkRelay
agent@yourdomain.com
AgentMail
On AgentMail's domain, or yours on paid plans
Your Gmail
Your personal address

Where mail is stored

MarkRelay
Your Cloudflare D1 and R2
AgentMail
AgentMail's cloud
Your Gmail
Google

What the agent's key reaches

MarkRelay
Only the mailboxes you grant
AgentMail
The inboxes in your AgentMail account
Your Gmail
Whatever its OAuth scope allows in your mailbox

Price for more agents

MarkRelay
No per-inbox fee
AgentMail
3 inboxes free, then plans from $20/mo
Your Gmail
One Google account per address

People review in webmail

MarkRelay
Yes
AgentMail
—
Your Gmail
Yes

Installs as an Agent Skill

MarkRelay
Yes
AgentMail
—
Your Gmail
—

MCP server

MarkRelay
Yes
AgentMail
Yes
Your Gmail
—

AgentMail facts from agentmail.to/pricing. “—” means it does not say.

Common questions

How do I give Hermes Agent its own email address?

Create a mailbox such as agent@yourdomain.com in MarkRelay, create an API key scoped to that mailbox, and install the skill your deployment serves at /skills/SKILL.md in Hermes Agent with MARKRELAY_API_URL and MARKRELAY_API_KEY set. Install it with hermes skills install https://<your-deployment>/skills/SKILL.md; Hermes makes it a slash command, /markrelay-mail.

Can Hermes Agent read my other mailboxes?

No. A key reaches only what its owner can open, narrowed to the scope chosen for it. A key scoped to agent@ sees no other mailbox, in any call.

Is there an MCP server?

Yes. Every deployment is a remote MCP server at /mcp: add the URL, sign in, and pick the mailboxes it may use. Agents that run commands can use the skill and plain HTTP API instead, so nothing extra runs next to the agent.

Does MarkRelay work with Hermes Agent's email gateway?

The gateway connects over IMAP and SMTP; MarkRelay connects through its skill and HTTP API. Hermes then checks and sends mail when you ask rather than being triggered by incoming mail. To react to new mail automatically, send MarkRelay's signed webhook to your own automation.

How do I update the skill?

Run hermes skills install again after you update MarkRelay, so Hermes picks up the latest skill from your deployment.

What does it cost?

One MarkRelay license (Annual $99/year or Lifetime $249 once) covers any number of agent mailboxes. Cloudflare bills its own usage: Workers Paid ($5/month) includes 3,000 sent emails a month, then $0.35 per 1,000; receiving through Email Routing is free.

Go deeper

Explore more of MarkRelay

Use cases

Own your email stack today

Buy MarkRelay once and run it in your Cloudflare account. MarkRelay adds no per-message or per-seat charge; Cloudflare usage and service limits remain separate.