NeuroCommentT is a local Python-based Telegram control platform that combines account management, proxy handling, task scheduling, monitoring, persistent state, and AI-assisted discussion workflows in a single web interface.
This project is designed for operator-controlled local use, where one person or a small team needs to manage a working Telegram environment without juggling separate scripts, session folders, account files, proxy lists, and manual runtime actions. Instead of acting like a single-purpose bot, NeuroCommentT works as a control layer over Telegram clients, local data, task orchestration, and web-based operator tools.
In many Telegram automation setups, the operational surface becomes fragmented very quickly:
- account files live in one place;
- sessions live in another;
- proxies are managed separately;
- task execution happens through ad-hoc scripts;
- runtime state is hard to inspect;
- restarting the system can interrupt unfinished work;
- generated text and discussion actions are disconnected from quality control.
NeuroCommentT addresses that fragmentation by bringing these surfaces together into one local application. The system stores operational state, exposes a browser-based control panel, coordinates task execution, and provides structured flows for discussion-aware comment generation and campaign management.
The platform supports importing Telegram accounts from .session and JSON files, storing account metadata, and reusing accounts across scheduled operations. It can work with either per-account API credentials or shared global API settings configured through the application.
The project includes import and management flows for proxy lists, proxy assignment, and proxy validation. This allows a local operator to connect Telegram accounts to a controlled network layer from inside the same runtime.
NeuroCommentT accepts input lists for chats, channels, and invite references, stores them in local state, and uses them as part of the task and campaign surface.
The application tracks tasks, task-account relationships, execution status, failures, retries, and worker state in a local database. It is built for long-lived local runtime behavior rather than one-off script execution. On startup, the system can restore unfinished work and recover active runtime state.
The control plane is exposed through a Flask + Socket.IO web panel running locally, typically on http://127.0.0.1:5000. From there, an operator can inspect accounts, tasks, settings, and runtime activity without working directly in the database or terminal.
One of the more advanced parts of the project is its multi-step pipeline for discussion-aware text generation. The system does not treat comment generation as a flat one-shot prompt. Instead, it can:
- inspect the post and surrounding context;
- choose whether to participate at all;
- select a discussion target or reply point;
- assign a role or stance;
- assemble structured prompt context;
- generate a draft;
- apply quality and review checks before execution.
This makes the AI layer part of a larger operational workflow rather than an isolated text-generation helper.
The current codebase is centered around several major layers.
main.py is the main entrypoint. It initializes runtime directories, validates dependencies, connects the database, restores unfinished tasks, and starts the web application.
The project uses SQLAlchemy with SQLite for local persistence. The database layer stores accounts, proxies, chats, tasks, task queues, campaigns, generated comments, quality checks, worker state, and related operational metadata.
Telethon is used as the Telegram client integration layer. The telegram_manager surface acts as the operational bridge between stored local state and Telegram-side activity.
The local web interface is implemented with Flask and Flask-SocketIO. This layer provides the browser-side control panel and realtime updates for long-running operations.
The src/modules/ package contains the main workflow logic: account loading, proxy handling, schedulers, campaign planning, conversation-state analysis, discussion targeting, prompt assembly, persona and role handling, and worker execution.
- Python 3
- Flask
- Flask-SocketIO
- Telethon
- SQLAlchemy
- SQLite
- aiohttp
- PySocks / python-socks
High-level structure of the repository:
main.py— runtime bootstrap and app startupsrc/core/— database, logging, Telegram runtime integrationsrc/modules/— scheduling, campaigns, account/proxy flows, discussion logic, AI workflowssrc/web/— Flask web panel and templatesscripts/— maintenance and support scriptsdata/— local runtime data and import surfaces
This project is intended for trusted local environments. It is not designed as a public internet-facing control panel in its current form.
Startup is stateful by design. Running the application may initialize directories, sync configuration into local storage, import data, and restore unfinished runtime work. This is an operational platform, not a static demo app.
The repository includes an example config file shape through app-config.example.json. Real credentials, runtime-specific secrets, session files, databases, and local operator data should remain outside versioned public source or in ignored local files only.
- Use
python main.pyas the supported startup path. - Treat the web panel as local-only unless you add proper security hardening.
- Do not commit real sessions, account dumps, runtime databases, proxy inventories, or local config with credentials.
- Legacy DB migration scripts are kept for repository history but should not be used as the normal startup path.
NeuroCommentT is not just a bot script that sends messages or performs a single repeated action. It is closer to a local operations system for Telegram workflows, with:
- persistent runtime state;
- a browser-based control interface;
- account and proxy orchestration;
- task recovery after restart;
- structured campaign and discussion logic;
- AI-assisted drafting embedded into a broader control pipeline.
That combination makes it more comparable to a local Telegram operations panel than to a lightweight one-file automation script.
This repository contains a sanitized public copy of the project structure intended for publication. Local secrets, runtime-specific data, and publish-unsafe artifacts were removed from the shared copy before upload.