Prostir

Practical guide

How to create AI agent for Telegram

Step-by-step guide: create and publish the Agent, choose its explicit channel runtime model, turn on the agent-level Channels switch, then save the BotFather token and username. A hosted channel model also needs positive Model Usage Credits before Telegram can be enabled and tested.

01

What you need before you start

  • A browser for Prostir and the official Telegram app on any device where you can open @BotFather.
  • A Telegram account that should own the bot you are creating.
  • A Prostir workspace where you can create the AI agent and connect the Telegram channel.
  • A published Agent with an explicit channel runtime model, the agent-level Channels switch on, and positive Model Usage Credits when you choose a Prostir-hosted model. A saved BYOK provider connection is the alternative.
02

How to create the AI agent in Telegram

You need a browser for Prostir, the Telegram app, and your Prostir workspace.

  1. 01
    Open Telegram.

    Use the official Telegram app on desktop or mobile. Sign in to the Telegram account that should own the bot.

  2. 02
    Find the real BotFather.

    In Telegram search, type BotFather and open @BotFather. This is Telegram's official bot for creating and managing bots.

  3. 03
    Create the Telegram bot with BotFather.

    Send /newbot. BotFather asks for a display name first, then a username. The username must end in bot, for example your_agent_bot or YourAgentBot.

  4. 04
    Copy the bot token.

    BotFather returns a token that looks like 123456:ABC... Treat it like a password: do not paste it into public docs, tickets, screenshots, or chats. If it is lost or leaked, use /token in BotFather to generate a new one.

  5. 05
    Create the agent in Prostir.

    Open Prostir in your browser, create an agent, write what it should do, add the knowledge or tools it needs, select the model, and publish when the agent is ready.

  6. 06
    Set the channel runtime, then save Telegram.

    In Channels, select the Agent's explicit channel runtime model first: a saved BYOK connection or a Prostir-hosted model with positive Model Usage Credits. Turn on the agent-level Channels switch, choose Telegram, paste the BotFather token and username without @, then press Save. Prostir registers the webhook and enables Telegram only when publication, model, switch, credentials, and credit checks pass; otherwise the channel stays disabled with a visible error.

  7. 07
    Test from Telegram.

    Open https://t.me/your_agent_bot, press Start, send a real question, and watch the conversation appear in Prostir. If the answer needs you, jump in from Channels as a human.

03

What you prepare before pressing Save

The setup is simple because the hard parts have a clear owner.

dataBotFather tokenThe secret credential for the Telegram Bot API. Paste it only into Prostir.
docagent instructionsWhat the agent should answer, what it must refuse, and when it should ask for a human.
docknowledge or toolsFAQs, docs, CRM/MCP tools, order lookup, booking, or support workflows the Telegram agent can use.
04

Final Prostir step: token, username, Save

Browser, Telegram app, BotFather token, Save.

Prostir Studio

I created @YourAgentBot with BotFather in Telegram and copied the token. I want it connected to my support agent.

Create or open the agent in Prostir. Add the support instructions and knowledge first so the Telegram channel has something real to answer from.

The agent is ready. Where do I put the Telegram key?

Open Channels, select the explicit channel runtime model, confirm positive credits if it is hosted, and turn on the Agent's Channels switch. Then choose Telegram, paste the BotFather token, enter YourAgentBot as the bot username, and press Save.

Prostir

Telegram settings saved. The webhook is registered and the channel is enabled only after the published-Agent, channel-model, Channels-switch, credential, and hosted-credit checks pass; otherwise it remains disabled with a visible error.

Live

Telegram connected · https://t.me/your_agent_bot · Conversations visible in Channels

05

Test the AI agent in Telegram

  • A user presses Start in Telegram, asks a question, and the published Prostir agent answers from its instructions, knowledge, tools, and selected model.
  • You do not configure setWebhook yourself: Prostir uses the agent's HTTPS public surface and validates Telegram callback secrets on the runtime edge.
  • If the token leaks, rotate it in BotFather, paste the new token into the Telegram channel in Prostir, press Save again, and continue.

What gets published

By the end, you have a published Prostir AI agent available at https://t.me/your_agent_bot. Telegram sends messages to Prostir through the registered HTTPS webhook, and the agent answers from its instructions, knowledge, tools, and model.

Solutions

Multichannel AI agent with one controlled identity

Configure one published Agent with an explicit channel model, then connect only the channels whose credentials, policies, and customer identity rules you can support.

Solutions

Pick the channels that matter first

Tell us where customers ask, how they identify themselves, and what the Agent should handle. We will map supported channels and the setup each one requires.