Photon Releases Spectrum: An Open-Source TypeScript Framework That Sends AI Agents Directly to iMessage, WhatsApp, and Telegram

For all the progress made in AI agent development over the past few years, one key problem remains unsolved: most people never interact with agents. They live behind developer dashboards, inside special apps that users are asked to download, and in chat rooms that most people in the world will never visit. Beautiful models. Thinking skills are rare. But the distribution is broken.
Photon, an infrastructure company specializing in the execution of a reliable, low-cost messaging infrastructure, is attacking this problem head-on with the launch of The Spectrum – an open source SDK and cloud platform that connects AI agents to the messaging environment that billions of people already use every day: iMessage, WhatsApp, Telegraph, Slack, Discord, Instagram, Phone, and more.
Instead of asking users to use a new interface to interact with your agent, Spectrum lets you use that agent where your users already spend their time.
What Spectrum Actually Does
Spectrum provides a unified programming interface that eliminates platform-specific differences between messaging services. Developers write the logical agent once and Spectrum handles delivery to whatever platforms they choose to support. The SDK is written in TypeScript, is licensed by MIT, and can be installed with npm install spectrum-ts or bun add spectrum-ts. Support for Python, Go, Rust, and Swift is on the roadmap.
A working iMessage mini-agent looks like this:
import { Spectrum } from "spectrum-ts";
import { imessage } from "spectrum-ts/providers/imessage";
const app = await Spectrum({
projectId: process.env.PROJECT_ID,
projectSecret: process.env.PROJECT_SECRET,
providers: [imessage.config()],
});
for await (const [space, message] of app.messages) {
await space.responding(async () => {
await message.reply("Hello from Spectrum.");
});
}
That code — a few lines — runs the agent from the recipient’s messaging app just like any other contact. To extend the same agent to WhatsApp, the developer simply adds one entry to providers list: providers: [imessage.config(), whatsapp.config()]. The message loop and agent logic remain the same. Spectrum handles platform level differences internally.
For dev teams that need to build connectors for non-standard platforms, the SDK presents a definePlatform An API that allows developers to write their own providers. All message types – text, email attachments, contacts, voice, and custom content types – are handled with type-safe inbound and outbound distinctions, reducing the common category of runtime errors in production agent deployments.
Infrastructure Layer: Latency, Reliability, and Scale
One of the most interesting aspects of Spectrum’s technology is the infrastructure that Photon has built under it. The company works as it costs edge-first the network is designed specifically for agent-to-person workloads. According to Photon’s published benchmarks, Spectrum delivers end-to-end message latency of less than 1 second – compared to the CPaS (Communications Platform as a Service) industry average of around 500ms to 1.5 seconds. E2E latency on the Photon edge network is about 150 to 250 milliseconds.
The platform targets 99.9% uptime. For AI production engineers, this is very important – a message layer that slows down the connection or stalls under load is more detrimental to the user experience than any model quality problem.
Spectrum also includes dynamic content renderingthat automatically adjusts message structure, formatting, and interaction patterns to match the local limitations of each platform. For example, sending an iMessage can send a survey with structured options using imessage(space).sendPoll({ question, options })and Spectrum ensures that it renders natively within the Messages app rather than as a raw backend. This is important because each messaging platform has different capabilities, character limits, and interaction preferences – and failing to account for these differences produces an experience that feels broken or inappropriate for end users.
On the performance side, Spectrum ships with built-in visibility: detailed audit logs, full message histories, and human controls that allow teams to flag individual messages for manual review, monitor agent behavior in real time, and intervene when needed.
Real-World Authentication: Ditto on iMessage
The most prominent production case study of Photon is Such is the casean iMessage-based matchmaking agent for college students. Using Spectrum, Ditto has connected more than 42,000 users and processed more than 400,000 messages – entirely through iMessage, without asking users to download anything new. Users interact with Ditto the same way they message friends: with an app that’s already on their phone.
The Photon team tells a story from an early client that illustrates the practical impact of this approach. The user’s mother — someone who had never downloaded a new app and had no idea what a “notification” was — interacted with an AI agent via iMessage for the first time. The agent appears in his chat list just like any other contact. He spoke to him the way he spoke to his son. There was no new interface to learn, no climbing, no friction. That moment, Photon says, is what true discovery looks like.
Two Deployment Options: Open Source and Cloud
The Spectrum is available in two configurations. I Spectrum SDK it is fully open source under the MIT license and can be self-hosted. It provides a unified messaging interface, secure messaging, i definePlatform API, and support for iMessage, WhatsApp, Telegram, Terminal, and custom platforms.
Spectrum Cloud infrastructure layer hosted by Photon. It provides managed iMessage and WhatsApp connectivity that teams can open in minutes, as well as edge networking, full-time assurances, audit logs, and human-in-the-loop controls. For teams that want to deploy quickly without managing a messaging infrastructure, Spectrum Cloud is the fastest way to go to production.
Key Takeaways
- Spectrum solves the agent distribution problem, not the model problem: Most AI agents fail to be adopted because they require users to open new dashboards or download new applications. Spectrum agents routes directly to iMessage, WhatsApp, Telegram, Slack, Discord, Instagram, and Phone – platforms that billions of people already use every day.
- One codebase, all platform: Developers write agent logic once using
spectrum-tsTypeScript SDK and add platforms in oneproviderslist. Switching from iMessage only to iMessage + WhatsApp requires changing one line of code. Spectrum handles all platform level differences internally. - The infrastructure is designed for production grade delays: Spectrum delivers messages in less than 1 second on an E2E network estimated at ~150–250ms — much faster than the CPaaS industry average of ~500ms–1.5s — supported by 99.9% uptime.
- The SDK is fully open source (MIT), with a managed cloud option: Dev teams can host the entire Spectrum stack themselves or use Spectrum Cloud for managed iMessage connectivity with WhatsApp, built-in audit logs, message history, and in-the-loop human controls – without any architecture changes as they scale.
Check it out GitHub Repo again Product Page. Also, feel free to follow us Twitter and don’t forget to join our 130k+ ML SubReddit and Subscribe to Our newspaper. Wait! are you on telegram? now you can join us on telegram too.
Need to work with us on developing your GitHub Repo OR Hug Face Page OR Product Release OR Webinar etc.? contact us


