Files
lettabot/lettabot.example.yaml
Cameron c410decd18 feat: unified group modes (open/listen/mention-only) (#267)
Consolidates listeningGroups and groups.requireMention into a single
groups config with explicit mode per group. Backward compatible --
legacy formats auto-normalize with deprecation warnings.

- Add shared group-mode.ts with isGroupAllowed/resolveGroupMode helpers
- Update all 5 channel adapters to use mode-based gating
- Default to mention-only for configured entries (safe), open when no config
- Listening mode now set at adapter level, bot.ts has legacy fallback
- Fix YAML large-ID parsing for groups map keys (Discord snowflakes)
- Add migration in normalizeAgents for listeningGroups + requireMention
- Add unit tests for group-mode helpers + update all gating tests
- Update docs, README, and example config

Closes #266

Written by Cameron and Letta Code

"Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint-Exupery
2026-02-10 16:01:21 -08:00

74 lines
2.2 KiB
YAML

# LettaBot Configuration
# Copy this to lettabot.yaml and fill in your values.
#
# Server modes:
# - 'cloud': Use Letta Cloud (api.letta.com) with API key
# - 'selfhosted': Use self-hosted Letta server
server:
mode: cloud
# For cloud mode, set your API key (get one at https://app.letta.com):
apiKey: sk-let-YOUR-API-KEY
# For selfhosted mode, uncomment and set the base URL:
# mode: selfhosted
# baseUrl: http://localhost:8283
agent:
name: LettaBot
# displayName: "💜 Signo" # Prefix outbound messages (useful in multi-agent group chats)
# Note: model is configured on the Letta agent server-side.
# Select a model during `lettabot onboard` or change it with `lettabot model set <handle>`.
# BYOK Providers (optional, cloud mode only)
# These will be synced to Letta Cloud on startup
# providers:
# - id: anthropic
# name: lc-anthropic
# type: anthropic
# apiKey: sk-ant-YOUR-ANTHROPIC-KEY
# - id: openai
# name: lc-openai
# type: openai
# apiKey: sk-YOUR-OPENAI-KEY
channels:
telegram:
enabled: true
token: YOUR-TELEGRAM-BOT-TOKEN
dmPolicy: pairing # 'pairing', 'allowlist', or 'open'
# groupPollIntervalMin: 5 # Batch interval for group messages (default: 10)
# instantGroups: ["-100123456"] # Groups that bypass batching
# Group access + response mode:
# groups:
# "*": { mode: listen } # Observe all groups; only reply when @mentioned
# "-1001234567890": { mode: open } # This group gets all messages
# "-1009876543210": { mode: mention-only } # Drop unless @mentioned
# mentionPatterns: ["hey bot"] # Additional regex patterns for mention detection
# slack:
# enabled: true
# appToken: xapp-...
# botToken: xoxb-...
# groups:
# "*": { mode: listen }
# "C0123456789": { mode: open }
# discord:
# enabled: true
# token: YOUR-DISCORD-BOT-TOKEN
# groups:
# "*": { mode: listen }
# "1234567890123456789": { mode: open } # Server or channel ID
# whatsapp:
# enabled: true
# selfChat: false
features:
cron: false
heartbeat:
enabled: false
intervalMin: 30
# Attachment handling (defaults to 20MB if omitted)
# attachments:
# maxMB: 20
# maxAgeDays: 14