Docs/Server/channels.toml reference
channels.toml reference
Connect HolaClaw Server to Telegram, Slack, Google Chat or WhatsApp with channels.toml, and decide who may talk to the agent and when it replies.
- Server
- Configuration
- Reference
- Channels
channels.toml declares the chat apps your agents answer on. It is optional: with no channels.toml, you talk to the agent from the terminal and the HolaClaw apps only.
Each channel is a named instance, [channels.<name>], served by one agent. You can run several instances of one type, such as two Telegram bots.
Example
version = 1
[channels.tg-main]
type = "telegram"
agent = "main"
[channels.tg-main.access]
dm = "invite"
rooms = "approved"
reply = "mention"
reply_to = "rooms"Keys
| Key | Type | Allowed values | Default | Description |
|---|---|---|---|---|
version |
integer | Required. 1. |
||
channels.<name>.type |
string | telegram, slack, googlechat, whatsapp |
Required. The channel adapter. | |
channels.<name>.agent |
string | Required. The agent serving this channel, such as main. |
||
channels.<name>.access.dm |
string | invite, open |
invite |
Direct messages from unknown senders. invite drops them unless they send an invite code. open answers them as pending identities, under the agent's [policy.guest], until an admin confirms them. |
channels.<name>.access.rooms |
string | off, approved, open |
off |
Group conversations. approved answers only rooms approved with a room invite. |
channels.<name>.access.reply |
string | mention, always |
mention |
When to reply in a conversation: only when mentioned, or to every message. |
channels.<name>.access.reply_to |
string | rooms, always, off |
rooms |
Where an answer is a native reply to the message that asked. |
holaclaw check reports ACC001 when access is open while the guest policy allows exec, write or external.
Credentials
Each channel needs a credential, stored in auth.toml with holaclaw auth set, never in channels.toml:
| Type | Credential | Command |
|---|---|---|
telegram |
the bot token from BotFather | holaclaw auth set channels.<name> bot_token |
slack |
a bot token and an app token | holaclaw auth set channels.<name> bot_token, then app_token |
googlechat |
a Google Cloud service account key (JSON) | holaclaw auth set channels.<name> service_account < key.json |
whatsapp |
none: link the account as a device | holaclaw login whatsapp --name <name> --phone "<number>" |
auth set reads the secret from stdin:
read -rs TOKEN && printf %s "$TOKEN" | holaclaw auth set channels.tg-main bot_token; unset TOKENThe daemon reads channels.toml only at start, so restart it after adding a channel. holaclaw status shows each channel's state, from unlinked to connected. check reports SEC003 for a channel without its credential.
The step-by-step setup for each app, from creating the bot to the first message, is in its own guide: Telegram, WhatsApp, Google Chat and Slack.
Letting people in
Everyone who talks to the agent is an identity with a role (owner, admin or user), and one binding per account on a channel. Give a person access with a one-shot invite code:
holaclaw identity create --name Carla --role user --invite tg-mainThe person sends the code to the bot, as /start CODE or by itself. A code works on one channel instance, once, for 15 minutes by default (--ttl, at most 1 hour).
For another channel, mint another invite with the id from holaclaw identity list:
holaclaw invite create --identity <id> --channel slack-mainTo approve a group chat under rooms = "approved", redeem a room invite in that room:
holaclaw invite create --room --channel tg-mainTo take access away, holaclaw identity disable <id> stops answering an identity and its tokens, and identity enable brings it back.
Related
Was this page helpful?
