Telegram
There are two ways to chat with Kaja on Telegram:
- Cloud bot: kaja.io hosts it. Link your account and start chatting, nothing to install.
- Your own bot: you create the bot and run it on your machine with
kaja telegram, using your own models and tools.
Cloud bot
- Install Telegram and log in, on the phone or computer where you’ll open the link.
- Register or log in on kaja.io.
- Open Channels › Telegram (the Home page also shows a Connect Telegram card until you’re linked).
- Click Get Telegram link.
- Open the link within 10 minutes. The bot recognises you and starts a chat.
Your own bot
-
Create a bot with @BotFather: send
/newbotand follow the steps. -
Save its token in
secrets.toml, or enter it in the setup wizard:[telegram] bot_token = "123456789:AAH..." -
Start the bot. If the token is wrong, Kaja shows an error.
kaja telegram # with the terminal UI around it kaja --headless telegram # no terminal UI, for services and containers -
Pair your Telegram account. Kaja prints a one-time code and link. Open the link, or send the code to your bot:
/start K7Q2-M9XDKaja saves your Telegram ID in
owner_ids, so you only need to pair once.
Who can use the bot
Only the Telegram IDs in owner_ids can talk to your bot, and they can use your tools and approve shell commands. Keep it to your own ID unless you trust the others:
[telegram]
owner_ids = [123456789]
- Add someone: run
kaja telegram --pairand share the one-time code with them. Kaja adds their ID automatically and prints it in the terminal. - Remove someone: delete their ID from
owner_idsand restart the bot. - After five wrong codes, the bot ignores that person until it restarts.
Abilities
Both bots use abilities the same way: the chat’s persona lists which ones the model gets. Where they run, and where their keys come from, differs:
| Â | Cloud bot | Your own bot |
|---|---|---|
| Runs on | a sandbox, never your computer | your machine |
| Available | the cloud marketplace subset: no skills with scripts, and no local-only personas or computer tools | everything, including your own abilities |
| API keys | kaja.io provides them, nothing to set up | secrets.toml [abilities.<name>] api_key, or kaja doctor |
| After a change | the next message, within the hour for marketplace updates | restart the bot |
Calls that could change something wait for your Approve or Decline button. Approve for this chat stops asking about that tool until you start a new conversation (on your own bot, until it restarts). If you write a message instead of tapping, the call is skipped and Kaja reads your message.
When Kaja asks a question with a few likely answers, they come as buttons under it. Tap one to answer, or just write your own answer. A tapped question is marked with your pick, and tapping an old one again says it was already answered.
Never send an API key to your bot: Telegram keeps the message history. Put it in secrets.toml instead.
Chatting
- Both bots answer in a private chat only. Added to a group, they stay quiet.
- Kaja works on one message at a time. Send another while it’s busy and it says it’s still working, so wait for the answer.
- Send a photo with a caption to ask about it. An album of photos goes in as one message.
- The cloud bot uses your account’s memory: the notes and dataset answers are the ones the terminal’s cloud chat reads and writes too. Conversations stay separate. On your own bot, each paired Telegram user has their own notes and answers.
Commands
/newstarts a new conversation./compactshortens the conversation. Add what to keep, for example/compact keep the dates. This also happens automatically./abilities(your own bot only) shows the abilities each persona uses.
Next: