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

Changelly
Photon Releases Spectrum: An Open-Source TypeScript Framework that Deploys AI Agents Directly to iMessage, WhatsApp, and Telegram
Changelly

For all the progress made in AI agent development over the past few years, one fundamental problem has remained largely unsolved: most people never actually interact with agents. They live behind developer dashboards, inside specialized apps that users are asked to download, and within chat interfaces that the majority of the world’s population will never visit. The models are good. The reasoning capabilities are extraordinary. But the distribution is broken.

Photon, an infrastructure company focused on reliable, low-latency agent execution and messaging infrastructure, is directly attacking this problem with the launch of Spectrum — an open-source SDK and cloud platform that connects AI agents to the messaging interfaces billions of people already use every day: iMessage, WhatsApp, Telegram, Slack, Discord, Instagram, Phone, and more.

bybit

Instead of asking users to adopt a new interface to interact with your agent, Spectrum lets you deploy that agent where your users already spend their time.

What Spectrum Actually Does

Spectrum provides a unified programming interface that abstracts away the platform-specific differences between messaging services. Developers write agent logic once and Spectrum handles the delivery to whichever platforms they choose to support. The SDK is written in TypeScript, is MIT licensed, and can be installed via npm install spectrum-ts or bun add spectrum-ts. Support for Python, Go, Rust, and Swift is on the roadmap.

A minimal working iMessage 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 handful of lines — deploys an agent that shows up in a recipient’s Messages app like any other contact. To extend the same agent to WhatsApp, a developer simply adds one entry to the providers array: providers: [imessage.config(), whatsapp.config()]. The message loop and agent logic remain identical. Spectrum handles the platform-level differences internally.

For dev teams that need to build connectors to non-standard platforms, the SDK exposes a definePlatform API that allows developers to write their own providers. All message types — text, attachments, contacts, voice, and custom content types — are handled with type-safe inbound and outbound distinctions, which reduces a common class of runtime errors in production agent deployments.

The Infrastructure Layer: Latency, Reliability, and Scale

One of the more technically interesting aspects of Spectrum is the infrastructure Photon has built underneath it. The company operates what it calls an edge-first network designed specifically for agent-to-human messaging workloads. According to Photon’s published benchmarks, Spectrum delivers end-to-end message latency of under 1 second — compared to a CPaaS (Communications Platform as a Service) industry average of approximately 500ms to 1.5 seconds. The measured E2E latency on Photon’s edge network is approximately 150 to 250 milliseconds.

The platform targets 99.9% uptime. For AI engineers building production agents, this matters significantly — a messaging layer that drops connections or stalls under load is far more damaging to user experience than any model-quality issue.

Spectrum also includes adaptive content rendering, which automatically adapts message structure, formatting, and interaction patterns to match the native constraints of each platform. For example, an iMessage deployment can send a poll with structured options using imessage(space).sendPoll({ question, options }), and Spectrum ensures that renders natively within the Messages app rather than as a raw text fallback. This matters because each messaging platform has different rendering capabilities, character limits, and interaction primitives — and failing to account for these differences produces experiences that feel broken or out of place to end users.

On the operational side, Spectrum ships with built-in observability: detailed audit logs, full message histories, and human-in-the-loop controls that allow teams to flag individual messages for manual review, monitor agent behavior over time, and intervene when necessary.

A Real-World Validation: Ditto on iMessage

Photon’s most prominent production case study is Ditto, an iMessage-based matchmaker agent for college students. Using Spectrum, Ditto connected more than 42,000 users and processed more than 400,000 messages — entirely through iMessage, without asking users to download anything new. Users interacted with Ditto the same way they message friends: through the app already on their phone.

The Photon team recounts a story from another early client that illustrates the practical impact of this approach. A user’s mother — someone who had never downloaded a new app and did not know what a “prompt” was — interacted with an AI agent through iMessage for the first time. The agent appeared in her conversation list like any other contact. She talked to it the way she talks to her son. There was no new interface to learn, no onboarding, no friction. That moment, Photon argues, is what genuine adoption looks like.

Two Deployment Options: Open Source and Cloud

Spectrum is available in two configurations. The Spectrum SDK is fully open source under the MIT license and can be self-hosted. It provides the unified messaging interface, type-safe message handling, the definePlatform API, and support for iMessage, WhatsApp, Telegram, terminal, and custom platforms.

Spectrum Cloud is Photon’s hosted infrastructure layer. It provides managed iMessage and WhatsApp connectivity that teams can activate in minutes, along with the edge network, uptime guarantees, audit logs, and human-in-the-loop controls. For teams that want to ship quickly without managing messaging infrastructure, Spectrum Cloud is the faster path to production.

Key Takeaways

Spectrum solves the agent distribution problem, not the model problem: Most AI agents fail at adoption because they require users to open new dashboards or download new apps. Spectrum routes agents directly into iMessage, WhatsApp, Telegram, Slack, Discord, Instagram, and Phone — platforms billions of people already use daily.

One codebase, every platform: Developers write agent logic once using the spectrum-ts TypeScript SDK and add platforms via a single providers array. Switching from iMessage-only to iMessage + WhatsApp requires changing one line of code.

Spectrum: Revolutionizing CPaaS with Platform-Level Uniformity

Spectrum handles all platform-level variations internally, streamlining operations for developers.

The infrastructure is designed to ensure top-tier performance, with Spectrum delivering messages in less than a second over Photon’s cutting-edge network. The end-to-end latency is impressively low, averaging around 150-250ms. This is a significant improvement compared to the CPaaS industry norm of 500ms-1.5s, supported by a remarkable 99.9% uptime.

The SDK is fully open source under the MIT license, providing flexibility for developers. They can choose to self-host the complete Spectrum stack or opt for Spectrum Cloud, a managed service offering seamless integration with iMessage and WhatsApp. Spectrum Cloud comes with additional features like built-in audit logs, message histories, and human-in-the-loop controls, ensuring a smooth scaling process without any architectural modifications.

For more information and access to resources, visit the GitHub Repo and Product Page. Stay updated by following us on Twitter, and join our vibrant community on the ML SubReddit. Don’t forget to subscribe to our Newsletter and join us on Telegram.

If you’re interested in partnering with us to promote your GitHub Repo, Hugging Face Page, Product Release, or Webinar, please Connect with us.

Blockonomics

Be the first to comment

Leave a Reply

Your email address will not be published.


*