Your Convex Agent Can Send and Receive iMessage with Photon

https://hackernoon.imgix.net/images/2jqChkrv03exBUgkLrDzIbfM99q2-3q822sa.jpeg

Convex developers can now add a durable iMessage inbox and outbox to an agent backend with @spectrum-ts/convex, the new Convex component for Photon Spectrum.

The component receives Photon webhooks, writes each verified delivery to Convex before returning an HTTP 200, and hands everything after that to Convex's scheduler. Outbound messages move through a paced outbox to a Photon sender running inside a Convex Node action.

No separately hosted message loop. No sidecar server just to keep app.messages alive.

The component is now available on npm and listed on Convex Components.

npm install @spectrum-ts/convex

What the component does

@spectrum-ts/convex handles the messaging pipeline that sits between Photon and your agent:

  • Verified, durable webhook ingestion. The route verifies Photon's HMAC signature and persists the delivery before returning 200. An acknowledged inbound message is already in Convex.
  • Immediate or collapsed turns.Immediate mode handles every message separately. Collapse mode lets a follow-up...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more