Mirrai

不在身边的时候,TA 还在这里。Upload real chat logs, rebuild a digital persona — open-source AI companion with persona distillation, an emotion engine, 11 LLM pr

What is Mirrai?

不在身边的时候,TA 还在这里。Upload real chat logs, rebuild a digital persona — open-source AI companion with persona distillation, an emotion engine, 11 LLM providers, and a graduation mechanism.

Overview of Mirrai

What it is

​​Mirrai is an open-source AI companion application that takes real chat logs and rebuilds a digital persona of the person you miss. It is designed not to make you stay, but to help you say goodbye. The project provides a multi-stage persona distillation engine, a dynamic emotional state machine, a graduation mechanism, support for 11 LLM providers, and optional WeChat integration. All data is stored locally. It is released under the MIT license.​​

Key features

​* Multi-stage persona distillation: Converts uploaded chat logs into a structured persona with 7 layers—personality traits, speech patterns, pet phrases, attachment style, love language, argument style, and poignant moments. Used via a pipeline.​* Dynamic emotional state machine: Each persona has 6 emotional states (tender, playful, longing, melancholy, joyful, detached) that switch in real time based on conversation content, shown in the UI and affecting reply tone. Users can also manually toggle.​* Graduation mechanism: Intimacy grows naturally through conversation. When the system detects the user's emotional state has stabilized, it prompts graduation. The AI generates a farewell letter in the persona's voice, then the persona goes into hibernation (recallable anytime). The product's success metric is graduation rate, not retention.​* 11 LLM providers plug and play: Supports OpenAI, Atlas Cloud, Claude, DeepSeek, Kimi, Tongyi Qianwen, Doubao, 302.ai, Ollama, Dify, and Xunfei Spark. OpenAI-compatible providers share one adapter, distinguished by baseUrl and model. Works with Ollama for fully local inference.​* WeChat bot integration: Uses Wechaty to bind WeChat contacts to digital personas, automatically replying in their tone. Web and WeChat share the same persona and memory. Note: unofficial protocol carries account ban risk.​

Use cases

​* Recreating a digital persona of a person you miss using real chat logs.​* Practicing conversations with that persona as a way to process emotions and reach a state of peace.​* Understanding and reflecting on a past relationship through an AI-generated interactive space.​* Experimenting with multiple LLM backends for persona-driven chat.​

Getting started

​bashgit clone https://github.com/Ch1rpy2613/Mirrai.gitcd Mirraicp .env.example .env # Edit .env, fill in JWT_SECRET and at least one LLM API Keydocker compose up -d​Access http://localhost:3000. PostgreSQL is included in Docker. For macOS: download Mirrai-macOS-arm64.dmg from Releases, drag into Applications. For source: see the repository README.​

License and pricing

​The license is MIT. The project is open-source. No pricing is stated in the metadata or README.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/ch1rpy2613mirrai.svg)](https://yunodb.com/tools/ch1rpy2613mirrai?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/ch1rpy2613mirrai?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/ch1rpy2613mirrai.svg" alt="Featured on YunoDB" height="20"></a>