by KeyID-AI
Free email for AI agents. No signup, no human needed. Install → provision → send and receive. Ed25519 keypair auth.
# Add to your Claude Code skills
git clone https://github.com/KeyID-AI/sdk-jsFree email addresses for AI agents. No signup. No human needed.
Your agent gets a real email address in 3 lines of code. Send, receive, reply, search — full email capabilities with zero registration, zero cost, zero human involvement.
KeyID.ai handles everything: domain management, rotation, reputation monitoring, deliverability. Your agent just generates a keypair and calls provision().
npm install @keyid/sdk
# or
yarn add @keyid/sdk
import { KeyID } from '@keyid/sdk';
const agent = new KeyID();
// Register — get an email address instantly
const { email, agentId } = await agent.provision();
console.log(`Agent email: ${email}`);
// Read inbox
const { messages } = await agent.getInbox();
// Send email
await agent.send('user@example.com', 'Hello', 'Message body');
// Reply to a message
await agent.reply(messages[0].id, 'Thanks for your email!');
KeyID uses Ed25519 challenge-response authentication. The SDK handles this automatically:
provision() registers the public key and returns an email address// Option 1: Auto-generate keypair (default)
const agent = new KeyID();
// Option 2: Provide existing keypair
const agent = new KeyID({
keypair: { publicKey: '...hex...', privateKey: '...hex...' }
});
// Option 3: Custom base URL
const agent = new KeyID({ baseUrl: 'https://your-instance.com' });
| Method | Description | |--------|-------------| | | Register agent, get email address | | | Get agent identity (email, domain, classification) | | | List all addresses (current + historical) | | | Get recovery token for key rotation |
No comments yet. Be the first to share your thoughts!
provision()getIdentity()getAddresses()getRecoveryToken()| Method | Description |
|--------|-------------|
| getInbox(options?) | Fetch inbox with pagination, filtering, search |
| getMessage(id) | Get single message detail |
| updateMessage(id, options) | Update labels, read/starred status |
| getUnreadCount() | Count unread inbound messages |
| send(to, subject, body, options?) | Send email (supports HTML, CC/BCC, scheduled) |
| reply(messageId, body, options?) | Reply to a message |
| replyAll(messageId, body, options?) | Reply-all |
| forward(messageId, to, body?) | Forward a message |
| Method | Description |
|--------|-------------|
| listThreads(options?) | List conversation threads |
| getThread(threadId) | Get thread with all messages |
| deleteThread(threadId, permanent?) | Delete thread |
| Method | Description |
|--------|-------------|
| createDraft(options) | Create a draft |
| getDraft(draftId) | Get draft detail |
| updateDraft(draftId, options) | Update draft |
| deleteDraft(draftId) | Delete draft |
| sendDraft(draftId) | Send a draft |
| Method | Description |
|--------|-------------|
| getSignature() | Get email signature |
| setSignature(text, html?) | Set email signature |
| getForwarding() | Get forwarding settings |
| setForwarding(options) | Configure email forwarding |
| getAutoReply() | Get auto-reply/vacation settings |
| setAutoReply(options) | Configure auto-reply |
| Method | Description |
|--------|-------------|
| listContacts(options?) | List saved contacts |
| createContact(options) | Create a contact |
| getContact(contactId) | Get contact detail |
| updateContact(contactId, options) | Update contact |
| deleteContact(contactId) | Delete contact |
| Method | Description |
|--------|-------------|
| listWebhooks() | List webhooks |
| createWebhook(url, events?, options?) | Create webhook |
| getWebhook(webhookId) | Get webhook detail |
| updateWebhook(webhookId, options) | Update webhook |
| deleteWebhook(webhookId) | Delete webhook |
| getWebhookDeliveries(options?) | Delivery history |
| Method | Description |
|--------|-------------|
| addToList(direction, type, entry) | Add to allow/blocklist |
| removeFromList(direction, type, entry) | Remove from list |
| getList(direction, type) | Get list entries |
| getMetrics(options?) | Query usage metrics |
send('to@x.com', 'Sub', 'Body', { scheduledAt: '2025-01-01T10:00:00Z' })getInbox({ search: 'invoice' })updateMessage(id, { isStarred: true })setAutoReply({ enabled: true, body: 'Out of office', endDate: '...' })send('to@x.com', 'Sub', 'text', { html: '<h1>Hello</h1>' })send('to@x.com', 'Sub', 'Body', { attachments: [{ filename, content, contentType }] })MIT