# iMessage AI agent with Next.js and the Vercel AI SDK

Put your product in iMessage with Keiki in about 100 lines of code. Your model and tools run in your Next.js app; Keiki handles the iMessage line and delivery.

[View imessage-ai-sdk-starter on GitHub](https://github.com/Mail-0/imessage-ai-sdk-starter)

## How do I build an iMessage AI agent with the Vercel AI SDK?

1. Clone [github.com/Mail-0/imessage-ai-sdk-starter](https://github.com/Mail-0/imessage-ai-sdk-starter) and deploy it.
2. Run `npx @onkeiki/cli init --dispatch-url https://your-app.vercel.app/api/keiki` with your deployed URL to connect it to a Keiki agent.
3. [Attach an iMessage line](https://onkeiki.com/docs/channels#imessage-lines) to the agent and text it.

Your code, your model, your servers. Keiki only handles the channels.

## Details

- Stack: Next.js, Vercel AI SDK, TypeScript
- Channels: iMessage
- Docs: [/docs/ai-sdk](https://onkeiki.com/docs/ai-sdk)
- Guide: [How do I build an iMessage AI agent with the Vercel AI SDK?](https://onkeiki.com/content/how-do-i-build-an-imessage-ai-agent-with-the-vercel-ai-sdk)
