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

# Channel Route Config • AI Agent SDK

> ChannelRouteConfig: Configuration for routing channel messages to agents.

# ChannelRouteConfig

> Defined in the [**config**](../modules/config) module.

<Badge color="blue">AI Agent</Badge>

Configuration for routing channel messages to agents.

Attributes:
channel\_type: Platform name (telegram, discord, slack, etc.)
token\_env: Environment variable name for the channel token
app\_token\_env: Optional env var for app token (Slack Socket Mode)
routes: Mapping of context → agent\_id
Keys: "dm", "group", "channel", "default"
Values: agent ID strings
enabled: Whether this channel is enabled
metadata: Additional channel-specific configuration

## Properties

<ResponseField name="channel_type" type="str">
  No description available.
</ResponseField>

<ResponseField name="token_env" type="str">
  No description available.
</ResponseField>

<ResponseField name="app_token_env" type="Optional[str]">
  No description available.
</ResponseField>

<ResponseField name="routes" type="Dict[str, str]">
  No description available.
</ResponseField>

<ResponseField name="enabled" type="bool">
  No description available.
</ResponseField>

<ResponseField name="metadata" type="Dict[str, Any]">
  No description available.
</ResponseField>

## Methods

<CardGroup cols={2}>
  <Card title="get_agent_id()" icon="function" href="../functions/ChannelRouteConfig-get_agent_id">
    Resolve agent ID for a given message context.
  </Card>
</CardGroup>

<Accordion title="Internal & Generic Methods">
  * **from\_dict**: Create from dictionary.
  * **to\_dict**: Convert to dictionary.
</Accordion>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/config.py#L929">
  `praisonaiagents/gateway/config.py` at line 929
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Configuration Overview" icon="gear" href="/docs/docs/configuration/index" />

  <Card title="Agent Config" icon="robot" href="/docs/docs/configuration/agent-config" />
</CardGroup>
