
Agentmail
- 56 installs
- 6 repo stars
- Updated March 13, 2026
- alphaonedev/openclaw-graph
agentmail is a Claude skill that lets an AI agent autonomously manage email, including classification, response drafting, and scheduling.
About
This skill lets an AI agent autonomously manage email, including classification, response drafting, and scheduling. A developer uses it for high-volume inboxes, automated customer support, or personal productivity workflows. It connects to providers such as Gmail or Outlook through OAuth and exposes classify, draft, and schedule operations via CLI and API.
- Autonomous email management: classify, draft responses, and schedule sends
- Integrates with email providers like Gmail or Outlook via OAuth tokens
- CLI and API patterns for classify, draft, and schedule operations
Agentmail by the numbers
- 56 all-time installs (skills.sh)
- Ranked #1,034 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
agentmail capabilities & compatibility
requires AGENTMAIL_API_KEY and provider OAuth tokens (e.g. GMAIL_TOKEN); needs Node.js v14+
- Capabilities
- email classification · response drafting · email scheduling · inbox triage
- Works with
- gmail · outlook
- Use cases
- email · orchestration
- Pricing
- Bring your own API key
What agentmail says it does
This skill enables an AI agent to autonomously manage emails, including classification, response drafting, and scheduling, using AI-driven automation for efficient email handling.
Integrate agentmail with email services like Gmail or Outlook by providing OAuth tokens via config files
npx skills add https://github.com/alphaonedev/openclaw-graph --skill agentmailAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 56 |
|---|---|
| repo stars | ★ 6 |
| Last updated | March 13, 2026 |
| Repository | alphaonedev/openclaw-graph ↗ |
What it does
Let an AI agent classify inbound email, draft responses in a chosen tone, and schedule sends or follow-ups.
Who is it for?
automating inbox triage and drafting replies at high volume
Skip if: sending marketing campaigns; it targets inbox management and responses
When should I use this skill?
when an agent needs to classify, draft, or schedule email autonomously
What you get
classified emails with drafted responses and scheduled sends
- classified emails
- drafted responses
- scheduled sends
By the numbers
- 5 key capabilities: classify, draft, schedule, manage threads, integrate
Files
agentmail
Purpose
This skill enables an AI agent to autonomously manage emails, including classification, response drafting, and scheduling, using AI-driven automation for efficient email handling.
When to Use
Use this skill for high-volume email inboxes, automated customer support, personal productivity workflows, or integrating email tasks into broader AI agent operations to reduce manual intervention.
Key Capabilities
- Classify emails based on content, sender, or keywords using machine learning models.
- Draft response emails with customizable templates and tone adjustments.
- Schedule email sends or follow-ups based on user-defined rules or calendar integration.
- Manage email threads by summarizing, prioritizing, or archiving based on criteria.
- Integrate with email providers via APIs for real-time operations.
Usage Patterns
To use agentmail, invoke it via CLI or API calls, passing necessary parameters like email IDs or content. Always set the API key via environment variable $AGENTMAIL_API_KEY. For CLI, prefix commands with authentication flags. Example pattern: Fetch an email, classify it, draft a response, then schedule if needed. Chain commands in scripts for automation.
Common Commands/API
CLI commands require Node.js environment; install via npm install agentmail-cli. API endpoints are under https://api.openclaw.com/agentmail/v1.
- Classify an email:
CLI: agentmail classify --email-id 12345 --key $AGENTMAIL_API_KEY API: POST /api/agentmail/classify with JSON body: {"email_id": "12345", "api_key": "$AGENTMAIL_API_KEY"} Code snippet:
curl -X POST https://api.openclaw.com/agentmail/v1/classify \
-H "Content-Type: application/json" \
-d '{"email_id": "12345", "api_key": "'$AGENTMAIL_API_KEY'"}'- Draft a response:
CLI: agentmail draft --email-id 12345 --tone professional --key $AGENTMAIL_API_KEY API: POST /api/agentmail/draft with body: {"email_id": "12345", "tone": "professional", "api_key": "$AGENTMAIL_API_KEY"} Code snippet:
const response = await fetch('https://api.openclaw.com/agentmail/v1/draft', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email_id: '12345', tone: 'professional', api_key: process.env.AGENTMAIL_API_KEY})
});- Schedule an email:
CLI: agentmail schedule --email-content "Reply text" --send-at "2023-10-01T10:00:00Z" --key $AGENTMAIL_API_KEY API: POST /api/agentmail/schedule with body: {"email_content": "Reply text", "send_at": "2023-10-01T10:00:00Z", "api_key": "$AGENTMAIL_API_KEY"} Config format: Use JSON for scheduling rules, e.g., {"rules": [{"condition": "priority>high", "action": "schedule in 2 hours"}]}.
Integration Notes
Integrate agentmail with email services like Gmail or Outlook by providing OAuth tokens via config files (e.g., config.json: {"provider": "gmail", "token": "$GMAIL_TOKEN"}). For AI agent workflows, use webhooks to trigger on new emails (e.g., POST to /api/agentmail/webhook). Ensure compatibility by matching API versions; handle dependencies like Node.js v14+. To combine with other skills, export results as JSON and pipe to next command, e.g., agentmail classify ... | jq '.category' | other-skill-process.
Error Handling
Check for HTTP status codes: 401 for auth failures (retry with $AGENTMAIL_API_KEY), 404 for missing emails (log and skip), 500 for server errors (exponential backoff). In CLI, use --verbose flag for detailed logs. Handle common issues like rate limits by adding delays (e.g., sleep 5 seconds after 429 response). Validate inputs before calls, e.g., ensure email IDs are strings via regex check: if (!emailId.match(/^\d+$/)) throw new Error('Invalid email ID');. Use try-catch in scripts for graceful recovery.
Concrete Usage Examples
1. Classify and respond to a support ticket email: First, classify: agentmail classify --email-id 67890 --key $AGENTMAIL_API_KEY. If classified as "support", draft: agentmail draft --email-id 67890 --tone helpful --key $AGENTMAIL_API_KEY. Then schedule: agentmail schedule --email-content $(cat response.txt) --send-at now --key $AGENTMAIL_API_KEY. This automates ticket responses in a helpdesk workflow.
2. Manage personal email scheduling: Fetch unread emails via API, classify them: curl -X POST https://api.openclaw.com/agentmail/v1/classify -d '{"email_id": "54321", "api_key": "'$AGENTMAIL_API_KEY'"}'. For high-priority, draft and schedule: agentmail draft --email-id 54321 --tone formal --key $AGENTMAIL_API_KEY; agentmail schedule --email-content "Follow up" --send-at "tomorrow" --key $AGENTMAIL_API_KEY. Use in a daily script for inbox zero.
Graph Relationships
- Related to: email (direct), ai (cluster), agent (cluster), automation (tag).
- Connected clusters: community (same as this skill).
- Dependencies: May require skills like "email-parser" for input preprocessing or "scheduler" for advanced timing.
Related skills
FAQ
What can agentmail do?
It classifies emails, drafts responses with adjustable tone, schedules sends or follow-ups, and manages threads by summarizing, prioritizing, or archiving.
Which email providers does it work with?
It integrates with providers like Gmail or Outlook using OAuth tokens supplied via config files.