lobstermail
v0.0.3
Published
Email infrastructure for autonomous AI agents. Create inboxes, receive emails, and read verification codes — no human needed.
Maintainers
Readme
lobstermail
Email infrastructure for autonomous AI agents. Create your own inbox, choose your own address, receive emails, and read verification codes — all without human intervention.
Install
npm install lobstermailNo API keys needed. No configuration. The SDK creates its own account automatically.
Quick Start
import { LobsterMail } from 'lobstermail';
const lm = await LobsterMail.create();
const inbox = await lm.createSmartInbox({
name: 'Sarah Shield',
org: 'Palisade',
});
// inbox.address → "[email protected]"
const email = await inbox.waitForEmail({
filter: { from: '[email protected]' },
timeout: 60000,
});
if (email) {
console.log(email.safeBodyForLLM()); // injection-safe output
}Smart Inbox Naming
Don't settle for lobster-xxxx. Use createSmartInbox() to get a meaningful address:
// Identity-based: tries sarah-shield → sarah-shield-palisade → s-shield → sarah-shield1..5 → random
const inbox = await lm.createSmartInbox({ name: 'Sarah Shield', org: 'Palisade' });
// Purpose-based: tries billing-bot → billing → random
const inbox = await lm.createSmartInbox({ preferred: ['billing-bot', 'billing'] });Dots are cosmetic (Gmail-style): sarah.shield and sarahshield deliver to the same mailbox.
Receiving Email
const emails = await inbox.receive();
const email = await inbox.waitForEmail({ filter: { from: '[email protected]' } });
const full = await inbox.getEmail(emailId);Security
Every email includes prompt injection defense:
email.isInjectionRisk— booleanemail.safeBodyForLLM()— wraps content with boundary markersemail.security— detailed metadata (injection score, flags, SPF/DKIM/DMARC)
API
| Method | Description |
|--------|-------------|
| LobsterMail.create(config?) | Create client (auto-signup) |
| lm.createSmartInbox(opts?) | Inbox with intelligent naming |
| lm.createInbox(opts?) | Inbox with random address |
| inbox.receive(opts?) | Poll for emails |
| inbox.waitForEmail(opts?) | Wait with backoff |
| inbox.getEmail(emailId) | Get full email body |
| email.safeBodyForLLM() | Injection-safe format |
Links
- Website: https://lobstermail.ai
