Skip to content
Templates

Connect your Python AI agent to iMessage

Connect your Python AI agent to iMessage with Keiki. Your model and tools run on your server; Keiki handles the iMessage line and delivery.

View imessage-python-agent on GitHub

How do I connect my AI agent to iMessage?

  1. Clone Mail-0/imessage-python-agent. Copy .env.example to .env, add your model credentials, and run uv sync --locked.
  2. Deploy the Python server and configure your Keiki agent in push mode with the public HTTPS URL ending in /keiki/turn. Set the agent’s signing secret as KEIKI_SIGNING_SECRET on your host.
  3. Attach an iMessage line and text the agent. Try asking whether the example shop is open on Saturday.

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

Details

  • Stack: Python, Starlette, OpenAI-compatible Chat Completions
  • Channels: iMessage
  • Docs: /docs/external-harness