Skip to content
  • sdk

Build agents with the AI SDK, Chat SDK, and Eve

Samva publishes plugins for the Vercel AI SDK, Chat SDK, and Eve. Your agent answers email and WhatsApp from a Samva mailbox, and replies follow the mailbox's decision rules.

If your agent runs on the Vercel AI SDK, Chat SDK, or Eve, it can now answer email and WhatsApp from a Samva mailbox. We build and maintain three open-source packages for it. Install the one for your framework, point the mailbox's mailbox.message.received webhook at your route, and use a mailbox-scoped key.

What you can do

  • Give an AI SDK agent mailbox tools. @samva/ai-sdk returns tools to reply to the customer, leave the message for a person, and read or search the mailbox's threads. A redelivered webhook reuses the reply's idempotency key, so it cannot send twice.
  • Receive mailbox messages in Chat SDK. @samva/chat-adapter verifies signed webhooks and passes email threads and WhatsApp conversations to your Chat SDK handlers. apiKey and webhookSecret also accept a function that the adapter calls each time it needs the value, so a rotated or short-lived credential takes effect at once.
  • Mount Samva in an Eve agent. @samva/eve adds the same tools and a channel at /eve/v1/samva, with instructions for treating customer mail as untrusted input.

Replies go through the mailbox's decision rules. With a key whose rule holds every write for a person, a reply returns a held action receipt instead of sending, and waits in the dashboard for approval.

npm install @samva/ai-sdk ai samva

All three packages require samva 0.48. Install Samva from Vercel to set the key and mailbox ID on your project, and the webhook secret when you give it the route that receives messages.

Links

Related

All changelog entries