Skip to content
Templates

Put an OpenAI Agents SDK agent on iMessage

Put your product in iMessage with Keiki: an OpenAI Agents SDK agent with tools and handoffs answers your customers' texts from your own server.

View imessage-openai-agents-sdk on GitHub

How do I put an OpenAI Agents SDK agent on iMessage?

  1. Deploy the repo: click Deploy to Render in the README (or git clone https://github.com/nizzyabi/imessage-openai-agents-sdk && cd imessage-openai-agents-sdk && npm install) and set OPENAI_API_KEY (plus OPENAI_MODEL to pick a model).
  2. Point a Keiki agent at it: in the dashboard, set the agent's harness to external, choose push and set the endpoint URL to https://your-app.example.com/keiki/turn (or use the developer API). Set KEIKI_AGENT_ID to the agent's ID so the server only accepts its turns (Keiki's platform signature is verified by default), or generate a signing secret on the same page and set it as KEIKI_SIGNING_SECRET.
  3. Attach an iMessage line to the agent and text it. The example agent looks up orders with a tool and hands returns to a second agent; swap in your own agents and tools in src/agent.ts.

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

Details

  • Stack: OpenAI Agents SDK, @openai/agents, Hono, Node.js, TypeScript, @onkeiki/channels, Render
  • Channels: iMessage
  • Docs: /docs/external-harness