Email for the Vercel AI SDK
An email inbox for your AI SDK agent
@pidgeon-ai/ai-sdk turns Pidgeon’s tools into AI SDK tools: the model sends, replies in the thread and waits for the answer, with any model you use.
Pass pidgeonTools() as the tools. The model calls send_message, then await_message, which waits for the reply with any code already pulled out.
npm install @pidgeon-ai/ai-sdk ai @ai-sdk/openai zodWhat your agent can do
- ToolsThe MCP server’s toolsSame names and descriptions as the hosted server, as AI SDK tools.
- WaitWait for the replyawait_message holds one request open until mail arrives. There is no polling loop to write.
- ApprovalAsk before it sendsWRITE_TOOLS names the tools that change something; hand them to toolApproval and a person confirms each one.
- ModelsAny modelAny AI SDK model works, through a provider package or the Vercel AI Gateway.
- AddressA default addressSet identityId and the model can leave the address out of every call.
- KeysOnly what you grantedA read key cannot send. The key’s reach is the whole of the access control.
Asked often
How do I give a Vercel AI SDK agent email?
Install @pidgeon-ai/ai-sdk and pass pidgeonTools() as the tools to generateText or streamText. The model can then send, reply and wait for mail in its own inbox.
Can a person approve each email before it is sent?
Yes. Hand WRITE_TOOLS to toolApproval: the call ends at each write with an approval request, and goes on once a person answers.
Does it work with the AI Gateway?
Yes. A gateway model string such as openai/gpt-5.4-nano goes through the Vercel AI Gateway; any AI SDK model works.
What does it cost?
The free plan has unlimited inboxes, one custom domain and 100 emails a day, with no card. Receiving is free on every plan.