AI agents

Give your OpenClaw agent its own email address on your domain

Create agent@yourdomain.com in your own Cloudflare account, give OpenClaw a key that reaches only that mailbox, and install the MarkRelay skill. OpenClaw 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 OpenClaw. OpenClaw loads it from ~/.agents/skills (or ~/.openclaw/skills) and reads the API URL and key from skills.entries."markrelay-mail".env in ~/.openclaw/openclaw.json. OpenClaw 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 OpenClaw 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

OpenClaw 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 OpenClaw

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 OpenClaw: 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 OpenClaw

Fastest: paste this into OpenClaw

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, download MARKRELAY_URL/skills/SKILL.md to ~/.agents/skills/markrelay-mail/SKILL.md. Then save MARKRELAY_API_URL=MARKRELAY_URL/openapi/v1 and MARKRELAY_API_KEY in skills.entries."markrelay-mail".env in ~/.openclaw/openclaw.json. 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
mkdir -p ~/.agents/skills/markrelay-mail
curl -fsS https://<your-deployment>/skills/SKILL.md \
  -o ~/.agents/skills/markrelay-mail/SKILL.md

2. Give it the API URL and key

~/.openclaw/openclaw.json
{
  skills: {
    entries: {
      "markrelay-mail": {
        env: {
          MARKRELAY_API_URL: "https://<your-deployment>/openapi/v1",
          MARKRELAY_API_KEY: "sk-...",
        },
      },
    },
  },
}

The Gateway runs as a service, so set the variables here rather than in your shell.

3. Ask, or call /markrelay-mail

  • OpenClaw also reads ~/.openclaw/skills. The new skill appears on your next message; no restart needed.
  • Ask from any channel OpenClaw is connected to, such as Telegram or WhatsApp: “anything urgent in support@ today?”

What to ask OpenClaw

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.

  • “Anything urgent in support@ today?”
  • “Summarize this week's mail from Northwind.”
  • “Reply to Dana that the order ships Monday.”
  • “Forward the latest invoice to billing@.”
openclaw — ~/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 OpenClaw 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 OpenClaw

MarkRelay connects to OpenClaw as a skill. Ask from any channel OpenClaw is linked to, such as Telegram or WhatsApp, and the agent checks, reads and sends through MarkRelay's HTTP API.

It is a skill rather than an OpenClaw email channel, so a new email does not start a conversation by itself. To react to new mail automatically, point a MarkRelay webhook at your own automation, or ask OpenClaw to check on a schedule.

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 OpenClaw 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 OpenClaw with MARKRELAY_API_URL and MARKRELAY_API_KEY set. OpenClaw loads it from ~/.agents/skills (or ~/.openclaw/skills) and reads the API URL and key from skills.entries."markrelay-mail".env in ~/.openclaw/openclaw.json.

Can OpenClaw 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.

Is MarkRelay an OpenClaw channel?

No, it is a skill. OpenClaw reads and sends mail when you ask from any of its channels. For new mail to trigger work on its own, send MarkRelay's signed email.received webhook to your own automation.

Do I need to restart OpenClaw after installing the skill?

No. The skill appears on your next message. Because the Gateway runs as a service, set the API URL and key in ~/.openclaw/openclaw.json rather than in your shell.

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.