Skip to content
Announcements5 min read

Keiki on Vercel Connect: your Vercel agent, on every channel

Keiki is now on Vercel Connect. Keep your agent on Vercel, grant it one agent's channels, and Keiki brings it iMessage, SMS, WhatsApp, Slack, Telegram and email. Here's how it works and the code behind it.

Grainy film still of a glass keyboard key labelled connect, glowing cobalt blue with hot orange light refracting through its sides in the dark

Short answer: Keiki on Vercel Connect lets an agent you deploy on Vercel answer on iMessage, SMS, WhatsApp, Slack, Telegram and email while its code and model stay on Vercel. Add Keiki as a connector, pick the Keiki agent on the consent screen, and one call on deploy points that agent at your route, with no channel credentials or Keiki secrets stored in the project.

You built an agent on Vercel. It runs on the AI SDK or eve, calls your model through AI Gateway and answers in your app's chat. Then a customer asks if they can just text it, and someone on your team wants it in Slack. Each of those is its own project: buy a number, apply for a sender, register a bot, store its tokens, verify its webhooks, keep every one of them working.

Now Keiki is on Vercel Connect, so your Vercel agent can answer on iMessage, SMS, WhatsApp, Slack, Telegram and email. Your agent's code, model and deployment stay on Vercel. Keiki runs the channels around it. Your project never stores a channel credential or a Keiki secret.

How it works

  1. Add Keiki to Vercel Connect. Create a connector from Keiki's page on Vercel Connect. Connect finds Keiki's sign-in and registers itself, so there's no OAuth app to set up.
  2. Pick one agent. On Keiki's consent screen, you choose the Keiki agent your app gets, or name a new one. The grant reaches that agent's channel setup and nothing else in your workspace.
  3. Your app points the agent at itself. On deploy, your code asks Connect for a token and tells Keiki where your turn route lives. It only writes when the URL changes.
  4. Keiki brings the messages. When someone texts the agent's number or mentions it in Slack, Keiki sends your route a signed turn. Your route runs the model, and Keiki delivers the reply on the channel the message came in on.

Why this matters

  • No channel credentials in your project. Phone lines, Slack apps, WhatsApp numbers and Telegram bots belong to the Keiki agent. Your Vercel project only holds the route.
  • No Keiki secrets either. Connect gets a short-lived token at the moment your code needs it. Keiki signs every turn with its own key, and the handler checks that signature against Keiki's published keys, so there's no signing secret to store or rotate.
  • One grant, one agent. The token can set up one agent's channels. It can't read your other agents, your contacts or your billing. If the agent is deleted, the token stops working.
  • Your agent loop stays yours. Keep your model, your prompt and your framework. Keiki handles what happens on the channel: delivery, message history and the turn trace.

Who can use it

It's for teams who already run an agent on Vercel and want people to reach it where they already talk: a support agent that should answer texts, an internal agent your team should @mention in Slack, or a product agent that should work on WhatsApp in markets where everyone uses it.

You need a Vercel project with your agent, a Keiki account on a plan (the plan is needed to grant access), and a route the agent can be reached at. Your agent can be built on the AI SDK or eve.

How to get started

  1. Open vercel.com/connect/keiki and select Create Connector, or run vercel connect create keiki --name acme-keiki from the CLI.
  2. Authorize it. On Keiki's consent screen, pick the agent this project gets, or name a new one.
  3. Add the turn route below to your app and deploy.
  4. In the Keiki dashboard, open the agent's Channels tab and add a line, Slack, WhatsApp, Telegram or an email inbox. Every channel reaches the same route, so nothing changes in your app.

For developers

The turn route is one handler from @onkeiki/ai-sdk. waitUntil lets the function answer Keiki with 202 right away and keep running the model:

TypeScript
// app/api/keiki/route.ts
import { createKeikiHandler, keikiDelivered } from '@onkeiki/ai-sdk'
import { waitUntil } from '@vercel/functions'
import { stepCountIs, streamText } from 'ai'

export const maxDuration = 300

export const POST = createKeikiHandler({
  waitUntil,
  onTurn: async ({ instructions, messages, tools, prepareStep, abortSignal }) =>
    streamText({
      model: 'openai/gpt-5.4-nano',
      instructions,
      messages,
      tools: await tools(),
      prepareStep,
      stopWhen: [keikiDelivered, stepCountIs(10)],
      abortSignal,
    }),
})

tools() returns the turn's Keiki tools, such as reply, authorized for that agent and that turn only. keikiDelivered stops the turn once the reply is delivered, so the answer isn't sent twice.

Then point the agent at the route. connectKeikiDispatch from @onkeiki/channels gets the token from Connect, reads the agent's current setup and only writes when the URL changed, so it can run on every deploy:

TypeScript
import { connectKeikiDispatch } from '@onkeiki/channels'
import { getToken } from '@vercel/connect'

await connectKeikiDispatch({
  token: () => getToken('keiki/acme-keiki', { subject: { type: 'app' } }),
  dispatchUrl: 'https://your-app.vercel.app/api/keiki',
})

keiki/acme-keiki is your connector's name in Connect. If the grant has expired or been revoked, the call throws KeikiConnectError with Keiki's message, so your app can ask the user to connect again.

On eve, mount the Keiki extension and use https://<your-eve-app>/keiki/v1/dispatch as the dispatchUrl:

TypeScript
// agent/extensions/keiki.ts
import keiki from '@onkeiki/eve'

export default keiki()

The same token can also add channels. POST /api/v1/agent-channels/channels takes a list of channel specs. A Telegram bot connects from its token, and a channel that needs a browser step, like Slack or WhatsApp, comes back with a link to finish it.

What's next

Add Keiki to your project at vercel.com/connect/keiki. Read the Vercel Connect docs for every step, and What's the Best Way to Add iMessage to Your AI Agent? for how Keiki runs channels around an agent you already have.