StartOne docs
$249 · Commercial license

Developer — Message

One AI bot, eight messaging platforms, two markets. Streaming chat with per-conversation memory, in-chat media generation, rate limiting — and a single environment variable to switch between the Western and Chinese channel sets.

Requirements

Quickstart

npm install
cp .env.example .env.local
npm run dev
It boots with nothing configured. With no keys and no bot tokens, every channel logs that it is not connecting and the bot runs in dry-run mode. Nothing crashes. Add credentials one channel at a time.

Markets — PROFILE=us or PROFILE=cn

This is the core design decision of the edition. One codebase serves both markets, and a single variable picks which channel set boots:

PROFILEChannels that start
usDiscord, Telegram, Slack, WhatsApp
cnWeCom (企业微信), Feishu (飞书), DingTalk (钉钉), WeChat Official Accounts

Channels outside the active profile are never initialised, so you do not need their credentials. Set PROFILE in .env.local.

Configuration

Core

VariablePurpose
PROFILEus or cn — which market's channels to run
AI_MODELWhich chat model to use
SYSTEM_PROMPTOverride the bot's system prompt
BOT_PRESETLoad a preset persona (see examples/presets.ts)
REDIS_URLSession memory and rate limiting. Optional; falls back to in-process.

AI providers

VariableEnables
OPENAI_API_KEYGPT models
ANTHROPIC_API_KEYClaude models
GOOGLE_GENERATIVE_AI_API_KEYGemini models
ZAI_API_KEYGLM models

Media

VariablePurpose
FAL_KEYfal.ai — image, video, speech
REPLICATE_API_TOKENReplicate — the alternate provider
MEDIA_PROVIDERfal (default) or replicate

Channel setup

Each channel needs its own credentials from that platform's developer console. Set only the ones you intend to run. Per-channel walkthroughs ship in the repo under docs/channels/.

Western channels (PROFILE=us)

ChannelVariablesWhere to get them
DiscordDISCORD_BOT_TOKEN
DISCORD_APP_ID
Discord Developer Portal → your application
TelegramTELEGRAM_BOT_TOKENTalk to @BotFather
SlackSLACK_BOT_TOKEN
SLACK_APP_TOKEN
Slack API → your app (Socket Mode)
WhatsAppWHATSAPP_ACCESS_TOKEN
WHATSAPP_PHONE_NUMBER_ID
WHATSAPP_VERIFY_TOKEN
WHATSAPP_APP_SECRET
Meta for Developers → WhatsApp Business API

Chinese channels (PROFILE=cn)

ChannelVariablesWhere to get them
WeCom
企业微信
WECOM_CORP_ID
WECOM_CORP_SECRET
WECOM_AGENT_ID
WECOM_TOKEN
WECOM_ENCODING_AES_KEY
WeCom admin console → your app
Feishu / Lark
飞书
FEISHU_APP_ID
FEISHU_APP_SECRET
FEISHU_VERIFICATION_TOKEN
Feishu Open Platform
DingTalk
钉钉
DINGTALK_CLIENT_ID
DINGTALK_CLIENT_SECRET
DingTalk Open Platform
WeChat OA
微信公众号
Configured per the WeChat Official Account consoleWeChat MP platform
WeCom uses encrypted callbacks. The WECOM_TOKEN and WECOM_ENCODING_AES_KEY pair drives message signature verification and AES decryption — both are required, and the implementation is in src/adapters/wecom-crypto.ts. This is the fiddliest of the eight; the walkthrough in docs/channels/wecom.md covers the callback URL setup step by step.

Webhook vs. socket channels

Discord, Telegram, and Slack connect outbound (long-poll or socket) and need no public URL. WhatsApp, WeCom, Feishu, DingTalk, and WeChat OA are webhook-based — the platform calls you, so they need a publicly reachable HTTPS endpoint. In local development, use a tunnel (ngrok, Cloudflare Tunnel) and register that URL in the platform's console.

Media commands

Media generation works in-chat, on every channel:

CommandProduces
/imagine <prompt>An image
/video <prompt>A video
/speak <text>Speech audio

Results are returned as native attachments where the platform supports it, and as links where it does not.

Sessions and rate limiting

Session memory is per-conversation: the bot remembers context within a thread or DM. Backed by Redis when REDIS_URL is set; otherwise held in process and lost on restart.

Rate limiting is applied per user to stop one person exhausting your API budget. Configure it in src/core/rate-limit.ts.

Examples

Runnable examples ship in examples/: a support bot, a daily digest bot, a media studio bot, and a community Q&A bot. Each is a working starting point rather than a snippet.

Deploying

Deploy configs are included for Fly (fly.toml) and Railway (railway.json), plus a Dockerfile for anywhere else.

npm run build
npm start

In production you will want:

Full detail is in docs/deploy.md in the repo.

What this edition does not include

No billing. Unmetered by design. To run a paid bot business — credits, payment rails, multi-tenancy — see Business.