AI Agent Skill
Give an AI agent its own business mailbox—or controlled access to an existing one. MarkRelay provides a compact tool contract the agent can discover and use for sending, triage, replies, and attachments.
Create a safe agent mailbox
- Create a dedicated mailbox such as
agent@example.com. - Create a member identity for the agent owner or integration.
- Grant only the mailbox or domain the workflow needs.
- Create a named personal API key with selected-mailbox scope.
- Store the key in the agent runtime's secret manager.
Install the skill
Every deployment serves two agent-friendly resources:
/open/markrelay/llms.txt— concise API instructions for model context;/open/markrelay/skill.md— an installable skill with frontmatter.
mkdir -p ~/.claude/skills/markrelay-email
curl -s https://<your-deployment>/open/markrelay/skill.md \
> ~/.claude/skills/markrelay-email/SKILL.md
export MARKRELAY_API_KEY=sk-...What an agent can do
- Discover mailboxes available to its API key.
- Send email with Markdown and personalization variables.
- Triage inboxes by folder, unread state, sender, subject, and date.
- Read and organize messages without relying on browser automation.
- Reply and forward while preserving conversation context.
- Upload and download files through attachment IDs.
Example workflow
- Call
GET /mailboxesand choose the configured address. - List unread Inbox messages.
- Fetch full detail for the next conversation.
- Classify it, draft a reply, or send it to a human review queue.
- Reply and then update the message state.
Recommended guardrails
- Use a dedicated key and mailbox for each agent workflow.
- Require human approval for sensitive or high-value replies.
- Validate recipients and attachments before sending.
- Rotate keys and review mailbox access regularly.
- Use webhooks when the agent should react to new mail immediately.
See the complete Email API guide.