{"id":50799959,"url":"https://github.com/shablin/telegram-chat-automation","last_synced_at":"2026-06-12T18:34:05.856Z","repository":{"id":361624907,"uuid":"1255057016","full_name":"shablin/telegram-chat-automation","owner":"shablin","description":"Implementation of Chat Automation bot mode that allows you to delegate chats management with a bot","archived":false,"fork":false,"pushed_at":"2026-05-31T13:59:38.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-31T15:23:43.592Z","etag":null,"topics":["chat-automation","llm","ollama","secretary-bot","telegram","telegram-bot-ai-assistant","telegrambot","telegrambotapi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shablin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-31T10:52:49.000Z","updated_at":"2026-05-31T14:09:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shablin/telegram-chat-automation","commit_stats":null,"previous_names":["shablin/telegram-chat-automation"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shablin/telegram-chat-automation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shablin%2Ftelegram-chat-automation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shablin%2Ftelegram-chat-automation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shablin%2Ftelegram-chat-automation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shablin%2Ftelegram-chat-automation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shablin","download_url":"https://codeload.github.com/shablin/telegram-chat-automation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shablin%2Ftelegram-chat-automation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34258368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat-automation","llm","ollama","secretary-bot","telegram","telegram-bot-ai-assistant","telegrambot","telegrambotapi"],"created_at":"2026-06-12T18:34:03.780Z","updated_at":"2026-06-12T18:34:05.832Z","avatar_url":"https://github.com/shablin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# telegram-chat-automation\n\nA local AI-powered Telegram Business Bot that uses Ollama and a Large Language Model (LLM)\nto automatically respond to messages through Telegram Business Connections.\n\nThe project is designed to be simple, self-hosted, extensible, and privacy-friendly.\nAll inference runs locally on your own machine without relying on external AI APIs.\n\n## Features\n\n- 🤖 Telegram [Secretary Bot](https://core.telegram.org/bots/features#secretary-bots) support (Chat Automation)\n- 🧠 Local LLM inference via Ollama\n- 📜 Custom system prompts using Markdown\n- 🐳 Docker-based deployment\n- 💬 Automatic replies in personal chats\n- ⌨️ Typing indicator while generating responses\n- 🔒 Fully self-hosted\n- 🚀 Extensible architecture for future skills and tools\n\n## How it works\n\n\u003cimg src=\"assets/UML.png\" /\u003e\n\n## Requirements\n\n- [Docker](https://docker.com) \u003e=28.1.1\n- [Docker Compose](https://docs.docker.com/compose/)\n- [Python](https://python.org) \u003e=3.11.2\n- [aiogram](https://aiogram.dev/)\n- [Ollama](https://ollama.com/)\n\n## Installation\n\n### 0. Create Telegram bot\n\nGo to [BotFather bot](https://t.me/BotFather) and follow provided instructions\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/shablin/telegram-chat-automation.git\ncd telegram-chat-automation\n```\n\n### 2. Configure environment variables\n\nCreate a `.env` file from `.env.example`:\n\n```env\nBOT_TOKEN=your_bot_token\n\nOLLAMA_URL=http://ollama:11434\nOLLAMA_MODEL=ollama_model_name\nOLLAMA_TIMEOUT=model_response_timeout\n```\n\n### 3. Start Ollama\n\n```bash\ndocker compose up -d ollama\n```\n\n### 4. Download a model\n\nExample:\n\n```bash\ndocker exec -it ollama_sevice ollama pull qwen2.5:7b\n```\n\nVerify:\n\n```bash\ndocker exec -it ollama_sevice ollama list\n```\n\n### 5. Start the bot\n\n```bash\ndocker compose up -d --build\n```\n\n## Customizing the bot\n\nThe bot behavior is defined in:\n\n```text\nbot/prompts/system.md\n```\n\n\u003e [!IMPORTANT]\n\u003e The contents of this file are injected into every conversation as the system prompt.\n\n## Supported Models\n\nAny Ollama-compatible model can be used.\n\nRecommended:\n\n- qwen2.5:3b\n- qwen2.5:7b\n- qwen3:4b\n- mistral:7b\n- deepseek-r1\n\nYou can change the model in `.env`:\n\n```env\nOLLAMA_MODEL=qwen2.5:7b\n```\n\n## Development\n\nView logs:\n\n```bash\ndocker compose logs -f bot\n```\n\nCheck Ollama:\n\n```bash\ndocker compose logs -f ollama\n```\n\nOpen a shell inside the bot container:\n\n```bash\ndocker exec -it telegram_bot sh\n```\n\nOpen a shell inside the Ollama container:\n\n```bash\ndocker exec -it ollama_sevice sh\n```\n\n## Roadmap\n\n- [ ] Conversation memory\n- [ ] Skill system\n- [ ] Tool calling\n- [ ] Streaming responses\n- [ ] Multi-model routing\n- [ ] Vector search (RAG)\n- [ ] User profiles\n- [ ] Conversation analytics\n- [ ] Plugin system\n\n## Security\n\nThis project executes all AI inference locally.\nNo messages are sent to third-party AI providers unless you explicitly modify the source code.\nAlways review prompts, tools, and future integrations before deploying the agent in production environments.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshablin%2Ftelegram-chat-automation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshablin%2Ftelegram-chat-automation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshablin%2Ftelegram-chat-automation/lists"}