Skip to navigation

Skills

Add AgentMail to AI coding assistants with the official skill

Getting started

AgentMail provides an official skill that can be installed on AI coding assistants and agents that support the AgentSkills format. This includes OpenClaw, Claude Code, Cursor, Codex, and other compatible tools.

The skill is available at skills.sh/agentmail-to/agentmail-skills/agentmail.

Installation

Install the skill using the skills CLI. This works with Claude Code, Cursor, OpenClaw, Codex, and other compatible agents:

npx skills add agentmail-to/agentmail-skills

To skip interactive prompts, specify the skill and agent directly:

npx skills add agentmail-to/agentmail-skills --skill agentmail --agent claude-code

Plugins for Claude Code, Cursor, and Codex

The AgentMail plugin bundles these skills with the hosted MCP server, so the assistant can act on your inboxes and sign them in to apps with AgentID. It signs in with OAuth on first use; no API key is needed.

Claude Code
/plugin marketplace add agentmail-to/agentmail-plugins
/plugin install agentmail@agentmail
Cursor
/add-plugin agentmail
Codex
codex plugin marketplace add agentmail-to/agentmail-plugins
codex plugin add agentmail@agentmail

Start a new session after installing. Plugin skills are namespaced in Claude Code, for example /agentmail:check-email, and use a $ prefix in Codex, for example $check-email.

OpenClaw

OpenClaw users should install the official plugin instead, which bundles this skill along with the email channel. See OpenClaw.

openclaw plugins install clawhub:@agentmail/agentmail

Manual installation

You can also manually clone the skill repository:

git clone https://github.com/agentmail-to/agentmail-skills.git ~/.skills/agentmail

Configuration

After installation, configure your AgentMail API key. The method varies by platform:

Environment variable

Set the AGENTMAIL_API_KEY environment variable:

export AGENTMAIL_API_KEY="your-api-key-here"

OpenClaw configuration

Add the API key to ~/.openclaw/openclaw.json:

{
"skills": {
"entries": {
"agentmail": {
"enabled": true,
"env": {
"AGENTMAIL_API_KEY": "your-api-key-here"
}
}
}
}
}

Get your API key from the AgentMail Console.

Features

The official AgentMail skill provides comprehensive email functionality:

Inboxes

Create scalable inboxes on-demand. Each inbox has a unique email address that your AI agent can use to send and receive emails.

Messages

Send emails with both plain text and HTML content for best deliverability. The skill handles proper formatting and headers automatically.

Threads

Threads group related messages in a conversation, making it easy to follow email chains and maintain context across multiple exchanges.

Attachments

Send and receive attachments with Base64 encoding. The skill can retrieve attachments from messages or threads.

Drafts

Create drafts for human-in-the-loop approval before sending. This is useful when you want to review emails before they go out.

Pods

Multi-tenant isolation for SaaS platforms. Each customer gets isolated inboxes, perfect for building email-enabled applications.

Idempotency

Use idempotency keys for safe retries on create operations. This prevents duplicate emails when network errors occur.

AgentID accounts

Create accounts for your agent at services like Firecrawl with AgentID, using an inbox as its identity, and see where it already has accounts. The AgentID skill (agentmail-agentid from skills.sh, agentid in the plugin) carries the whole job: finding the app, picking the inbox, the sign-in link, and storing the API key you came for.

Real-time events

The skill supports both WebSockets (persistent connection, no public URL needed) and webhooks (HTTP-based notifications) for real-time email notifications.

Example usage

Once installed, you can ask your AI assistant to perform email tasks:

  • “Create a new email inbox for my project”
  • “Send an email to john@example.com about the meeting tomorrow”
  • “Check my inbox for new emails”
  • “Reply to the latest email from Sarah”
  • “Create a draft response to the support ticket”
  • “Create an account at Firecrawl for my agent”
  • “My agent needs a web search API, set one up”

Resources