> ## Documentation Index
> Fetch the complete documentation index at: https://docs.callem.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Channels

> Connect your agents to voice (phone) and chat (web) channels; configure telephony and widget routing.

# Channels

Channels are the bridge between your AI agents and users. Callem Studio is **multichannel**: the same agents can handle **voice** (phone) and **chat** (web widget) conversations. Additional channels (e.g. WhatsApp, social networks) are on the roadmap.

| Channel   | Description                                                                                                   |
| --------- | ------------------------------------------------------------------------------------------------------------- |
| **Voice** | Phone calls via SIP/telephony; configured with phone numbers and routing (see below).                         |
| **Chat**  | Text conversations from the web widget or the test chat in the agent configuration; no phone number required. |

## Overview

For **Voice**, each channel typically represents a phone number or SIP endpoint linked to an agent. When a call arrives on that number, the assigned agent answers and begins the conversation. For **Chat**, the agent is exposed through the Callem Studio web interface (test chat) or an embeddable widget; the same agent configuration (workflow, tools, call analysis) powers both voice and chat.

***

## Voice Channel (Phone Numbers)

### Assigning an Agent

<Steps>
  <Step title="Navigate to Channels">
    Go to **Deploy > Channels** to see all available phone numbers.
  </Step>

  <Step title="Select a number">
    Click on the phone number you want to configure.
  </Step>

  <Step title="Assign an agent">
    Choose the agent (single-prompt or workflow) that should handle calls on this number.
  </Step>

  <Step title="Save">
    Save the configuration. Incoming calls to this number will now be handled by the assigned agent.
  </Step>
</Steps>

### Supported Features

| Feature            | Description                                                                                  |
| ------------------ | -------------------------------------------------------------------------------------------- |
| **Inbound calls**  | Receive calls — the assigned agent answers automatically with the configured welcome message |
| **Outbound calls** | Place calls using this number as the caller ID (used by campaigns)                           |

<Info>
  SIP trunking and number porting are on the roadmap. Contact **[contact@callem.ai](mailto:contact@callem.ai)** if you need custom telephony integration.
</Info>

### Multi-Number Setup

You can assign the same agent to multiple numbers, or different agents to different numbers:

| Pattern                | Example                                                      |
| ---------------------- | ------------------------------------------------------------ |
| **Language routing**   | French number → French agent, English number → English agent |
| **Department routing** | Sales number → Sales agent, Support number → Support agent   |
| **Geographic routing** | Regional numbers → location-specific agents                  |
| **Overflow**           | Primary + backup number → same agent for high availability   |

### A/B Testing (Weighted Agent Routing)

You can assign **multiple agents** to a single phone number with traffic split percentages. This enables A/B testing of different agent configurations on real calls.

#### Setting Up A/B Testing

<Steps>
  <Step title="Navigate to Channels">
    Go to **Deploy > Channels** and find the phone number you want to configure.
  </Step>

  <Step title="Add a variant">
    Click **Add variant** to add a second agent to the number.
  </Step>

  <Step title="Select agents">
    Choose a different agent for each variant (e.g. your current agent as control, a new prompt version as variant).
  </Step>

  <Step title="Set traffic weights">
    Use the slider or type a percentage for each variant. For example, 80% for the control and 20% for the new variant.
  </Step>

  <Step title="Pin a version (optional)">
    For each variant, use the **version dropdown** to pin a specific [published version](/build/agent-versioning) or leave it on "Draft". This lets you test a frozen configuration against a new draft.
  </Step>

  <Step title="Save">
    Click the **Save** button that appears at the bottom of the phone number card. The button is only enabled when all variants have an agent selected and the total weight equals exactly **100%**. An **A/B Test** badge appears on the card.
  </Step>
</Steps>

#### How Routing Works

When a call arrives on a number with multiple agents configured:

1. The Voice Gateway reads the weight of each agent variant
2. A **weighted random selection** picks one agent for this call
3. The selected agent handles the entire call as if it were the only agent assigned

Each call is independently routed — there is no session stickiness or caller-based assignment.

#### Traffic Split Examples

| Configuration                            | Effect                                                      |
| ---------------------------------------- | ----------------------------------------------------------- |
| Agent A: 50%, Agent B: 50%               | Even split — each agent handles roughly half the calls      |
| Agent A: 90%, Agent B: 10%               | Conservative test — only 10% of calls go to the new variant |
| Agent A: 33%, Agent B: 33%, Agent C: 34% | Three-way test                                              |

#### Visual Feedback

The configuration UI provides:

* A **colored weight bar** showing the proportional split visually
* A **legend** with agent names and percentages
* A **warning** if the total weight does not equal 100%

<Info>
  The Save button is disabled until weights total exactly 100% and every variant has an agent selected. This prevents accidentally deploying an incomplete configuration.
</Info>

#### Removing A/B Testing

To go back to single-agent mode, remove the extra variants by clicking the trash icon. The remaining agent is automatically set to 100%.

#### Backward Compatibility

Numbers without A/B testing configured continue to work exactly as before — the single assigned agent handles all calls. No migration is needed.

***

## Chat Channel

The **Chat** channel lets users talk to your agent via text in a browser. No phone number is required.

### Where Chat Is Available

| Context                       | Description                                                                                                                                                                   |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Test chat (Callem Studio)** | In **Build > Agents**, open an agent and use the **Test Chat** sidebar to run a conversation. Useful for development and QA.                                                  |
| **Web widget**                | Embed the chat widget on your website or app; it connects to the same Voice Gateway chatbot service and uses the same agent (workflow, tools, knowledge base, call analysis). |

### Same Agent, Same Features

The same agent configuration powers both voice and chat: system prompt, workflow, tools, knowledge base, end-call and transfer tools, and **call analysis**. At the end of a chat session, call analysis runs on the message history (if configured) and the result is stored on the chat record, so you can filter and analyze chat sessions in **Monitor > Analytics** and **Monitor > Calls** (Chats tab) the same way as voice calls.

### Configuration

Chat uses the **Voice Gateway** chatbot service. Ensure the agent’s workflow and model are correctly set; the dashboard frontend connects to the chatbot via the configured socket URL. No per-channel assignment is needed for chat — each agent is available for chat from the moment it is configured.

***

## Best Practices

<AccordionGroup>
  <Accordion title="Test before going live">
    Always call your configured number from a personal phone to verify the agent responds correctly before publishing the number publicly.
  </Accordion>

  <Accordion title="Monitor call quality after deployment">
    After deployment, check **Monitor > Calls** regularly for dropped calls, poor transcription, or unexpected agent behavior.
  </Accordion>

  <Accordion title="Use dedicated numbers per use case">
    Separating sales from support at the phone number level makes analytics cleaner and allows you to assign specialized agents to each function.
  </Accordion>
</AccordionGroup>
