photon-hq/spectrum-ts
Bring agents to any interfaces
What it solves
AI agents are often stuck inside web chat interfaces, but people live in messaging apps. Spectrum solves this by letting agents communicate over the channels you already use every day — iMessage, SMS, email, Slack, Discord, and voice — so you can talk to an agent the same way you talk to a friend.
How it works
Spectrum is a TypeScript SDK that you plug into your project. You set up a Spectrum app with your project credentials and choose which "providers" (like iMessage or Telegram) you want to support. Then you listen for incoming messages with a simple loop, and reply using the provided helpers. It can run hosted via Spectrum Cloud, or fully standalone by connecting to local databases or your own endpoints. The framework handles the plumbing for each platform's messaging protocol, so you write one API and reach many channels.
Who it's for
Developers who want to bring AI agents to everyday communication tools without building integrations from scratch. It suits both quick experiments (using Spectrum Cloud) and production setups looking to self-host with custom providers.
Highlights
- Batteries-included package: one install gives you the runtime plus standard providers for iMessage, WhatsApp Business, Telegram, Slack, and Terminal.
- Simple async message loop:
for await (const [space, message] of app.messages)lets you respond easily. - Works fully standalone: connect to a local iMessage database or bring your own gRPC endpoints, even build custom providers with
definePlatform. - Startup cancellation: pass an
AbortSignalto abort initialization, with careful cleanup handling and a dedicated error type for cleanup failures.
Related
- Project
- Project
- Project
- Project
- Dispatch