Documentation navigation

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

  1. Create a dedicated mailbox such as agent@example.com.
  2. Create a member identity for the agent owner or integration.
  3. Grant only the mailbox or domain the workflow needs.
  4. Create a named personal API key with selected-mailbox scope.
  5. 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

  1. Call GET /mailboxes and choose the configured address.
  2. List unread Inbox messages.
  3. Fetch full detail for the next conversation.
  4. Classify it, draft a reply, or send it to a human review queue.
  5. 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.