Skip to content
Ragon
Star
Apps
On this page

Telegram

Topics. If you turn on topics for your bot in @BotFather's settings for it, each topic is its own chat: /new makes one, a topic you create starts one, and it is named after your first message in it. Two topics can answer at once. Outside topics the chat works as before.

Rich answers (tables, headings, lists) are off until they have been checked on real clients; turn them on with telegram_rich = true under [chat] in ~/.config/dreamference/config.toml. Approvals show a green and a red button, and stay in the chat with their outcome. Stopping an answer keeps what was written, marked "(stopped)".

Ragon's app inside Telegram (optional). The bot's menu button, and /app, can open Ragon's own web page full-screen inside Telegram. The page is loaded by your phone straight from your machine over your own network, so what you type in it never passes through Telegram's servers; Telegram only learns that you opened it, and its address. It needs your phone on the same private network as the machine with an HTTPS name, for example Tailscale:

tailscale serve --bg --https=8443 http://127.0.0.1:3100   # ragon web over HTTPS on your tailnet

(Port 8443, because the Matrix homeserver, if you use it, has 443.)

Then set the address under [chat] in ~/.config/dreamference/config.toml and restart:

[chat]
telegram_mini_app_url = "https://<your machine>.<your tailnet>.ts.net:8443/"

ragon web start and ragon chat start restart both with it. The page asks you to pair it like any other device (ragon web pair on the machine), and it starts only when Telegram vouches that it was opened from your bot by a paired account. Remove the line to take the button away. It works in Telegram's phone and desktop apps, not in web.telegram.org, which would have to frame the page.

Work on a repository from your phone

With the app above, a Telegram chat can do real work on a repository from your node's own Git server (Forgejo; private repositories included), as the desktop app's Work view does. Nothing outside that server is reachable: no other Git host and no folder on the machine.

  • Pairing. The first time the app opens on a new phone, it shows a six-digit code and the bot asks you, in the chat, to Approve or Decline "a Mini App on a new device". Approve and the phone is paired (as a telegram-app device; ragon web revoke removes it). Typing ragon web pair on the machine still works.
  • Pick a repository in the app's Repos view, then talk to the agent there. It works in a checkout of its own on a branch named phone/<thread>; your own working folder is never touched. The git bar shows the diff and offers Commit, Push, Update, Merge and a pull request; every write asks for a fresh confirmation, and pushes are checked first for things that must not be published. Working on main directly is off unless the repository is allowed to.
  • Approvals appear in a "Waiting for you" strip when you open the app from a notice, and are answered there, once. An unanswered one is declined after ten minutes.
  • What the bot says. In a repository's topic the bot sends only short fixed notices, such as "Turn finished in <repo>: 3 files changed." or "Approval waiting in <repo>.", each with an Open button. It never sends code, file names, commands or the model's words, so none of that reaches Telegram's servers; everything else stays inside the app, which your phone loads straight from your machine. Text you type to the bot in a repository's topic is refused: type it in the app.
  • Full Access is off for phone chats. To allow it, run ragon chat repos full-access on at the machine's own terminal and type yes. Even then, each chat asks you to type FULL ACCESS <repo> in the app; it lasts until you go back to Workspace, ends when ragon web restarts, and is never offered by the bot. It is refused while /airgapped is on. Turn the setting off with ragon chat repos full-access off.
  • Limits. A Work turn stops after 30 minutes, 200 tool calls or a 10-minute command, and a chat has a daily model budget; the bot tells you at 80%. Under [chat_repos] in ~/.config/dreamference/config.toml, enabled turns repository work off (default: on when the node's Git server answers) and bridges lists the messengers allowed to use it.

Telegram is the less private choice. Everything you send the bot, and every answer, passes through Telegram's servers unencrypted. Answers can include what the agent reads for you, such as mail, files and code. Setup shows this warning and asks you to type yes.

ragon chat telegram setup     # the warning, then the bot token from @BotFather (typed, not echoed)
ragon chat telegram pair      # an 8-digit code to send the bot as /pair <code>
ragon chat start

Naming the bot in @BotFather. Telegram bots are yours: you make one, so there is no shared name to look up. In a chat with @BotFather:

  1. /newbot. When it asks for a name, give the display name, Ragon. It is shown in the chat and can be changed any time with /setname.
  2. When it asks for a username, give one that ends in bot and is not taken, for example ragon_node_bot (or ragon_dgx_bot, ragon_dreamference_bot). Telegram tells you at once if it is taken. A username cannot be changed later.
  3. /setdescription for the text shown on an empty chat (for example "Ragon, your private coding assistant. Send /pair with the code from your machine."), and /setabouttext for the short line on the bot's profile (for example "Ragon by Dreamference. Frontier AI on hardware you own.").
  4. Keep the token it prints; ragon chat telegram setup asks for it.

ragon chat telegram users lists the paired accounts, and ragon chat telegram remove <id> removes one. ragon chat telegram off deletes the token and the pairings; revoke the token in @BotFather (/revoke) as well. ragon chat stop stops the bridge for every messenger, and it stays off until ragon chat start.