Give Your Mastra Agent an iMessage Number Using Photon Spectrum

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

Mastra agents can now send and receive iMessages through Photon Spectrum. Install @photon-ai/chat-adapter-imessage, add one adapter to your agent config, and your agent gets a phone number with native presence in the Messages app — on iPhone, iPad, or Mac. No Mac server, no personal Apple ID, no relay.

How Mastra connects to iMessage through Photon Spectrum

A Mastra agent defines its model, tools, memory, and channels in one place. The Photon iMessage adapter connects that agent to Photon Spectrum, which carries incoming and outgoing messages between Mastra and iMessage.

Adding iMessage to an existing Mastra agent is a config change, not a rewrite. The same agent that answers in Slack can answer in Messages.

How to connect a Mastra agent to iMessage

1. Install the adapter

npm install @photon-ai/chat-adapter-imessage

2. Add your Photon credentials

Create a project on the Photon dashboard and add your credentials:

IMESSAGE_PROJECT_ID=your-project-idIMESSAGE_PROJECT_SECRET=your-project-secretIMESSAGE_WEBHOOK_SECRET=your-webhook-signing-secret

IMESSAGE_WEBHOOK_SECRET is required...

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

Read more