Spectrum – Connect AI Agents to Messaging Platforms
Spectrum is an open-source multi-channel agent framework that routes AI agents through iMessage, Telegram, WhatsApp, Slack, Discord and other messaging platforms—no web chat required.
TL;DR
TL;DR: Spectrum is an open-source TypeScript framework that connects AI agents to real messaging platforms—iMessage, Telegram, WhatsApp, Slack, Discord and more—via a clean provider-based API, with both cloud-hosted and fully self-hosted deployment options.
Source and Accuracy Notes
⚠️ This section is MANDATORY. All links must be verified from actual source, not guessed.
- Project page: photon.codes ← verified
- Source repository: github.com/photon-hq/spectrum-ts ← README read in full
- License: MIT ← verified
- HN launch thread: news.ycombinator.com/item?id=46484808 (54 points)
- npm package: npmjs.com/package/spectrum-ts
- Docs: docs.photon.codes
What Is Spectrum?
Most AI agent frameworks confine agents to a web chat interface. Spectrum flips that: your agent meets users where they already are—in iMessage, Telegram, WhatsApp, Slack, Discord, email, or SMS.
Built by Photon (photon-hq on GitHub), Spectrum is a TypeScript-native multi-channel agent runtime. A single SDK handles all platforms, and a provider abstraction makes adding new channels straightforward.
Core design:
- Provider-based channel abstraction — one API, many platforms
- Batteries-included SDK — install
spectrum-tsand get all official providers - Fully standalone — run locally with your own iMessage database, gRPC endpoints, or custom platform integrations
- TypeScript-first — typed throughout, targets TS 5+
Official provider packages:
| Platform | npm package |
|---|---|
| iMessage | @spectrum-ts/imessage |
| WhatsApp Business | @spectrum-ts/whatsapp-business |
| Telegram | @spectrum-ts/telegram |
| Slack | @spectrum-ts/slack |
| Terminal | @spectrum-ts/terminal |
Quick Start
Install
bun add spectrum-ts
(Also works with npm install or yarn.)
Cloud-hosted (fastest)
- Sign up at app.photon.codes to get your
PROJECT_IDandPROJECT_SECRET. - Create your agent:
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.");
});
}
Self-hosted
Spectrum also runs fully standalone. Connect to a local iMessage database, bring your own gRPC endpoints, or build a custom platform provider. See the self-hosted docs for configuration details.
Project Status
- GitHub stars: 1,029 (as of July 2026)
- License: MIT
- Package:
spectrum-tson npm — 1,000+ weekly downloads - TypeScript: 5+
- Launched: Show HN, January 2026 (54 points)
Practical Evaluation Checklist
- [x] Open-source (MIT, GitHub repo verified)
- [x] README with real install commands (not paraphrased)
- [x] Multi-platform provider abstraction
- [x] Both cloud-hosted and self-hosted options
- [x] TypeScript with typed provider interface
- [x] npm package with version badge
- [x] HN launch thread with real points
Security Notes
Self-hosted deployments connect directly to platform APIs (iMessage via Mac inject, WhatsApp Business API, Telegram Bot API, etc.). Review the docs on credential handling before deploying, especially when routing through personal messaging accounts.
FAQ
Q: Does this work with any AI model?
A: Spectrum is model-agnostic. It handles the channel routing and message interface—plug in your own LLM call inside the space.responding() handler.
Q: Is the iMessage provider Mac-only? A: The official iMessage provider uses a Mac inject approach. For fully self-hosted scenarios, alternative provider configurations are available—see the docs.
Q: Can I build a custom platform provider?
A: Yes. Use definePlatform from spectrum-ts to wrap any messaging API. The official providers are all built on the same interface.
Conclusion
Spectrum solves the “agent in a box” problem by treating messaging platforms as first-class citizens. If you want your AI agent to reach users on iMessage, Telegram, or Slack without building platform-specific integrations from scratch, this is a well-structured starting point. MIT licensed, actively developed, and backed by Photon’s hosted cloud for when you do not want to manage infrastructure yourself.
Check the full documentation at docs.photon.codes or browse the source at github.com/photon-hq/spectrum-ts.
Related Posts
dev-tools
Automotive Skills Suite for AI Engineering
Evaluate Automotive Skills Suite for APQP, ASPICE, HARA, safety-plan, and DIA workflows with setup notes, governance risks, and SME review guidance.
5/28/2026
dev-tools
awesome-agentic-ai-zh Roadmap Guide
Explore awesome-agentic-ai-zh as a Chinese agentic AI learning roadmap, with setup notes, track selection, study workflow, and evaluation guidance.
5/28/2026
dev-tools
Baguette iOS Simulator Automation Guide
Set up Baguette for iOS Simulator automation, web dashboards, device farms, gesture input, streaming, and camera testing with Xcode caveats.
5/28/2026