> 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 to build an iMessage agent like Poke

2026-11-23

Build a text-first assistant with an iMessage line, calendar tools, explicit confirmations and a plan for testing and handoff.

## How do you build an iMessage agent like Poke?

Start with one task people can ask for in Messages, such as finding a time to meet. Connect an iMessage line and the tools the task needs, confirm changes before making them, and test the whole conversation from a separate device.

## Key takeaways

- Build one task that customers can finish in Messages before adding other features.
- Keep read and write tools separate, and confirm changes before the agent writes.
- Test on a real iMessage line with a separate device and check that a teammate can step in.

[Poke](https://poke.com/docs) is an example of an assistant people reach through a message thread. This guide builds a scheduling assistant with that same text-first interaction, not a clone of Poke or a claim about how it works internally.

## Step 1: Choose the first task

Start with “Find me 30 minutes with Jordan next week.” Ask for the time zone if it isn't known. Return two or three available slots in plain text. Leave email, reminders and other tasks out until scheduling works from start to finish.

## Step 2: Give the assistant a real iMessage line

Use the [AI agent builder for iMessage](/ai-agent-builder) to create the agent on Keiki. If you already run a model loop, [connect your external harness](/docs/external-harness) instead. Connect a supported iMessage line and text it from a phone that isn't the sending line. The [iMessage API guide](/content/imessage-api-for-ai-products) covers the transport and webhook options.

## Step 3: Separate reading from writing

Connect your calendar API or [MCP tools](/docs/mcp). Give the assistant a read-only availability tool and a separate tool to create a meeting. Look up availability first. Before creating an event, show the title, time zone, guests and time and ask the person to confirm. Recheck the slot after confirmation and make meeting creation idempotent so a retry can't create a second event.

## Step 4: Test the conversation before launch

Try a normal request, an ambiguous name, a time-zone change and a slot that becomes unavailable. Cancel after seeing the proposed event and verify nothing was written. Then disconnect the calendar and make sure the assistant explains what it couldn't do rather than claiming success. Use the team inbox when a person needs to step in.

Once scheduling works, add another task people can finish without leaving Messages. Browse the [iMessage agent directory](/directory) for examples.

## Quick start for AI coding agents

1. **Initialize your app.** In a supported app project, run `npx @onkeiki/cli init`. The CLI detects Eve, Flue, or the AI SDK from your package.json dependencies. [CLI setup](/docs/cli).
2. **Connect your coding client.** Separately, add the Keiki MCP server in your coding client at `https://onkeiki.com/mcp`. [MCP setup](/docs/mcp).

## FAQ

**Do I need to host my own model loop?**

No. You can build the agent on Keiki, or connect a model loop you already run through the external harness.

**How do I avoid duplicate calendar events?**

Make your calendar write idempotent: give the confirmed booking a stable key and use it on retries. A repeat should return the first booking rather than create another one.