---
app: agent
audience:
  - owner
since: 0.1.2
ui_only: true
agent_actions:
  - tool: app_channel_status
    permission: auto
    example: is Ani's Telegram bot connected?
  - tool: app_channel_access
    permission: confirm
    example: make Ani's Telegram private, only my user id
agent_examples:
  - give the finance agent a Telegram bot
  - why does my Telegram bot say conflict?
llm_weight: normal
title: Telegram
description: One bot per agent, created with @BotFather — no public address
  needed, works from any computer.
editUrl: true
head: []
template: doc
sidebar:
  order: 5
  hidden: false
  attrs: {}
pagefind: true
draft: false
---

import { Steps, Aside } from "@astrojs/starlight/components";
import { AgentAsk, UiOnly } from "@components";

**Who this is for:** an owner who wants to reach an agent (or let staff reach it) on Telegram.

Telegram is the easiest channel: the bot polls Telegram from your computer, so nothing has to be reachable from the internet. It is a good fit for staff-facing agents — the HR agent, the bookkeeper, your own assistant.

<UiOnly />

## Steps

<Steps>

1. In Telegram, open **@BotFather**, send `/newbot`, give the bot a name and a username. BotFather answers with a **token** (`123456789:AA…`).

2. In Bakulai Agent open **Settings → Accounts**, press **+** beside **Telegram**, pick the agent, paste the token into **Telegram bot token**.

3. Choose **Who can chat**: **Private — listed ids only** (paste your numeric Telegram user id — get it from @userinfobot) or **Public — anyone**.

4. Press **Save**. The agent's gateway restarts and the row shows **connected**. Press **Test connection** at the top of the selected account's pane if you want proof.

5. Open the bot in Telegram, press **Start**, and say hello.

</Steps>

<Aside type="note" title="One bot, one agent">
  Telegram allows one reader per bot token. The app refuses a token that another agent already uses; a second agent needs its own bot from BotFather.
</Aside>

## Groups (optional)

The bot answers direct messages by default. To also have it work inside a Telegram group (staff and several agents' bots in one place):

<Steps>

1. In BotFather open your bot → **/setprivacy** → **Disable** (or make the bot a group admin later), so the bot can read group messages.

2. In **Settings → Accounts → Telegram**, open the agent's bot and fill **Group ID (optional)**: add this bot and **@userinfobot** to the group — @userinfobot posts the group's ID (it starts with `-100`). Paste it here, then remove @userinfobot from the group.

3. Keep **In the group, the bot answers: only when @mentioned or replied to** (the default). With several bots in one group this stops them from answering the same message twice.

4. Press **Save** — the gateway restarts with the group pinned.

</Steps>

Inside the group: plain chatter stays unanswered, `@botname …` wakes exactly that bot, and replying to one of its messages wakes it too. The same user allow-list decides whose messages count. Leaving the **Group ID** empty (or clearing it) returns the bot to direct messages only.

## Ask your agent

<AgentAsk />

## Limits & safety

- A **Private** bot without any listed id answers nobody; the app blocks saving until you fill the list.
- The bot can also sit in a group; the same allow-list decides whose messages it answers.
- The token is stored in the agent's own profile on this computer; **Unlink** removes it. Revoke it in BotFather too if a device is lost.

## Troubleshooting

- **"terminated by other getUpdates request" / 409** — the same token runs somewhere else (another agent, another computer, an old test). Stop the other reader or create a new bot.
- **The bot never answers me** — your user id is not on the Private list, or the agent is asleep (its row shows **paused**). Wake it from its desk.
- **Answers arrive but with no ERP data** — the agent's role has no tools for that question; see [Roles by room](/agent/roles/roles-by-room/).

## Related

[Who can chat](/agent/channels/who-can-chat/) · [Channels overview](/agent/channels/overview/) · [Escalations](/agent/automations/always-on/)