Sovereign is a self-hosted agentic Telegram client. It reads your chats, searches messages, sends replies, and runs autonomous tasks — all through a clean chat interface you control.
A complete toolkit for managing your Telegram through AI — from reading messages to running autonomous background tasks.
A familiar chat UI where you talk to an AI agent that has full access to your Telegram account. Ask it anything about your chats.
Three permission levels — read-only, read-write, and full autonomy. You decide how much power the agent has, and you can change it anytime.
Your data never leaves your infrastructure. Run it on your own server with Docker Compose. No third-party access to your messages.
Schedule long-running tasks and CRON jobs that execute autonomously in the cloud. Summarize daily chats, monitor channels, auto-reply — hands-free.
Powered by GPT-4o with a tool-calling loop. The agent reasons, picks the right tool, executes it, and iterates until your request is fulfilled.
Multiple chat threads with full history persistence. Pick up where you left off, or start a new conversation for a different task.
The agent has a growing set of tools that map to Telegram's API. Each tool is gated by the permission level you choose.
list_chatsReadList all dialogs with unread counts
search_messagesReadGlobal or per-chat message search
list_foldersReadList chat folders and filters
list_contactsReadBrowse your contact list
send_messageWriteSend messages on your behalf
forward_messageWriteForward messages between chats
pin_messageWritePin or unpin messages in chats
mark_as_readWriteMark conversations as read
+ edit_message, delete_message, create_group, get_chat_info, get_user_info, read_messages, and more
Three containers. One command. Full control.
services:
postgres: # PostgreSQL 17
backend: # FastAPI + Telethon + GPT-4o
frontend: # Next.js chat UIFrontend
Next.js 16, React 19, Tailwind, shadcn/ui
Backend
FastAPI, Telethon, OpenAI, SQLAlchemy, WebSockets
Database
PostgreSQL 17 with Alembic migrations
Self-host Sovereign in minutes. Open source, extensible, and yours.