An AI companion designed to help you leave it
Mirrai rebuilds a digital persona from real chat logs — and its success metric is how many users graduate out of it.

What it does
Mirrai is a self-hosted AI companion app that builds a digital persona from actual chat history you upload, rather than a hand-written character sheet. A multi-stage pipeline distills the material into a seven-layer persona — personality traits, speech patterns, catchphrases, attachment style, love language, argument style, and defining moments. The persona then chats with you in that person’s voice, complete with a six-state emotion engine (tender, playful, longing, melancholy, happy, distant) that shifts based on what you say.
The interesting bit
The graduation mechanism. Intimacy grows through conversation stages, but when the system detects your emotional state settling — positive sentiment rising, fewer “what ifs” — it offers you the option to graduate: the AI writes a farewell letter in that person’s voice and goes dormant. The stated success metric is graduation rate, not retention. That’s a genuinely unusual design stance for a companion product, and it’s the whole thesis of the project.
Key highlights
- 11 LLM providers supported, with OpenAI-compatible backends sharing one adapter; Ollama enables fully local, offline inference
- All data stays local — uploads in
./uploads/, PostgreSQL bundled in the Docker setup - WeChat bot integration via Wechaty, sharing persona and memory with the web client
- End-to-end type safety from Drizzle schema through tRPC to React Query hooks
- AI transparency is on by default: the persona admits it’s an AI when asked (can be toggled off)
Caveats
- The WeChat bot uses unofficial protocols, and the README itself warns of account-ban risk
- The persona distillation engine optionally requires Python 3.9+ alongside the Node stack
- Born from a personal creation story, so expect an emotionally heavy product — the README is upfront about it not being a substitute for real relationships or professional help
Verdict
Worth a look if you’re interested in persona modeling, emotion state machines, or companion apps with an exit ramp. Skip it if you want a retention-optimized chatbot — this one is built to be left.
Frequently asked
- What is Ch1rpy2613/Mirrai?
- Mirrai rebuilds a digital persona from real chat logs — and its success metric is how many users graduate out of it.
- Is Mirrai open source?
- Yes — Ch1rpy2613/Mirrai is open source, released under the MIT license.
- What language is Mirrai written in?
- Ch1rpy2613/Mirrai is primarily written in TypeScript.
- How popular is Mirrai?
- Ch1rpy2613/Mirrai has 1.3k stars on GitHub.
- Where can I find Mirrai?
- Ch1rpy2613/Mirrai is on GitHub at https://github.com/Ch1rpy2613/Mirrai.