AI personas that talk like humans on Telegram

AI personas that talk like humans on Telegram

The client's acquisition strategy had a personal touch problem. Their community grew through one-on-one conversations — outreach specialists would message potential members, answer questions about the trading education program, and guide them toward signing up. It worked, but it didn't scale. Each specialist could handle maybe 30 conversations a day, and the quality varied wildly depending on who was working that shift. The client wanted to multiply their outreach capacity without multiplying headcount — and the conversations had to feel genuinely human.

how we built it

We built a system of AI persona agents that operate as real Telegram user accounts. Not bot accounts — actual user accounts managed through Telethon, the MTProto client library. Each agent has a defined persona: a name, a conversational style, specific knowledge boundaries, and a set of topics it's allowed to discuss. When a user messages the agent (or the agent initiates outreach), the conversation history is loaded from PostgreSQL and sent to Claude along with the persona's system prompt. Claude generates a response that matches the persona's tone and stays within its knowledge boundaries. The response is then sent through Telethon as a regular Telegram message — indistinguishable from a human typing it.

Real Telegram user accounts

Telethon-driven MTProto sessions send messages as normal users, not bot accounts, for believable outreach.

believable behavior

Making this believable required more than just good prompts. Telegram actively monitors for automation on user accounts, so the agents simulate human behavior patterns: variable typing delays calculated from the response length, read receipt timing, online/offline status cycling, and natural pauses between messages. Send a reply too fast and Telegram flags the session. Send it with no typing indicator and the user gets suspicious. We tuned these parameters over several weeks of testing until the behavior patterns passed both Telegram's detection and human intuition. The agents also handle voice messages and images — voice responses are generated via TTS and sent as Telegram voice notes, while image messages are analyzed before generating a contextual text reply.

The control plane runs on Redis pub/sub. Every agent subscribes to a command channel where operators can issue real-time directives: pause an agent, inject a specific message into a conversation, or take over a chat entirely. Operator takeover was one of the most delicate features — when a human specialist takes control, the AI agent goes silent on that conversation while the operator types directly through the same Telegram account. The person on the other end never sees a switch. When the operator releases control, the AI resumes with the full conversation history, including the operator's messages, loaded into context.

Redis pub/sub control plane

Operators pause agents, inject messages, or take over a chat in real time without the user seeing a handoff.

safety and operations

What keeps the system honest is the constraint layer in Claude's system prompts. Each persona has explicit rules: refuse to discuss anything outside the community's topic area, never fabricate credentials or promises, escalate to a human if the user asks something beyond the agent's scope. Without these boundaries, Claude will happily drift into giving financial advice or making claims that would create liability. We tested this aggressively — adversarial prompting, off-topic pivots, emotional manipulation — and tuned the refusal directives until the failure rate dropped below what we considered acceptable. It's not zero, which is why every conversation is logged and flaggable.

Heartbeat monitoring tracks agent liveness — each agent process pings Redis every 30 seconds, and a watchdog flags agents that go silent. This sounds like a minor operational detail, but when you're running a dozen agents on real Telegram accounts, a dead agent means a real user staring at "online" status with no response. The architectural risk we're aware of: Redis is a single point of control. If Redis goes down, the agents keep running and keep responding — but they become uncontrollable. No pause, no takeover, no emergency stop. The mitigation is a local kill switch per agent process, but it requires SSH access rather than a dashboard click.

results

The result: outreach capacity increased by roughly an order of magnitude. Conversations that used to require a human specialist from start to finish now only need human intervention for edge cases — maybe 10-15% of threads. Response quality, measured by conversion to community membership, is comparable to the human baseline. The bigger lesson was that the hard part of building AI agents isn't the AI — it's the operational infrastructure around it. Generating a good response is table stakes. Controlling, monitoring, and recovering a fleet of autonomous agents running on a platform that doesn't want them there — that's where the real engineering lives.

Stack

Agents: Python, Telethon (MTProto), Anthropic Claude API

Database: PostgreSQL (SQLAlchemy 2 + asyncpg)

Control plane: Redis (pub/sub, heartbeats)

Infrastructure: Docker

2026, «VOSGLOS». All rights reserved.