Ensemble Docs

Channels

Put an agent behind SMS, Slack or Teams, so a message from outside becomes a conversation with the agent and a reply goes back the same way.

A channel connects a messaging provider to an agent. Someone texts your Twilio number, the message reaches the agent as a conversation, and the agent's answer is sent back as a text.

It is the third way something outside reaches in, alongside the other two:

StartsAnswers with
TriggerA webhookAn acknowledgement; workflows run after
API endpointAn HTTP callThe operation's result
ChannelA message from a providerA reply on the same channel

The pipeline

The provider is acknowledged before the agent runs. Validation happens inline and then the message is queued, so a slow agent does not hold the provider's connection open or trip its timeout. Providers retry aggressively on a slow response, and a retry would mean the agent answering twice.

A conversation is continuous. The thread id decides which messages belong together, so a reply arriving ten minutes later lands in the same conversation rather than starting a new one.

What you can put in the middle

Every stage between the message and the reply is optional, and each exists for a real case:

Context tool

Runs before the agent and adds what it returns to the agent's context. Look the sender up before answering them.

Reject condition

An expression over the context tool's result. Answer with a fixed message instead of invoking the agent.

Thread id expression

Decides what counts as one conversation. By phone number, by number pair, or by whatever the payload carries.

Reply template

Composes the outgoing message from the agent's structured output, rather than sending its raw text.

Configuring a channel covers all four, with the variables each one can use.

Providers

TypeProviderCarries
smsTwilioText messages, and optionally voice transcription
slackSlackBot messages
teamsTeamsBot messages

Each validates inbound requests in its provider's own way, a Twilio signature or a Slack signing secret, so a channel URL cannot be driven by anyone who merely knows it.

Phone calls are configured separately, on the agent, rather than as a channel here. A live voice call is a different shape from a message and a reply: it is a session with a greeting, a voice and a duration limit.

Credentials belong in Environments

A channel's configuration holds provider credentials, and they should be references rather than values:

accountSid:  ${secrets.TWILIO_ACCOUNT_SID}
authToken:   ${secrets.TWILIO_AUTH_TOKEN}

They resolve per message, so rotating a provider credential is one edit in Environments rather than a change to every channel using it.

Where to go next

On this page