agentmail-cli for Openclaw

A command-line interface for the AgentMail API to manage disposable inboxes and automate email communication.

stepandel
v1.0.0
Feb 7, 2026
6
2.8k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install agentmail-cli

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install agentmail-cli using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is agentmail-cli?

AgentMail CLI is a robust utility designed to bring email management directly to your terminal or automated scripts. By leveraging the AgentMail API, this tool allows users to create disposable inboxes, send rich text or HTML messages, and monitor incoming mail programmatically. As a versatile entry in the library of Openclaw Skills, it empowers developers to build agentic workflows that require email interaction without the overhead of traditional mail clients. Whether you are testing user registration flows or sending automated status updates, this skill provides the necessary infrastructure to handle mail at scale. Using Openclaw Skills like this ensures that your agents have the communication tools they need to interact with the wider web.

agentmail-cli Use Cases

  • Automating user registration and verification flows in software testing.
  • Sending system alerts and automated reports directly from server scripts.
  • Creating ephemeral communication channels for privacy-focused agent tasks within Openclaw Skills.
  • Monitoring incoming mail for specific triggers to fire downstream automation events.

How agentmail-cli Works

  1. Configure your environment by setting the AGENTMAIL_API_KEY or using the config set-key command.
  2. Initialize a new inbox via the command line to generate a unique inbox identifier.
  3. Send messages by specifying the source inbox ID, recipient details, and message body.
  4. Poll for new messages or list current threads in JSON format for easy parsing.
  5. Manage the lifecycle of your communication by deleting messages or entire inboxes once objectives are met in your Openclaw Skills workflow.

agentmail-cli Setup

Install the package globally using npm:

npm install -g @stepandel/agentmail-cli

Configure your API key (get one at agentmail.to):

# Method 1: Persistent config
agentmail config set-key YOUR_API_KEY

# Method 2: Environment variable
export AGENTMAIL_API_KEY=YOUR_API_KEY

Verify the setup:

agentmail config show

agentmail-cli Data Schema & Taxonomy

The skill processes and returns data primarily in JSON format. Below is the organization of core entities used within these Openclaw Skills:

Object Key Fields Purpose
Inbox inboxId, domain, username, displayName Defines the identity of a disposable mailbox.
Message messageId, from, to, subject, text, html Represents individual email transmissions or received content.
Configuration apiKey Local storage of authentication credentials in ~/.agentmail/config.json.

agentmail-cli Advanced Features

  • Global --json flag support for seamless machine-to-machine integration.
  • Support for advanced mail headers including CC and BCC for complex routing.
  • Thread-based deletion logic where removing a message cleans up the associated conversation.
  • Flexible domain and username customization for professional-looking disposable addresses in Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins agentmail
Github Stars: 0
forks: 0

Featured*