DEV Community

Reed Dev
Reed Dev

Posted on

How I Built a Telegram Bot That Actually Feels Like a Person

Most Telegram bots are glorified command processors. You type /weather and get a response. You type /help and get a menu. There is no conversation, no continuity, no personality.

I wanted to build something different. I wanted a bot you could text at midnight when you cannot sleep and it would remember that you mentioned having insomnia last Tuesday. A bot that would check in on you the next day to ask if you slept better.

So I built Adola.

The Architecture

Each user gets their own isolated container running an AI agent. This is not a shared context window with user IDs. Each person has:

  • Persistent memory stored in a MEMORY.md file that the agent maintains
  • Conversation history that persists across sessions
  • A scheduling system for reminders and follow-ups
  • Proactive outreach via a heartbeat system that periodically asks the agent if it should check in

The gateway handles routing Telegram messages to the right container and sending responses back as natural multi-bubble messages (not one giant wall of text).

Key Technical Decisions

Per-user containers vs shared instance

I tried a shared instance first. It was a disaster. Context windows got confused between users, memory was unreliable, and one slow response blocked everyone else. Moving to per-user containers eliminated all of those problems.

The tradeoff is resource usage, but containers are cheap when they are idle. The gateway spins them down after 30 minutes of inactivity and spins them back up when a new message arrives. Cold start is about 3 seconds.

Memory as a file, not a database

The agent writes and reads a MEMORY.md file in its workspace. This sounds primitive but it works better than vector databases for this use case. The agent decides what is worth remembering and how to organize it. It is not a retrieval problem -- it is a curation problem.

Scheduling via JSON, not cron

When you say "remind me to call my mom on Sunday at 3pm," the agent writes a schedule entry to SCHEDULES.json. A polling loop in the gateway checks for due schedules every 30 seconds. The agent gets a system message saying the schedule fired, and then it generates a natural reminder.

This means reminders are not robotic. Instead of "REMINDER: Call mom" you get something like "hey, you mentioned wanting to call your mom today at 3. just a heads up in case it slipped your mind"

What Users Actually Do With It

I expected people to test it with trivial messages and leave. Instead:

  • One user talks to it about their CS homework almost daily
  • Another uses it as a low-pressure way to practice articulating feelings
  • Several people just use it to have someone to talk to when their friends are asleep

Try It

It is free and there is no signup. Just open Telegram and message @adola2048_bot. Say whatever is on your mind.

Full disclosure: I built this and I am actively looking for feedback. If something feels off or you have ideas for what would make it better, just tell Adola directly. She passes it along.

Top comments (0)