matsurimw3 downloadsCapture Telegram messages into your daily note, and chat with a bot that has read your recent notes. It keeps a profile note about you and works with the model you choose.
中文说明 · Getting started guide (Chinese)
A Telegram bot for your Obsidian vault that does two things. Everything you send it lands in today's daily note, and when you want to talk, it answers as a friend who has read your recent notes. It keeps a small profile note about you that grows over time, and you choose which model sits behind it: Claude Code CLI, the Anthropic API, or any OpenAI-compatible endpoint, including a local Ollama.
It is a modified version of the community plugin Telegram Inbox, which saves messages sent to your own Telegram bot into your daily note. This version adds a character on the other end of the inbox who has read your notes. It can see what you are doing today, what you have been busy with all week and what you plan to do next. So when you say "I'm exhausted" it does not answer with a generic "hang in there", and when you say "done!" it knows what you finished.
The settings and the bot's built-in messages are in Chinese. The language of the model's replies is a setting.
| Your situation | What it does |
|---|---|
| An idea arrives and only your phone is at hand | Send it to the bot in Telegram. Text, photos and links go straight into today's daily note |
| You want to talk, but an AI chat needs you to explain what you have been doing first | It reads the last week of your daily notes before answering |
| AI chats repeat themselves after a while | It remembers what it said recently and does not bring the same thing up again |
| Every AI has the same customer-service voice | The default persona is warm and on your side. You can write a note that makes it play someone else, and teach it your own catchphrases |
| It forgets what you told it last time | After a chat it writes new facts into a profile note, and rewrites the recent part every week. Long-term traits are only added after you approve them |
| You want to know what you did today | Say "睡了" (going to sleep) and it replies with a summary: what got done, what to start with tomorrow |
| You do not want to be tied to one model provider | Switch between Claude Code CLI, the Anthropic API and OpenAI-compatible endpoints at any time. With a local Ollama, your notes never leave your computer |
Left: chat mode. Right: used together with Nautilus Spiral, it sends today's schedule to your phone.
Desktop only. The bot runs inside Obsidian on your computer, so Obsidian has to be open for it to answer. Messages sent while the computer was asleep are picked up when it wakes.
main.js, manifest.json and styles.css from the latest release into <your vault>/.obsidian/plugins/telegram-companion/, then enable the plugin under Settings → Community plugins.@BotFather, send /newbot, and copy the token it gives you.@) or numeric ID into the allowlist field (labelled 白名单). Only people on that list are answered. The status at the top right shows the bot's name once it is connected./chat to start talking and /record to go back to capturing. /help lists every command.Chat mode starts when you send /chat, when you send an emotional message, when you send one of your greeting catchphrases, or when you reply to one of its messages. If it started on its own, it returns to record mode after 20 minutes of silence (configurable) and tells you so.
| You send | It does | Saved to the daily note |
|---|---|---|
| Any text, photo, link or voice message | Saves it to today's daily note, timed by when the message was sent | Yes |
/chat, /record |
Enters or leaves chat mode | No |
/summary |
Summarises today without ending the day | No |
/mode |
Says which mode it is in | No |
/model |
Shows the current model, with buttons to switch | No |
/persona |
Shows the current persona, with buttons to switch | No |
/me |
Shows what it currently knows about you | No |
/profile |
Re-reads this week's notes and updates the profile | Updates the profile note |
/task text |
Adds a to-do | Yes |
/help |
Lists the commands | No |
Most commands also have a Chinese phrase (for example "对话模式" for /chat, "睡了" to end the day and get the summary). The full list is in the Chinese README.
Tasks in your daily note can be Markdown checkboxes (- [ ], - [/], - [x]) or keywords (- TODO, - DOING, - DONE). It reads both.
/persona.Rules that hold whatever the persona or profile says: it responds only to your own affairs and does not apply other people's words quoted in your notes to you; it brings up self-harm resources only when you explicitly say you want to hurt yourself in the current conversation; and when the model cannot be reached, it says so right away.
Chat replies, summaries and profile updates call a large language model. Choose one backend in the settings:
| Backend | What you need | Good for |
|---|---|---|
| Claude Code CLI | Claude Code installed and logged in on this computer; no key | People with a Claude subscription |
| Anthropic API | An API key and a model name | Paying per use for Claude |
| OpenAI-compatible endpoint | A base URL, a key and a model name. DeepSeek, OpenAI, OpenRouter and a local Ollama all work | Other providers, or keeping data on your computer with Ollama |
You can fill in all three and switch at any time, in the settings or by sending /model in Telegram.
Fallback backend. Pick a second backend under 备用后端 and the bot keeps answering when the first one fails, for example when a subscription's usage limit is reached, a request times out, or a login expires. The failed request is retried once on the fallback, and the reply ends with a line saying which model answered and why the first one did not. For the next 10 minutes requests go straight to the fallback, then the first backend is tried again.
Where your data goes. For each reply the plugin sends your profile note, the persona note and a digest of the last week of daily notes (task lines and top-level items, no attachments) to the model service you chose (or to the fallback backend, when one is set and it answered), and to no one else. API keys are stored in the plugin's own data.json. If your vault is synced to a public place, exclude that file.
The plugin works on its own. Together with Nautilus Spiral, a plugin by the same author that draws today's events and to-dos as a spiral schedule, it does more:
? to get today's spiral and what is next.done 写稿 2h and doing 写稿 update the matching task in today's note (this one also needs the done-to-top plugin).Without these plugins the phrases above are saved like any other message, and everything else works the same.
api.telegram.org): receives the messages you send to the bot, sends replies, and downloads photos and files from messages.api.anthropic.com for the Anthropic API, or the base URL you entered for an OpenAI-compatible endpoint. With a local Ollama nothing leaves your computer. If a fallback backend is set, the same content goes to that service instead when the first backend fails.claude program installed on your computer to generate replies, using that program's own login. Other backends start no programs.It is not therapy and does not replace the people around you.
Based on the community plugin Telegram Inbox by icealtria. The original inbox, media download and message templates are kept. This version adds the two modes, the companion, personas, catchphrases, the profile note and the switchable model backends. The source changes are in this repository's commit history. The original is released under GPL-3.0, and so is this version: GPL-3.0.