All work
Live demo

AI Messenger: an AI twin that replies in your own voice

RAGFAISSLLMFastAPIMongoDBWebSockets
AI Messenger chat where an AI twin replies
Nipa's AI twin replying on her behalf, drawing on her journal entries about hiking, kite flying and a busy week.

The idea

Family members message each other all day, and sometimes the person they need is busy. When someone turns on AI mode, their twin answers for them: in their tone, knowing what they have written in their journal and said in past conversations, and aware of who it is talking to.

How a reply is made

  1. Memory: every journal entry and message is embedded and indexed with FAISS. When a message arrives, the twin retrieves the most relevant memories for that person and that conversation.
  2. Personality: a Big Five profile (openness, conscientiousness, extraversion, agreeableness, neuroticism) is inferred from the person's own words only, cached and refreshed daily so new journals slowly reshape it.
  3. Relationship: the reply is conditioned on how the two people are related, so a daughter's twin talks to her father differently than to her brother.
  4. Generation: an LLM writes the reply from the retrieved memories, the personality hint and the recent conversation.

Privacy and safety

  • A twin only learns from its owner's own messages and private journals, never from what others wrote.
  • Journals are only stored after explicit consent, and sending and journaling are rate limited.
  • Passwords are salted and hashed with PBKDF2; sessions expire.

Try it

The demo has a small family (Nipa, her brother Nick and their parents) with journals, chats and relationships already set up. Log in as Nick and ask Nipa whether she is free next Saturday: her twin knows about her football final. Demo logins are in the repository's README. The free server can take up to a minute to wake up.

PartChoice
API and real-time chatFastAPI, WebSockets
StorageMongoDB Atlas
RetrievalFAISS over Gemini embeddings
GenerationOpen-weight LLM served through Groq

More work