Skip to content
KEIKI

Telegram agents

Setup guide

How to connect an AI agent to Telegram

Create the bot with @BotFather, copy the token it gives you, then paste that token into Keiki on the Channels page and attach it to an agent. Keiki confirms which bot the token belongs to and takes over the webhook, so there is no server for you to run and nothing to deploy.

Takes about 10 minutesUpdated

Before you start

What you need before you start.

  • A Keiki account, which is free to create
  • A Telegram account, so you can talk to @BotFather
  • A bot token in the shape 123456789:ABCdef… from @BotFather
  • No server, no hosting bill, and no webhook of your own to keep alive

Step by step

Six steps from @BotFather to a bot that answers.

  1. Step 1

    Create a Keiki account

    Sign up at onkeiki.com. The account is free, and a Telegram bot costs nothing to run: there is no phone number to buy on this channel.

  2. Step 2

    Create the bot with @BotFather

    Open @BotFather in Telegram, send /newbot, and give it a display name and a username ending in "bot". BotFather replies with an HTTP API token like 123456789:ABCdef… — that token is the whole credential, so treat it like a password.

  3. Step 3

    Start from a template instead of a blank agent

    Open the Event Companion template in Keiki. It arrives knowing how to answer the same six questions a group asks all week — schedule, location, timing, what changed — without turning into a broadcast channel.

  4. Step 4

    Paste the bot token into Keiki

    On the Channels page, add a Telegram bot and paste the token. Keiki checks it live and shows you which bot it belongs to, so a typo is caught before anything is saved. Attach the agent in the same dialog, or leave it unattached and do it later.

  5. Step 5

    Message the bot, then add it to a group

    Start a direct chat with the bot and ask it something real. Then add it to a group and mention it: in a busy group the agent answers when it is addressed and stays quiet the rest of the time, which is what keeps it from being muted.

More on what your Telegram agent does

Questions

Questions people ask while connecting an agent to Telegram.

Do I need to host a server to connect an AI agent to Telegram?
No. Keiki holds the bot token and owns the webhook, so the agent runs without any infrastructure from you. There is nothing to deploy, nothing to keep awake and no hosting bill for the bot itself.
Where do I get the Telegram bot token?
From @BotFather inside Telegram. Send /newbot, pick a display name and a username ending in "bot", and BotFather replies with a token in the shape 123456789:ABCdef…. That is the only credential Keiki needs.
Can the agent work in a Telegram group?
Yes. Add the bot to the group and mention it when you want an answer. It replies when addressed, keeps answers short in a busy group, and does not narrate every message that goes past.
Can one bot serve several agents?
A bot token belongs to one agent at a time, which keeps the persona coherent. Run a second bot from @BotFather if you want a second agent — creating and connecting another one takes a couple of minutes.
What if I paste the wrong token?
Keiki validates the token as you type and shows the bot it resolves to, so a mistyped or revoked token is obvious before you save. Replace it in the same dialog and the agent keeps its history.
Can a person take over a Telegram conversation?
Yes. Any thread can be handed to a human, who sees the full conversation and everything the agent already committed to, so nobody has to ask the person to repeat themselves.

Ten minutes, one token, no server.

Create the bot, paste the token, open the template. The group gets the same good answer at 2am as it does at noon.