Putting an AI agent in Telegram
Updated August 2026
Four ways to end up with an agent you can message like a person — building the bot yourself, wiring one up without code, connecting a session you already run, or renting one per agent. What each takes, and what bites you afterwards.
Why a chat, and why Telegram
A chat window is a good interface for an agent because it is asynchronous by nature. You ask, you leave, an answer arrives later — which is exactly the shape of work that takes ten minutes rather than ten seconds, and it is the shape a terminal handles badly.
Telegram in particular: bots are free to create, the API is plain HTTP with no review process, and a bot gets its own name, its own avatar and its own conversation. One agent in one chat reads like a colleague. Six agents in six chats read like a team, which is something a single assistant thread cannot do.
Way 1 — build the bot yourself
Message @BotFather, send /newbot, and you have a token in under a minute. From there the loop is genuinely small: read messages, do something, send a reply.
# Read waiting messages (no public URL needed)
curl "https://api.telegram.org/bot$TOKEN/getUpdates"
# Reply
curl "https://api.telegram.org/bot$TOKEN/sendMessage" \
-d chat_id=$CHAT -d text="on it"Polling like that needs nothing public and is the right way to start. The alternative, setWebhook, has Telegram push updates to an HTTPS URL you own — faster and cheaper, once you have somewhere to put it.
That is the easy half. Here is what bites:
A real turn outlives the request. A webhook handler must answer in seconds; a coding job takes minutes. So the handler has to hand the work to something else and let the reply arrive later — a queue, a worker, a way to send into a chat with no request in flight. This is the moment a bot script becomes a system, and it is where most weekend versions stall. Send a sendChatAction typing indicator while it runs, or the silence reads as broken.
Messages cap at 4096 characters. Model output frequently does not. You need chunking that splits on something sensible, and Telegram's Markdown parser will reject a message with an unbalanced backtick — which a code block split down the middle produces every time.
Then it needs a computer. A bot that answers questions is a script. A bot that builds and ships things needs a filesystem, a shell, tools installed and something that keeps running — which is the hosting problem, arriving from a different direction. And your bot process has to stay up too: on your laptop it stops when you close it.
Way 2 — no-code wiring
n8n, Make and the chatbot builders will connect a Telegram bot to a model without you writing the loop. Genuinely quick, and the right call for a support bot, a lookup over your own documents, or anything shaped like question in, answer out.
The ceiling arrives when you want it to do rather than answer. These tools pass text around; they do not give the agent a machine with your repository on it. You can bolt one on, at which point you are building Way 1 with extra steps.
Way 3 — Channels, if you already run Claude Code
Anthropic's Channels connects a Claude Code session you are already running to Telegram, Discord or iMessage. No bot to write, no server, free, official. If you have a session on your machine and you just want to reach it from the sofa, stop reading and use this.
What you are messaging is still the session on your computer, so that computer has to stay on, and the agent stops when it wants permission. Where Channels stops covers both.
Way 4 — one bot per agent, hosted
The last option is to skip the plumbing: you message a factory bot, and it hands you back a new bot — a named engineer with its own chat and its own cloud computer, Claude Code installed and signed in already.
That is what we build. Every piece above is handled: the machine is always awake, the long turn is expected rather than a problem, the chunking and the typing indicator are somebody else's bug, and there is no API key to supply because the AI comes with it. Ask for a second agent and you get a second bot with its own name, which is the part that turns out to matter — you stop managing threads and start having colleagues.
The trade is the ordinary one: you are renting a machine you cannot SSH into, and the setup is our opinion rather than yours. If you wanted a shell, Way 1 on your own server is the honest answer.
Choosing
Build it if the bot is the project, or you need it wired into systems only you can reach.
Wire it up no-code if the job is questions and answers over things you already have.
Use Channels if you already run Claude Code and your machine is on anyway.
Rent one per agent if you want the finished thing today and you would rather the plumbing were somebody else's to maintain.
The fourth option, ready in about two minutes: message our factory bot and it creates an engineer with its own name, its own chat and its own cloud machine. Claude Code is included, so there is no API key to supply. From $20 a month.
From $20 a month · cancel any time · ready in two minutes
Keep reading
- Claude Code alternatives, compared honestlySeven tools people move to and from — Codex, Cursor, Gemini CLI, OpenClaw, Aider and the rest — what each is actually good at, and the question that decides it.
- Hiring an AI engineer instead of a freelancerWhere each one wins, on the four things that decide it: what the work costs, how fast it starts, who carries the context next month, and who you can hold responsible.
- Running Claude Code in the cloudFour ways to move Claude Code off your laptop — leaving the machine on, a VPS, managed hosting, or an agent that owns its computer — and what each one really costs.