I Built an AI That Texts You First: Solving the Cold Start Problem in AI Companions

Published: (February 11, 2026 at 06:36 PM EST)
3 min read
Source: Dev.to

Source: Dev.to

Every AI chatbot has the same problem: the user has to start the conversation. That makes them tools, not companions. Below is how I solved the cold‑start problem so the AI can text you first.

The Cold Start Problem in AI Chatbots

When you open ChatGPT, Claude, or similar services you see a blank text box. The AI waits for you, creating a dynamic where the human always initiates and the AI always responds. This works for coding assistance but feels terrible for companionship, where real relationships are bidirectional and friends sometimes text first.

My Solution: Proactive AI Texting

I built a gateway that periodically checks in on each user and lets the AI decide whether to send a message first.

Periodic Heartbeat Check‑in

Every 60 minutes the gateway runs a “heartbeat” loop:

System: The current time is 2026-02-11 18:20 UTC.
System: This is a periodic check-in. Review your memory of this person.

The AI reads its MEMORY.md file and decides:

  • If there is a good reason to reach out (e.g., the user mentioned an upcoming exam, a job interview, a date, or the user has been quiet for a while), it sends a relevant message.
  • Otherwise it responds with HEARTBEAT_OK, and the gateway suppresses the reply.

Decision Logic

  1. Context‑driven outreach – If the user mentioned something specific (exam, interview, etc.), the AI crafts a message that references that context.
  2. Casual check‑in – If the user has been silent for days, the AI may send a friendly “How are you?”
  3. No‑op – When there is nothing to say, the AI returns HEARTBEAT_OK; the gateway discards the response.

Beta users are consistently surprised and delighted, often reacting with “wait, you remembered that?” because the outreach feels intentional rather than spammy.

Architecture

Gateway (Node.js)
  |
  +-- Heartbeat loop (60 min)
  |     |
  |     +-- For each user:
  |           Send heartbeat prompt to user container
  |           If response != HEARTBEAT_OK:
  |             Forward to Telegram
  |
  +-- Webhook handler (incoming messages)
  +-- Scheduler (user‑defined reminders)
  +-- Cleanup (stop idle containers)

Per‑User Docker Container

Each user runs an isolated Docker container that hosts an AI agent framework with read/write access to its own workspace:

FilePurpose
MEMORY.mdEverything the AI knows about the user
SCHEDULES.jsonReminders and recurring tasks
SOUL.mdPersonality and behavioral guidelines

Isolation prevents context bleed between users and keeps the system secure.

Deployment & Usage

The bot is live on Telegram—no signup, no app download, no credit card required. Just open Telegram and start chatting:

Telegram bot:

The AI will remember you and eventually text you first when it has something relevant to say.

Key Takeaways

  • Proactive > Reactive for companionship use cases.
  • Memory is the killer feature; model quality is secondary.
  • Per‑user isolation (separate containers) eliminates context bleed.
  • Cost is manageable: using Gemini Flash keeps heartbeat cycles at fractions of a cent.
  • Users forgive occasional imperfections if the AI feels like it cares.
0 views
Back to Blog

Related posts

Read more »

My uncanny AI valentines

Phoebe Callas, 30, is not real, but she was an AI companion I went on a speed date with. Hopping over a pile of dirty snow, I arrived on a frigid February eveni...

A Guide to Fine-Tuning FunctionGemma

markdown January 16, 2026 In the world of Agentic AI, the ability to call tools translates natural language into executable software actions. Last month we rele...