Skip to content

Welcome to tg-note Documentation

**Intelligent Knowledge Base Builder** Telegram bot that automatically transforms your messages, reposts, and articles into a structured knowledge base using AI agents. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Python 3.11-3.12](https://img.shields.io/badge/python-3.11--3.12-blue.svg)](https://www.python.org/downloads/) [Get Started](getting-started/quick-start.md){ .md-button .md-button--primary } [View on GitHub](https://github.com/ArtyomZemlyak/tg-note){ .md-button }

What is tg-note?

tg-note is a Telegram bot that acts as your personal knowledge curator. It receives messages, reposts, and articles through Telegram, analyzes them using AI agent systems, and automatically saves the important information to your GitHub-based knowledge base in structured Markdown format.

Perfect for:

  • ๐Ÿ“š Building a personal knowledge base from Telegram channels
  • ๐Ÿ”ฌ Organizing research papers and scientific articles
  • ๐Ÿ“ฐ Archiving news and insights from multiple sources
  • ๐Ÿง  Creating a searchable second brain

Key Features

  • ๐Ÿค– AI-Powered Analysis


    Intelligent content categorization and structuring using advanced agent systems

  • ๐Ÿ“ Automatic Markdown


    Converts any content into well-formatted Markdown files with proper structure

  • ๐Ÿ“ Smart Organization


    Automatic categorization by topics (AI, biology, physics, tech, etc.)

  • GitHub Integration


    Direct commits to your knowledge base repository with version control

  • ๐Ÿ‘ฅ Multi-User Support


    Each user can have their own personal knowledge base

  • โš™ Flexible Configuration


    Configure bot settings directly via Telegram commands

  • :search:{ .lg .middle } Vector Search


    Semantic search through your knowledge base using AI embeddings

  • ๐Ÿ”’ Secure Credentials


    Personal encrypted Git tokens for each user via Telegram


Quick Start

Get started with tg-note in just a few minutes:

git clone https://github.com/ArtyomZemlyak/tg-note.git
cd tg-note
poetry install
# Copy configuration files
cp config.example.yaml config.yaml

# Add your Telegram bot token to .env
echo "TELEGRAM_BOT_TOKEN=your_token_here" > .env
# Recommended: Use the console script
poetry run tg-note

# Or directly with Python
poetry run python main.py

Full Installation Guide โ†’


Agent Types

Choose the right agent for your needs:

Uses Qwen Code CLI for advanced AI processing.

  • โœ… Full integration with Qwen3-Coder models
  • โœ… Automatic TODO planning
  • โœ… Built-in tools: web search, git, github, shell
  • โœ… Free tier: 2000 requests/day

Learn More โ†’

Autonomous Agent

Python-based agent with OpenAI-compatible API support.

  • โœ… OpenAI-compatible API integration
  • โœ… Autonomous planning and decision-making
  • โœ… Function calling support
  • โœ… Works with various LLM providers

Learn More โ†’

Stub Agent

Simple stub agent for testing and MVP.

  • โšก Fast and lightweight
  • ๐Ÿ”ง No external dependencies
  • ๐Ÿงช Perfect for testing

Learn More โ†’


Architecture Overview

graph TD
    A[Telegram Bot] --> B[Message Processor]
    B --> C[Agent System]
    C --> D[Knowledge Base Manager]
    D --> E[Git Operations]

    style A fill:#e1f5ff
    style C fill:#fff3e0
    style D fill:#f3e5f5
    style E fill:#e8f5e9

Detailed Architecture โ†’


New Features

  • :search:{ .lg .middle } Vector Search


    Semantic search through your knowledge base using AI embeddings. Find relevant content by meaning, not just keywords.

    Learn More

  • ๐Ÿ”’ Secure Git Credentials


    Each user can securely add their personal GitHub/GitLab tokens directly through Telegram with encryption.

    Setup Guide

  • Docker Vector Search


    Complete Docker setup with Qdrant vector database and Infinity embeddings service.

    Quick Start


Documentation Sections


Community & Support


License

This project is licensed under the MIT License - see the LICENSE file for details.


**Built with โค๏ธ by [Artem Zemliak](https://github.com/ArtyomZemlyak)** โญ Star this repository if you find it helpful!