Prostir

Article

How to create AI agent for Telegram

Step-by-step article: how to create an AI agent in Telegram from Windows. You create a Telegram bot in BotFather, copy the bot token, create the agent in Prostir, open Channels, choose Telegram, paste the token, press Save, publish, and test the agent from Telegram.

01

What you need before you start

  • A Windows computer with a browser and either Telegram Desktop or Telegram Web.
  • 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.
02

How to create the AI agent in Telegram

You need a Windows browser, Telegram Desktop or Telegram Web, and your Prostir workspace.

  1. 01
    Open Telegram on Windows.

    Use Telegram Desktop from the official Telegram site or Telegram Web. 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 on Windows, 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
    Paste the token and press Save in Prostir.

    Open the agent's Channels tab, choose Telegram, paste the BotFather token, add the bot username without @, press Save. Prostir registers the Telegram webhook on the agent's HTTPS public surface.

  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.

data BotFather token The secret credential for the Telegram Bot API. Paste it only into Prostir.
doc agent instructions What the agent should answer, what it must refuse, and when it should ask for a human.
doc knowledge or tools FAQs, docs, CRM/MCP tools, order lookup, booking, or support workflows the Telegram agent can use.
04

Final Prostir step: token, username, Save

Windows, browser, BotFather token, Save.

Prostir Studio

I created @YourAgentBot with BotFather on Windows 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, choose Telegram, paste the BotFather token, enter YourAgentBot as the bot username, and press Save.

Prostir

Telegram channel saved. Webhook registered for the published agent. Channel enabled.

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.

Ready to launch?

One afternoon from idea to live link.

Upload what only you have. Write the rules in plain language. Open the link in ChatGPT, Claude, or your site. Ship the agent only you could ship.

Need custom scale, white-label, or dedicated setup? Talk to sales.