-
Notifications
You must be signed in to change notification settings - Fork 62
Connectors
Connectors are messaging platform integrations. They are configured under the connectors key in ~/.milady/milady.json (the legacy channels key is still accepted but deprecated). Each connector entry is keyed by a connector ID (e.g. "telegram", "discord") and accepts a ConnectorConfig object. Common fields are documented below.
Requires @elizaos/plugin-telegram (included by default).
{
"connectors": {
"telegram": {
"botToken": "123456:ABC-...",
"dmPolicy": "pairing"
}
}
}You can also set TELEGRAM_BOT_TOKEN in ~/.milady/.env.
Requires @elizaos/plugin-discord (included by default).
{
"connectors": {
"discord": {
"token": "Bot TOKEN_HERE",
"dmPolicy": "pairing"
}
}
}Uses @whiskeysockets/baileys. WhatsApp credentials are flushed on agent stop and re-established on restart via QR code pairing.
{
"connectors": {
"whatsapp": {
"enabled": true
}
}
}{
"connectors": {
"twitch": {
"enabled": true
}
}
}| Field | Description |
|---|---|
enabled |
Set false to disable without removing config |
dmPolicy |
DM access: "open" (all), "pairing" (paired users), "closed" (no DMs) |
configWrites |
Allow connector to write config on events |
The messages.queue config controls how rapid inbound messages are handled:
{
"messages": {
"queue": {
"mode": "steer",
"debounceMs": 500,
"cap": 10,
"drop": "old",
"byChannel": {
"telegram": "steer",
"discord": "queue"
}
}
}
}Queue modes (QueueMode): steer, followup, collect, steer-backlog, steer+backlog, queue, interrupt.
Drop policies (QueueDropPolicy): old, new, summarize.
Debounce rapid inbound messages per sender:
{
"messages": {
"inbound": {
"debounceMs": 300,
"byChannel": {
"telegram": 500
}
}
}
}{
"messages": {
"ackReaction": "eyes",
"ackReactionScope": "all",
"removeAckAfterReply": true
}
}Valid ackReactionScope values: "group-mentions" (default), "group-all", "direct", "all".
Prefix auto-added to all outbound replies. Supports template variables:
{
"messages": {
"responsePrefix": "[{model} | think:{thinkingLevel}]"
}
}Supported variables: {model}, {modelFull}, {provider}, {thinkingLevel}/{think}, {identity.name}/{identityName}.
TTS for outbound replies. Providers: elevenlabs, openai, edge.
{
"messages": {
"tts": {
"auto": "always",
"provider": "elevenlabs",
"elevenlabs": {
"apiKey": "...",
"voiceId": "...",
"modelId": "eleven_monolingual_v1"
}
}
}
}Auto-TTS modes (TtsAutoMode): off, always, inbound, tagged.
Edge TTS requires no API key, but calls Microsoft's cloud by default. To disable it entirely, set:
MILADY_DISABLE_EDGE_TTS=1
{
"messages": {
"tts": {
"provider": "edge",
"edge": {
"enabled": true,
"voice": "en-US-JennyNeural"
}
}
}
}Route messages from a specific channel/peer to a specific agent:
{
"bindings": [
{
"agentId": "my-agent",
"match": {
"channel": "telegram",
"peer": {
"kind": "group",
"id": "-1001234567890"
}
}
}
]
}Route a peer's messages to multiple agents simultaneously:
{
"broadcast": {
"my-peer-id": ["agent-a", "agent-b"],
"strategy": "parallel"
}
}Strategies: "parallel" (default) or "sequential".