Skip to content

Communication channels

A communication channel receives and/or sends messages for whoever owns it. Channels replace signal sources: what a channel receives still becomes a signal and runs through classification, the case builder and review. What is new is that a channel belongs to someone and can send.

TypeReceivesSends
emailIMAP mailboxown SMTP server, with address, display name and footer
webhookHTTP requests from other systems–
modulenew records of a Brezel module–
chat (built in)–messages in Brezel to colleagues

WhatsApp and telephone channels are planned.

One module per system carries the CommunicationChannels capability. owner_modules names the modules whose records can own a channel; Bakery adds a select field owner_<key> for each of them. Each owner module carries the ChannelOwner capability, which provides the layout building block ${capabilityComposable("channels")}: a table of the record’s channels with “New”.

[
{
"resource_module": "channels",
"depends_on": "resource_module.departments",
"resource": {
"identifier": "channels",
"title": "name",
"options": {
"capabilities": [
{
"identifier": "CommunicationChannels",
"options": {
"owner_modules": {"user": "users", "department": "departments"},
"secret_module": "secrets"
}
}
]
},
"fields": []
}
}
]

Add {"identifier": "ChannelOwner"} to the capabilities of users and departments, and the row "${capabilityComposable('channels')}" to their detail layouts. To give customers or projects their own channels, add them to owner_modules the same way.

The owner decides, through the organisation chart:

OwnerAgents that take over its casesPeople who approve them
AI colleaguethat agentits nearest human superior
Departmentthe AI colleagues of the department and the departments belowthe department leads
Personany agentthat person
nobody (company channel)any agentas configured

agent_candidates and case_approvers on the channel add agents and approvers on top.

An agent sends through, in this order:

  1. its own channel (for a personal assistant: the channel of its person),
  2. a channel of its department, then of the departments above,
  3. the default channel of the type (is_default); there is one per type.

send_policy decides whether a person approves every message first (approval, the default) or the agent sends directly (automatic). The approval card shows recipient, subject and text; the approval holds for exactly that message.

E-mail channels add their footer below every message. Placeholders: {sender.name}, {sender.profession}, {sender.department}, {company}. A line whose placeholders are all empty is left out, so one footer fits everyone. display_name may contain {sender.name}, e.g. {sender.name} | Example Ltd.

A channel never stores a password. Its field credential points to a login secret of the secret manager. The channel uses it on behalf of the person who last set the credential or changed where the channel connects (IMAP/SMTP server, port, username); that person must be allowed to use the secret. Somebody who may not use a secret can therefore not point it at a server of their own.

In the setup chat and the channel form the password is typed into a secure field; Brezel stores it as a secret and connects the channel.

The toolkit channels is part of every agent’s default tools. Its tool send_message:

  • channel_type: "email" with to, subject, body (Markdown, without signature), optionally channel (another of the agent’s channels; a channel it may not use is refused with the list of those it may) and reply_to_signal (answers a received e-mail in its thread, through the channel it came in);
  • channel_type: "chat" writes a colleague in Brezel, also one the agent has no chat with yet (with subject a new chat is started).

bakery migrate-signal-sources-to-channels turns every signal source into a channel with the same identifier (webhook URLs stay valid, mails already read are not read again), moves the mailbox password into a login secret and points the signals at the channel. It is idempotent; Brezel Cloud runs it on every bootstrap.