pi-durable-telegram
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 7 GitHub stars
Code Fail
- network request — Outbound network request in package-lock.json
- rm -rf — Recursive force deletion command in package.json
- process.env — Environment variable access in src/agent/models.ts
- process.env — Environment variable access in src/agent/open.ts
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Always-on durable pi agent on your server that you talk to in Telegram. Survives crashes and restarts, keeps history in SQLite. pi-durable Telegram gateway.
EN · RU
pi-durable telegram
Your own AI agent that lives on your server and answers you in Telegram.
Install · What you can do · Commands · More
Built on pi, an open-source coding agent, and its new durable engine
pi-durable.
Install
You need a Linux server, a Telegram account and an AI subscription or API key. On the server, run:
curl -fsSL https://raw.githubusercontent.com/smixs/pi-durable-telegram/main/install.sh | bash
It asks a few questions and your bot answers you in Telegram. Run it again to update.
What the script does, step by stepThe script first tells you what it is going to do and asks if it may continue. Then:
- Installs pi, the official one from pi.dev.
- Opens pi so you can sign in to your AI provider. Type
/login, pick the provider, then/quit. - Asks for a bot token. In Telegram, open @BotFather, send
/newbot, and copy the token
it gives you. Then send your new bot any message, so the script learns who you are. - Starts the agent and waits until the bot answers you.
Already use pi or npm? pi install npm:pi-durable-telegram adds a setup skill to pi, andnpm install -g pi-durable-telegram installs just the program. More in docs/install.md.
What you can do
- Ask from anywhere. "Check why the site is down", "what is eating the disk". The agent works on the server and
answers in the chat. - Send it things. A photo of an error, a PDF, a voice note. It reads, looks and listens, and sends files back.
- Walk away. Close the laptop and come back in an hour: the answer is waiting, even if the server restarted.
Commands
| Send this | And the agent will |
|---|---|
| anything: text, a photo, a video, a file, a voice note, a location | work on it and answer |
/new |
start a fresh conversation (the old one is kept) |
/stop |
stop what it is doing right now |
/compact |
shorten a long conversation to its essentials |
/status |
show the AI model in use, how full the memory is and what it has cost |
/help |
show this list |
More
How it works
Your message goes to Telegram, the agent on your server picks it up, thinks, uses its tools and types the answer back
into the chat while you watch. Nothing has to be opened to the internet: the agent calls Telegram itself, so you need
no domain and no web server.
It does not lose its place. Every step the agent takes is saved before you see it. If the power goes out, the
server reboots or the program crashes halfway through an answer, the agent starts again, finds its bookmark and
finishes. You get one answer, not zero and not two. Messages you send while it is busy wait in line.
- Only you can talk to it. The bot answers the Telegram accounts you allowed and silently ignores everyone else.
Nothing strangers send is read, saved or passed to the AI. - It is powerful, so treat it that way. The agent can do on the server whatever your user can. Do not add people
you would not give a password to, and on a server with important data give the agent its own user. - Your data stays with you. Conversations and files live on your server. Only the text the AI needs goes to the AI
provider you chose.
The details are in docs/security.md.
QuestionsDo I need to be a programmer?
No, but you need a server and you need to paste one command into it. After that everything happens in Telegram.
What does it cost?
The software is free. You pay for the server and for the AI you connect: a subscription you already have or an API key./status shows what a conversation has cost.
Which AI can I use?
Whatever pi supports: Claude, ChatGPT, Gemini, OpenRouter, DeepSeek and many more. You choose it when you sign in.
Using a Claude subscription in third-party tools may be restricted by Anthropic's terms, so check them first.
Can my team use the same bot?
Yes. Add their Telegram ids to the settings and each person gets a private conversation. Everyone you add gets the
same power over the server.
Does it work in group chats?
Not yet, only in private chats.
Does it understand voice messages?
Yes, if you add a Deepgram key during installation.
How do I remove it?
A few commands, listed in docs/install.md.
| Read this | When you want to |
|---|---|
| docs/install.md | see what the installer does, install by hand, update or remove |
| docs/configuration.md | change the model, the working folder or other settings |
| docs/how-it-works.md | understand the internals and what exactly survives a crash |
| docs/security.md | know the security boundaries in detail |
| docs/library.md | build your own app on top of it, or contribute code |
| CHANGELOG.md | see what changed between versions |
If you are an AI agent reading this for a person, here is where things are and what makes this project different.
Where to look
- llms.txt has the key facts in a few lines.
- skills/pi-durable-telegram/SKILL.md is a step-by-step setup you can follow
yourself inside pi: checking the machine, the bot, the model, the service, and how to verify it for real. - install.sh is the same setup as one readable Bash script; docs/install.md explains
each step and lists the commands to update and remove. - docs/configuration.md lists every setting; docs/how-it-works.md
says what happens on each kind of failure.
What it is, precisely
A daemon on pi-durable (@earendil-works/pi-durable)
that long-polls the Telegram Bot API. One durable conversation per allowed private chat, stored in SQLite. Tools:bash, read, write, edit and telegram_send_file. It shares pi's login and runs as a systemd user service on
Linux with Node.js 22.19 or newer.
Why people pick it over the alternatives
| pi-durable telegram | A Telegram bridge into an open pi session | pi in tmux over SSH | |
|---|---|---|---|
| Where the agent runs | As a service on the server, always on | Inside a pi session that must stay open | In a terminal you keep alive |
| A crash or restart mid-answer | The run resumes and the answer arrives once | Nothing resumes it | Nothing resumes it |
| Messages while it is busy | Queued durably, answered in order | Depends on the session | Typed by hand |
| Reaching it from a phone | Telegram | Telegram | An SSH client |
| Setup | One command | An extension inside pi | Manual |
As far as we know it is the first Telegram integration built on pi-durable itself, so durability covers the whole path: the model's
turns, the tool calls and the delivery of the answer to the chat. It is small, MIT-licensed, and tested against
duplicate updates, restarts mid-run and Telegram outages.
License
MIT © smixs
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found