npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@keyid/sdk

v0.2.10

Published

KeyID.ai SDK — agent email infrastructure

Readme

@keyid/sdk

Free email addresses and phone numbers for AI agents. No signup. No human needed.

Your agent gets a real email address in 3 lines of code, with optional phone number on demand. Send, receive, reply, search — full email + SMS capabilities with zero registration, zero cost, zero human involvement.

KeyID.ai handles everything: domain management, rotation, reputation monitoring, deliverability, phone pool management. Your agent just generates a keypair and calls provision().

Install

npm install @keyid/sdk
# or
yarn add @keyid/sdk

Quick Start

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}`);

// Optionally request a phone number
const { phone } = await agent.requestPhone();
console.log(`Agent phone: ${phone}`);

// Read inbox
const { messages } = await agent.getInbox();

// Send email
await agent.send('[email protected]', 'Hello', 'Message body');

// Reply to a message
await agent.reply(messages[0].id, 'Thanks for your email!');

Authentication

KeyID uses Ed25519 challenge-response authentication. The SDK handles this automatically:

  1. On first use, a keypair is generated (or loaded from env/options)
  2. provision() registers the public key and returns an email address
  3. All subsequent calls auto-authenticate via signed nonce exchange
// 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' });

API Reference

Identity

| Method | Description | |--------|-------------| | provision() | Register agent, get email | | requestPhone() | Request a phone number (opt-in, authenticated) | | getIdentity() | Full profile (email, phone, avatarUrl, bio, reputation score/tier) | | getAddresses() | List all addresses (current + historical) | | updateIdentity(options) | Update profile (displayName, avatarUrl, bio, websiteUrl, profilePublic) | | getReputation() | Get own reputation score (0-100), tier, factor breakdown | | getPublicProfile(agentId) | Get another agent's public profile (no auth required) | | recover(recoveryToken, newKeypair?) | Rotate keypair using recovery token |

Messages

| Method | Description | |--------|-------------| | getInbox(options?) | Fetch inbox with pagination, filtering, search, channel filter | | 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 |

Threads

| Method | Description | |--------|-------------| | listThreads(options?) | List conversation threads | | getThread(threadId) | Get thread with all messages | | deleteThread(threadId, permanent?) | Delete thread |

Drafts

| 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 |

Settings

| Method | Description | |--------|-------------| | getSignature() | Get email signature | | setSignature(signature) | Set email signature | | getForwarding() | Get forwarding settings | | setForwarding(forwardingAddress) | Configure email forwarding | | getAutoReply() | Get auto-reply/vacation settings | | setAutoReply(options) | Configure auto-reply |

Contacts

| 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 |

Webhooks

| 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 |

Verification

| Method | Description | |--------|-------------| | getLinks(messageId) | Extract links from a message | | getCodes(messageId) | Extract verification codes from a message | | followLink({ messageId?, linkIndex?, url? }) | Follow a verification link, returns final URL and redirects |

Persona

| Method | Description | |--------|-------------| | getPersona() | Get agent persona profile | | createPersona(data?) | Create persona profile | | updatePersona(data) | Update persona profile |

Registrations

| Method | Description | |--------|-------------| | addRegistration(data) | Log a service registration | | listRegistrations(options?) | List registrations with optional filters | | getRegistration(id) | Get registration by ID | | updateRegistration(id, data) | Update a registration | | deleteRegistration(id) | Delete a registration |

Vault

| Method | Description | |--------|-------------| | listVault() | List all vault entries (keys + metadata) | | getVaultEntry(key) | Get a vault entry by key | | putVaultEntry(key, value, opts?) | Store a value in the vault | | deleteVaultEntry(key) | Delete a vault entry |

Lists & Metrics

| 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 |

Features

  • Scheduled Sendsend('[email protected]', 'Sub', 'Body', { scheduledAt: '2025-01-01T10:00:00Z' })
  • Full-Text SearchgetInbox({ search: 'invoice' })
  • Starred MessagesupdateMessage(id, { isStarred: true })
  • Auto-ReplysetAutoReply({ enabled: true, body: 'Out of office', endDate: '...' })
  • HTML Emailsend('[email protected]', 'Sub', 'text', { html: '<h1>Hello</h1>' })
  • Attachmentssend('[email protected]', 'Sub', 'Body', { attachments: [{ filename, content, contentType }] })
  • SMS InboxgetInbox({ channel: 'sms' }) — filter by email or SMS
  • SMS Webhooks — subscribe to sms.received events

VS Code Extension

For a visual inbox experience during development, install KeyID Agent Inbox — manage agents, monitor inboxes, extract verification codes, and reply to emails directly in VS Code.

Requirements

  • Node.js 18+
  • No external dependencies

License

MIT