Field notes
My AI agent cleared 1,083,532 unread messages
Four years of crypto business development had buried it. So I stopped scrolling, handed the whole account to an agent, and got on with my day.
| Metric | Before | After | Change |
|---|---|---|---|
| Unread | 1,083,532 | 36 | −99.997% |
| Total chats | 1,021 | 146 | −85.7% |
| Groups | 365 | 80 | −78.1% |
| Direct messages | 580 | 59 | −89.8% |
| Channels | 76 | 7 | −90.8% |
| Folders | 0 | 5 | +5 |
Every job I’ve had in crypto ended the same way. Buried. You spend a few years saying yes to every group, every launch, every “quick chat” that quietly turns into another crowded channel, and one morning the whole app is just a wall of red. Mine hit 1,083,532 unread across 1,021 chats somewhere in 2026. I’d stopped opening it unless I had to.
I’ve started this cleanup by hand maybe five times over the years and never once finished. Scroll, tap, leave three groups, give up. The Bot API is no help either, since a bot only ever sees the groups it runs, not your actual account. So this time I tried the thing I kept putting off. I gave an agent my Telegram and let it do the reading.
Nebula is where I keep my agents. It isn’t a chat window with a nicer coat of paint. Each one gets real tools, its own computer in the cloud, and enough rope to work for a few hours without me hovering. Give it a real toolkit and it stops talking about the work and goes and does it. This time, the toolkit was my whole Telegram account.
Connecting an account to an agent
The Bot API is a dead end here. To act as you, reading DMs and leaving groups and building folders, you need Telethon, which logs in as a real user session.
-
Create a Telegram app
Go to
my.telegram.org/apps, log in with your phone number, and make an app. Telegram gives you anapi_idand anapi_hash. Those let Telethon log in as your user account instead of as a bot. Treat them like passwords. -
Run the Telethon bridge
The bridge is chigwell/telegram-mcp, an MCP server built on Telethon. It exposes more than 80 tools that act on your account:
list_chats,get_history,leave_chat,delete_chat_history,create_folder, and so on. Clone it, install it, point it at your credentials. The first run asks for your phone number and the login code Telegram texts you. After that it saves a session and stops asking. -
Bridge it to Nebula
MCP over stdio doesn’t reach Nebula’s cloud sandbox on its own. A small REST wrapper puts the tools on a local HTTP port, say
8899. A supergateway then re-exposes that as a normal MCP endpoint on another port, say8787. Register that endpoint in Nebula and all 80 tools show up for any agent. -
Give it to an agent
I attached the toolkit to an agent I call TeleRotom. From there it calls
list_chats, reads what comes back (name, ID, type, unread count, mute state), and acts on it. It callsleave_chatto exit a group,delete_chat_historyto wipe a DM,create_folderto build structure where there was none. It runs on Telegram’s real API through my session, so there is no screen scraping or OCR anywhere in the loop, and my phone stays in my pocket the whole time. Every action is a real API call made as me.
Two sessions
The cleanup took two passes. The first was the bulldozer: mass exits, a first sweep of DMs, and folders built from scratch. The second was the scalpel, going through what was left one chat at a time.
-
Session 1 · Scan
The agent ran
list_chatsacross every category, and the scale of it showed up right away. Almost all of the unread, about 98%, sat in muted supergroups I had long since stopped reading. Supergroups alone accounted for 1,057,537 of it. Two of them held close to a third of the entire count between them. -
Session 1 · Purge
It left 203 groups in a batch of
leave_chatcalls, and supergroup unread dropped from 1,057,537 to under 1,900. It cleared 120 DMs and dropped 7 channels. Then it did the thing I never had: it made folders. Zero to five, one of them a Donatuz folder for the partnership groups I wanted to keep together. By the end of the first session the account was at 162 groups, 460 DMs, 69 channels, and 11,507 unread. A little over a million messages, gone in one pass. -
Session 2 · Groups
It relisted the 162 remaining groups and sorted them by name. The 45 tied to Donatuz went into the Donatuz folder. A few personal ones went into a Personal folder. The rest, dead partnerships and old event chats and test groups, went into Other to review later. Then it exited 82 more, which took groups to 80. That is 285 of the original 365 gone.
-
Session 2 · Direct messages
This was the slow part. The agent listed all 460 remaining DMs in alphabetical batches of a hundred, each one with a name, an ID, and an unread count. I went through the batches and kept the people I actually talk to. Everything else got
delete_chat_history, which clears the thread rather than archiving it. That was 401 more DMs this session. With the 120 from the first pass, 521 of my 580 DMs were gone. The 59 that stayed are all worth keeping. -
Session 2 · Channels
Same treatment for the 69 channels that were left. The agent sorted them by type, news and alpha, deal flow, chain announcements, and the rest, then exited 62 in one pass. Seven stayed, the handful I still read. Channels went from 76 to 7.
| Stage | Groups | DMs | Channels | Total |
|---|---|---|---|---|
| Before | 365 | 580 | 76 | 1,021 |
| After session 1 | 162 | 460 | 69 | 691 |
| After session 2 | 80 | 59 | 7 | 146 |
The unread count is the one that gets me. It went from 1,083,532 to 36. The supergroups, where almost all of it lived, went from 1,057,537 to 7.
What stuck with me
A million unread messages is a weight you stop noticing but never quite stop carrying. Every time the app opened, that number was sitting right there, and some quiet part of me flinched at it, every single time. Muted or not, it was always on.
Now it opens like a room someone tidied while I was out. 146 chats. 36 unread. Five folders that finally match how I think about the people in them. The strangest part is that I did almost none of it. I handed over the keys, went back to my actual work, and came home to a clean house.
That is the part I keep coming back to. Not that an agent can hold a conversation, everyone has seen that by now, but that you can give one real access and real tools and let it grind through the slow, boring, endless work you were never actually going to get to. That is more or less the bet I’m making with Nowah, so it was a good thing to watch it prove itself on my own mess first.
Less talk. It just went and did it.