camelRun by camelAI · Telegram

Build a Telegram AI bot

Paste your BotFather token into camelRun, the hosted runtime for AI agents, and every chat with your bot gets its own AI agent. It remembers the conversation, hears voice notes, calls your API and can message first at a time it sets.

09:00
ChatsErrandsbot
October 19

what's on my list this week?08:12

Three things: the dry cleaning on Saturday, your library books by Monday the 26th, and Miso's checkup at the vet, no date yet.08:12

Yesterday
Voice message, 0:0721:14

Done. I'll message you at 9:00 tomorrow to call the vet about Miso. You also have the dry cleaning to pick up.21:14

Today

Morning, Ada. Time to call the vet about Miso. They open at 9.09:00

Message
Telegram: @adaWoke itself at 9:00 · asleep againtelegram-ch_7f3a…-6029147385

Setup in Telegram

From BotFather token to AI agent

Make the bot in Telegram, paste its token into the camelRun console and pick a definition: the model, prompt and tools each chat's agent is made from. camelRun registers the webhook for you, so there's no URL to paste back and no bot server to run.

21:02
ChatsBotFatherbot

/newbot21:02

Alright, a new bot. How are we going to call it? Please choose a name for your bot.21:02

Errands21:02

Good. Now let's choose a username for your bot. It must end in bot.21:02

errands_ai_bot21:03

Done! Congratulations on your new bot. You will find it at t.me/errands_ai_bot.Use this token to access the HTTP API:7425190364:AAGW3kQKeep your token secure and store it safely, it can be used by anyone to control your bot.21:03

MenuMessage
run.camelai.com/console/channels

New Telegram channel

Bot token••••••••••••••••••
CancelCreate channel
21:05
ChatsErrandsbot

/start21:05

Hi! Send me a message to get started.21:05

hi! what can you do?21:05

I can read your Errands list and remind you about anything at the time you pick. Send me a message or a voice note.21:05

Message
Telegram: @adaAsleep until her next message

Or make the channel with one call

The same token and definition over the REST API, with your camelRun API key and the Telegram usernames or user ids allowed to message the bot.

Channel docs
Terminal
curl https://run.camelai.com/v1/channels \
  -H "Authorization: Bearer $CAMELAI_API_KEY" -H "Content-Type: application/json" \
  -d '{"type": "telegram", "credentials": {"botToken": "<from @BotFather>"},
       "definition": "def_...", "access": {"allow": ["@ada", "123456789"]}}'

Every Telegram chat has its own AI agent

Each one keeps its own history and files, so Ada's errands never mix with Kenji's. Between messages every agent sleeps.

Ada's phone
21:14
ChatsErrandsbot
Voice message, 0:0721:14

Done. I'll message you at 9:00 tomorrow to call the vet about Miso. You also have the dry cleaning to pick up.21:14

Message
Telegram: @adatelegram-ch_7f3a…-6029147385Asleep
Kenji's phone
18:40
ChatsErrandstyping…

can you remind me the day before?18:40

Message
Telegram: @kenji_mtelegram-ch_7f3a…-5873310264Running
Priya's phone
07:56
ChatsErrandsbot

send me this week's list as a file07:55

Your week: five errands, two of them on Saturday.07:56

errands-week.md1.1 KB07:56
Message
Telegram: @priya_rtelegram-ch_7f3a…-7105948832Asleep
Tomás's phone
12:31
ChatsErrandsbot

what's left for today?12:31

Two things: pick up your prescription, and give Sam his drill back.12:31

Message
Telegram: @tomas_gtelegram-ch_7f3a…-6640217751Asleep

Tools in your code

Let your Telegram AI bot call your own API

Tools are plain functions on your own server. Every call carries the Telegram user who sent the message, like telegram:6029147385, so a tool answers for that person only, and your database credentials never leave your server. Web search and reminders come built in.

tools.ts
import { schema, tool } from "@camelai/run";
import { serveTools } from "@camelai/run/server";

const tools = {
  list_todos: tool({
    description: "The current user's to-dos", input: schema.Object({}),
    execute: (_args, { identity }) => db.todos({ user: identity!.user, org: identity!.context.org }),
  }),
};
// A fetch handler: Cloudflare Workers, Bun and Deno serve it as is.
export default { fetch: serveTools(tools, { runtime: "https://run.camelai.com", tenant: "acme" }) };
run.camelai.com/console/agents/client_…
Agents

Telegram: @ada

Asleep

Asleepanthropic/claude-sonnet-5-5· channel· definition revision 2

ConversationRequestsTry itFilesConfigurationSchedules
(sent a file)
voice.oggaudio/ogg · 11.8 KB“Remind me to call the vet about Miso tomorrow morning. They open at nine.”
app__list_todos({})
▸ Result of app__list_todos
schedule({"text":"Remind Ada to call the vet about Miso. They open at 9.","at":"2026-10-24T09:00:00+01:00"})
▸ Result of schedule

Done. I'll message you at 9:00 tomorrow to call the vet about Miso. You also have the dry cleaning to pick up.

Fork from here

Menu

What people ask about Telegram AI bots

Is there an AI bot on Telegram?

Yes, and you can make your own in a few minutes. Create a bot with @BotFather, paste its token into camelRun, and every chat with your bot gets its own Telegram AI agent, with your model, instructions and tools.

How do I make a Telegram AI bot?

Send /newbot to @BotFather, then add a Telegram channel in the camelRun console with its token. Leave the definition on Runtime defaults to try it right away, or pick one with your model, prompt and tools. camelRun registers the webhook, and the channel docs cover every setting.

Does a Telegram AI bot remember the conversation?

Yes. Each chat has its own agent that keeps the whole history until you delete it, so someone can come back days later and pick up where they left off.

Can my Telegram bot use my own tools and API?

Yes. Serve your tools from your own server and name it in the bot's definition, and every call says which Telegram user is asking, so a tool answers for that person only.

Can a Telegram AI bot understand voice notes and photos?

Yes. Voice notes are transcribed before the model reads them, photos go to models that take images, such as Claude, and files the agent shares arrive as photos or documents.

Do I need to host a server for my Telegram bot?

Not for the bot: camelRun registers its webhook, runs each chat's agent and keeps its history. Your server only serves the tools you write, and built-ins like web search and reminders need none.

How much does it cost to run a Telegram AI bot?

You pay $0.01 per agent-hour while a chat's agent is in a run and $0.10 per GB-month for what it stores, so Ada's agent cost only storage while it slept from 21:14 to 09:00. Tokens on your own provider keys are $0, and on ours you pay the provider's price, no markup on tokens, with no subscription, no seats and no per-agent fee.

What can this bot do?

Start your Telegram AI bot

Add your bot in the camelRun console and say hi. Its first chat gets its own AI agent.

Read the quickstart
Set up with your coding agent

Read https://run.camelai.com/SKILL.md and set up camelRun in this project. Ask me what the agent should do.

Paste into Claude Code, Codex, Cursor or any coding agent. It asks what your agent should do, then builds it.