Loading repository data…
Loading repository data…
DeepPythonist / repository
An advanced Telegram AI Userbot powered by OpenAI & Telethon. Features human-like identities, deep context awareness, and strict privacy
Your intelligent, human-like Telegram Userbot powered by LLMs.
Seamlessly integrated, context-aware, and strictly secure.
TeleAgent is a powerful Userbot that connects your Telegram account to OpenAI (or compatible APIs). It acts on your behalf, allowing you to reply to messages using AI with deep context awareness, while maintaining your personal style and privacy.
!ask command is instantly deleted.!ask Roast him -> The AI roasts the target.!ask I disagree -> The AI writes a full argument based on your stance.!ask (no text) to let the AI join the conversation naturally.OWNER_ID.Clone the repo and enter the directory:
git clone https://github.com/DeepPythonist/TeleAgent.git
cd TeleAgent
Create your configuration file:
.env.example to .env..env and fill in your details:
API_ID=123456
API_HASH=abcdef123456...
OPENAI_API_KEY=sk-proj-...
OPENAI_API_BASE=https://api.openai.com/v1 # (Optional) Custom API URL
MODEL_NAME=gpt-4o # (Optional) Model name
SESSION_NAME=teleagent # (Optional) Telethon session name
OWNER_ID=123456789 # (Optional) Restrict commands to your ID
We provided a magic launcher that handles everything (Virtual Environment, Dependencies, Updates):
python launcher.py
On the first run, you will be asked to log in with your Telegram phone number.
| Command | Description |
|---|---|
!ask | (Reply to a message) The AI reads the history and writes a natural reply for you. |
!ask <text> | (Reply to a message) The AI uses your text as an instruction or draft to write the reply. |
!help | Shows the help menu in saved messages. |
| Variable | Description |
|---|---|
API_ID / API_HASH | Get these from my.telegram.org. |
OPENAI_API_KEY | Your API key from OpenAI or a compatible provider. |
OPENAI_API_BASE | (Optional) URL for custom API providers (e.g., AvalAI). |
MODEL_NAME | (Optional) Model to use (e.g., gpt-4o, gpt-3.5-turbo). |
SESSION_NAME | (Optional) Name of the session file (default: teleagent_session). |
OWNER_ID | (Optional) Restrict commands to this specific User ID. |