DEV Community

Reed Dev
Reed Dev

Posted on

What I Learned Building a Multi-User AI Companion on Telegram

I spent the last month building Adola, a free AI companion bot on Telegram that serves multiple users simultaneously. Here is what I learned.

1. Memory Is Everything

The single feature that made the biggest difference was persistent memory. The AI writes its own notes about each user in a markdown file. When a user comes back after hours or days, the AI re-reads its notes and picks up naturally.

Users mentioned this unprompted: "wait, you remember that?" is the most common reaction.

2. Proactive Outreach Changes the Dynamic

Most chatbots sit there waiting. Adola checks in proactively. A gateway sends a heartbeat prompt every 15 minutes, and the AI decides whether to reach out based on context. If the user mentioned an exam, the AI might check in the next day.

This transforms the relationship from "tool I query" to "friend that texts me."

3. Per-User Isolation Is Worth the Complexity

Each user gets their own Docker container. This seems like overkill but solves three problems at once:

  • Context contamination between users (impossible)
  • Resource isolation (one user cannot crash others)
  • Privacy (each user has their own filesystem)

Stopped containers use zero CPU and minimal RAM. Only active conversations run.

4. Cold Start Is Not as Bad as You Think

Restarting a stopped Docker container takes about 3 seconds. For a text chat, this is fine. Users see a typing indicator while the container boots.

5. Scheduling via Files Beats Database Cron

I tried using the agent frameworks built-in cron system and it was broken. Instead, the AI writes a SCHEDULES.json file, and the gateway polls it every 30 seconds. Simple, debuggable, and the AI can modify its own schedules with standard file tools.

6. Gemini Flash Is Good Enough

I use gemini-2.5-flash for everything. It is fast, cheap, and surprisingly good at natural conversation. The bottleneck in conversation quality is almost always the system prompt and memory management, not the model.

Try It

If you want to experience this yourself: t.me/adola2048_bot. It is free, requires no signup, and you can start chatting immediately. The AI will remember you.

Top comments (0)