Files
lettabot/lettabot.example.yaml
Gabriele Sarti 0dbd743f7f feat: add listening mode for groups (#208)
Add `listeningGroups` config option (per-channel, same pattern as
`instantGroups`) where the bot periodically reads group messages and
sends them to the Letta agent for memory updates, but force-suppresses
response delivery unless the bot is explicitly mentioned.

- Add `isListeningMode` field to `InboundMessage`
- Add `listeningGroups` to all 5 channel configs
- Map `listeningGroups` to env vars in `configToEnv()`
- Rename `fixInstantGroupIds` to `fixLargeGroupIds` to also fix
  `listeningGroups` entries (Discord snowflake precision fix)
- Build `listeningGroupIds` set and pass to bot
- Tag messages as listening mode in `processGroupBatch()` when group
  is in listening mode and bot wasn't mentioned
- In `processMessage()`: skip typing indicator, heartbeat target
  update, recovery error messages, and force-suppress response
  delivery for listening mode messages
- Add `[OBSERVATION ONLY]` header to batch envelope for listening mode
- Document in lettabot.example.yaml

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 11:01:26 -08:00

64 lines
1.8 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
# 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
# listeningGroups: ["-100123456"] # Groups where bot observes but only replies when @mentioned
# slack:
# enabled: true
# appToken: xapp-...
# botToken: xoxb-...
# listeningGroups: ["C0123456789"] # Channels where bot observes only
# discord:
# enabled: true
# token: YOUR-DISCORD-BOT-TOKEN
# listeningGroups: ["1234567890123456789"] # Server/channel IDs where bot observes only
# 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