07

Direct-message sales run by an AI

Self-hosted product · Python backend, queues, control dashboard

The bot answers direct messages with human pauses, carries the conversation along the funnel and logs every message. It deploys to your own server with one command — keys and accounts stay with the owner rather than with a middleman service.

How it worked before

Messages piled up overnight and at weekends, answered in the morning — by which time half were talking to someone else. Who was at what stage lived in someone's head.

What made it hard

The platform bans automation quickly, and it is the company's real account that pays. So the rhythm of replies, the warmup and the daily load all have to look like a person — and account sessions cannot sit in the database in plain text.

Engineering decisions

  1. 01

    A reply is a queued job, not a reaction

    The inbox is polled every 60–180 seconds and the answer goes out 11–49 seconds later. The queue holds the pauses itself, so the web process never blocks and the rhythm survives load.

  2. 02

    Sessions are encrypted

    With a key separate from the token secret: a leaked database dump does not hand over the accounts.

  3. 03

    Warmup and automatic pause

    A new account has its own schedule for reaching normal volume, and on a run of errors the bot stops itself — before the platform does it for you.

  4. 04

    The schema lives in migrations

    Revisions including triggers: the state of the database is reproduced by a command rather than reconstructed from memory.

Where it stands

Messages are answered around the clock rather than in office hours, and no thread is lost between shifts.

Inbox
polled every 60–180 seconds
Queue
a reply is a deferred job
Reply
the AI writes as a manager would
Funnel stage
new · in progress · closed
11–49 second pause
the queue holds the rhythm, not the web process
Automatic pause
on a run of errors the bot stops itself
The queue sets the rhythm, not the speed of the server: the delay is built into the job itself, so under load it neither drifts nor starts answering suspiciously fast.

Got something like this?

Get in touch