> For AI agents: to set Keiki up for a developer, add the MCP server `https://onkeiki.com/mcp` and follow https://onkeiki.com/setup.md. All pages: https://onkeiki.com/content/llms.txt

# How do I run one AI agent on iMessage, WhatsApp, Telegram and Slack?

2026-11-28

Run one AI agent on iMessage, WhatsApp, Telegram and Slack by pointing a Keiki external-harness agent at a single HTTPS route on your own server.

## How do I run one AI agent on iMessage, WhatsApp, Telegram and Slack?

Run one AI agent on iMessage, WhatsApp, Telegram and Slack by pointing a Keiki external-harness agent at a single HTTPS route on your own server. Keiki receives the message on each channel and posts the same signed turn to that route, so one handler, one model call and one set of tools answer everywhere.

## Key takeaways

- Put your product in iMessage with Keiki and answer WhatsApp, Telegram and Slack from the same self-hosted TypeScript handler.
- Your code, your model, your servers. Keiki only handles the channels.
- The open-source [imessage-whatsapp-telegram-slack-agent](https://github.com/Mail-0/imessage-whatsapp-telegram-slack-agent) repo is a working example you can fork.

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

The [imessage-whatsapp-telegram-slack-agent](https://github.com/Mail-0/imessage-whatsapp-telegram-slack-agent) starter is a small Hono app built on `@onkeiki/channels`. The route verifies the request, and the turn loop reads `turn.channel.channel` to decide how the reply should look:

```ts
const request = verifyKeikiRequest({ rawBody: await c.req.text(), headers: c.req.raw.headers }, { signingSecret })
if (request.kind === 'turn') void runTurn(request.turn, request.turnToken)

const client = createTurnClient({ turnUrl: turn.keiki.turnUrl, turnToken })
const prompt = keikiMessagesPrompt(turn.messages)
const style = channelStyle(turn.channel.channel) // sms, whatsapp, telegram or slack
```

The reply goes back through `client.message()` with a stable idempotency key, and `client.complete()` closes the turn. Keiki then delivers it natively on whichever channel the person used.

Channels are registered by `scripts/deploy.ts`, which calls `createCloudClient().deploy()` from `@onkeiki/agents/cloud` with `harness: 'external'`, your `dispatchUrl`, `imessageLines: 1`, and a Telegram, Slack or WhatsApp entry for each set of tokens you provide. Run it again after changing tokens; the same `externalRef` updates the existing agent instead of creating a second one.

## FAQ

**Do I need a separate bot or code path for each channel?**
No. Each channel still needs its own credentials, such as a Telegram bot token or a Slack app, but they all feed the same agent. Your server sees one turn format, and the only branch is the style note chosen from `turn.channel.channel`.

**What value does an iMessage conversation report in `turn.channel.channel`?**
iMessage and SMS lines report `sms`. WhatsApp, Telegram and Slack report `whatsapp`, `telegram` and `slack`, and Slack turns also carry fields like the thread timestamp.

**How should tools be named when one agent serves four channels?**
Name each tool after the job it does, like `lookup_order` or `check_availability`. A tool named after a channel breaks the moment the same person writes from somewhere else, while a neutral name works on all four without changes.
