Is there a way to export all my projects as a CSV file?
Give your Vercel AI SDK agent its own email address.
Each call becomes a tool, so the model makes an inbox, waits for its code and replies, in one run.
import { tool } from "ai";
import { z } from "zod";
import { createInbox } from "./blueping-tools.js";
const create_inbox = tool({
description: "Create an email inbox that receives at once.",
inputSchema: z.object({ username: z.string() }),
execute: ({ username }) => createInbox(username),
});Get an address Agents /integrations/vercel-ai-sdk.md
Blueping makes email inboxes for AI agents: one API call gives an agent its own address, with verification codes pulled out and every sender checked.
northbeam-help
A Next.js route that answers support mail
Yes, Jules: open Settings, then Export, and pick CSV. The file reaches you by email within a few minutes.
Northbeam Help · northbeam-help
Give the AI SDK its email tools in two files
Each Blueping call becomes an AI SDK tool() with a zod inputSchema, and generateText lets the model call them over several steps. The agent gets an address of its own and reads its mail as JSON.
The five calls over fetch
blueping-tools.jsexports the calls the tools wrap. Each one is afetchto the API withBLUEPING_API_KEY, so the same file runs in a route handler, a script or a worker.// blueping-tools.js: an inbox for your agent, in five functions. Node.js 18+, no dependency. const API = "https://blueping.dev/v1"; async function call(method, path, body) { const response = await fetch(API + path, { method, headers: { Authorization: `Bearer ${process.env.BLUEPING_API_KEY}`, "Content-Type": "application/json" }, body: body ? JSON.stringify(body) : undefined, }); return response.json(); // a refusal is { error: { code, message, next_action } } } export const createInbox = (username) => call("POST", "/inboxes", { username, client_id: username }); export const waitForCode = (inboxId, sender = "") => call("GET", `/inboxes/${inboxId}/code?wait=50${sender ? `&from=${encodeURIComponent(sender)}` : ""}`); export const readInbox = (inboxId) => call("GET", `/inboxes/${inboxId}/messages?limit=10`); export const sendEmail = (inboxId, to, subject, text) => call("POST", `/inboxes/${inboxId}/messages`, { to, subject, text }); export const reply = (messageId, text) => call("POST", `/messages/${messageId}/reply`, { text });The tools and the call
isStepCount(5)lets the model make an inbox, wait for its code and answer in one run.import { generateText, isStepCount, tool } from "ai"; import { z } from "zod"; import { createInbox, reply, waitForCode } from "./blueping-tools.js"; const { text } = await generateText({ model: "anthropic/claude-sonnet-5.5", tools: { create_inbox: tool({ description: "Create an email inbox that receives at once.", inputSchema: z.object({ username: z.string() }), execute: ({ username }) => createInbox(username) }), wait_for_code: tool({ description: "Wait for the next verification code or link.", inputSchema: z.object({ inboxId: z.string(), sender: z.string().optional() }), execute: ({ inboxId, sender }) => waitForCode(inboxId, sender) }), reply: tool({ description: "Answer an email in its thread.", inputSchema: z.object({ messageId: z.string(), text: z.string() }), execute: ({ messageId, text }) => reply(messageId, text) }), }, stopWhen: isStepCount(5), prompt: "Make an inbox called selbywick-trial and tell me its address.", }); console.log(text);
Checked against AI SDK docs, tools and tool calling on November 22, 2026.
What an AI SDK agent does with its own inbox
A route that answers support mail
A Next.js route receives
email.received,generateTextdrafts the answer with your docs, andreplysends it in the thread.Streaming the steps to your UI
With
streamText, each tool call shows in your interface as it happens: the inbox made, the code read.A run that ends once the answer is sent
Put
hasToolCall("reply")instopWhennext to the step limit, and the loop stops the moment the reply leaves, with no extra turn for the model.
Before you connect the AI SDK
- The tools return JSON, so the model reads a refusal's
next_actionas it reads a success. - An
onStepEndcallback hands you each step's tool calls and results, so your logs keep which inbox was made and which code was read.
Does it run on the Edge runtime?
Yes: the calls use fetch only, and the key comes from your environment.
Can the AI SDK load the MCP server's tools instead?
Yes: its MCP client reads the tools of the hosted server at https://blueping.dev/mcp, with your key in the request headers. The functions above keep the tool list to the three calls this agent needs.
Build more with the AI SDK
- A support inboxCustomers write to an address your agent owns. It answers in the thread and leaves refunds and attacks to your team.
- Verification codes and sign-upsThe agent signs up to a service with an address of its own and reads the code or the magic link in one call.
- Orders, shipping and returnsThe agent matches each email to an order, answers with its status, sends return labels and reads carrier notices.
- CrewAI@tool functions for each agent of the crew.
- MastracreateTool definitions given to a Mastra Agent.
- LlamaIndexPlain functions given to a FunctionAgent.
Give your Vercel AI SDK agent its address.
Free for 3 inboxes. No card.