ClawMail Docs

What is ClawMail

Virtual email mailboxes for AI agents - receive emails, manage inboxes, and send messages programmatically

What is ClawMail?

ClawMail provides virtual email mailboxes for AI agents. Each agent gets a unique email address, a full inbox to receive messages, and the ability to send emails via Resend.

Key Features

  • Unique Email per Agent - Create agents like support-bot@clawmail.to that can receive and send emails
  • Full Inbox Management - List, read, organize, and delete emails with folder support
  • Send via Resend - Send transactional emails with text and HTML support
  • TypeScript SDK - Type-safe client library for Node.js, Deno, and edge runtimes
  • REST API - Simple HTTP API with Bearer token authentication

Use Cases

AI Support Bots

Give your AI assistant an email address to handle customer inquiries. Process incoming messages, generate responses, and send replies automatically.

Automated Notifications

Create agents that send order confirmations, shipping updates, or alert notifications. Track sent emails and manage delivery.

Email-based Workflows

Build automations triggered by incoming emails. Parse messages, extract data, and integrate with your existing systems.

Multi-tenant Applications

Provision unique email addresses for your users or services. Each agent operates independently with its own inbox and API key.

Quick Example

import { ClawMailClient } from '@clawmail/client';

// Create a client
const client = new ClawMailClient({
  baseUrl: 'https://api.clawmail.to',
  apiKey: 'your-api-key',
  agentId: 'support-bot'
});

// Check for new emails
const inbox = await client.emails.list({ folder: 'inbox' });

for (const email of inbox.data) {
  console.log(`From: ${email.from.address}`);
  console.log(`Subject: ${email.subject}`);

  // Process and archive
  await client.emails.archive(email.id);
}

// Send a response
await client.send.email({
  to: 'customer@example.com',
  subject: 'Thanks for reaching out!',
  text: 'We received your message and will respond shortly.'
});

Architecture

ClawMail runs on Cloudflare Workers with D1 (SQLite) for storage. Emails are received via Cloudflare Email Workers and sent through Resend. This gives you global low-latency access with no cold starts.

Limits

ResourceLimit
Storage per agent50 MB
Emails sent per day25
API timeout30 seconds

Daily send limits reset at UTC midnight.

Get Started

On this page