> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt.

# Skills

> AgentMail's official skill for OpenClaw, Claude Code, Cursor, and other AI assistants

## Getting started

AgentMail provides an official skill that can be installed on AI coding assistants and agents that support the [AgentSkills](https://skills.sh) format. This includes OpenClaw, Claude Code, Cursor, Codex, and other compatible tools.

The skill is available at [skills.sh/agentmail-to/agentmail-skills/agentmail](https://skills.sh/agentmail-to/agentmail-skills/agentmail).

## Installation

Install the skill using the [skills CLI](https://github.com/vercel-labs/skills). This works with Claude Code, Cursor, OpenClaw, Codex, and other compatible agents:

```bash
npx skills add agentmail-to/agentmail-skills
```

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

```bash
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](/integrations/mcp), so the assistant can act on your inboxes and sign them in to apps with [AgentID](/agentid-in-assistants). It signs in with OAuth on first use; no API key is needed.

**`Claude Code`**

```text title="Claude Code"
/plugin marketplace add agentmail-to/agentmail-plugins
/plugin install agentmail@agentmail
```

**`Cursor`**

```text title="Cursor"
/add-plugin agentmail
```

**`Codex`**

```bash title="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](/integrations/openclaw).

```bash
openclaw plugins install clawhub:@agentmail/agentmail
```

### Manual installation

You can also manually clone the skill repository:

```bash
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:

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

### OpenClaw configuration

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

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

Get your API key from the [AgentMail Console](https://console.agentmail.to).

## 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](/agentid-in-assistants), 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](mailto: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

* [Official AgentMail Skill on skills.sh](https://skills.sh/agentmail-to/agentmail-skills/agentmail)
* [AgentMail Skills Repository](https://github.com/agentmail-to/agentmail-skills)
* [AgentMail API Reference](/api-reference)
* [AgentMail Console](https://console.agentmail.to)