Skip to content

Chat Providers

Providers are transport channels between users and the Ash runtime. They control how messages arrive and where replies are sent.

Chat Providers In 30 Seconds

  • Provider config controls authentication and access policy
  • ash serve runs provider integrations
  • Telegram is the primary provider documented here

Quick Start (Telegram)

[telegram]
bot_token = "123456789:ABCdef..." # Required
allowed_users = ["@yourusername"] # Restrict who can use the bot
allowed_groups = ["-100123456789"] # Optional group allowlist
group_mode = "mention" # mention | always
[telegram.passive]
enabled = false # Passive group listening
response_allowed_chats = [] # Optional passive-response allowlist
response_blocked_chats = [] # Suppress passive responses in specific chats

Start runtime:

Terminal window
uv run ash serve

Configure Access

Use allowlists for production deployments:

[telegram]
allowed_users = ["@yourusername", "123456789"]
allowed_groups = ["-100123456789"]

Group behavior:

[telegram]
group_mode = "mention" # respond when mentioned
# group_mode = "always" # respond to all messages in allowed groups

Troubleshooting

Bot does not respond

Terminal window
uv run ash doctor
uv run ash logs --component providers

Common fixes:

  • invalid bot_token
  • missing allowed_users/allowed_groups entries
  • runtime not started via uv run ash serve

Group replies are missing

Check group_mode and allowlists:

[telegram]
group_mode = "mention"
allowed_groups = ["-100123456789"]

Passive mode seems inactive

Enable it explicitly:

[telegram.passive]
enabled = true
# response_allowed_chats = ["-100123456789"] # Reply only in these groups
# response_blocked_chats = ["-100999999999"] # Never reply in these groups

Reference (Advanced)

Provider runtime and integration code:

  • src/ash/providers/ - provider adapters
  • src/ash/cli/commands/serve.py - runtime entrypoint
  • provider logs via uv run ash logs --component providers