finds.dev

Ch1rpy2613/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.

View on GitHub

★ 1,288TypeScriptMITupdated Oct 2026

// the take

Mirrai is a self-hosted AI companion app: you upload real chat logs with someone and it builds a persona that replies in their voice, tracks an evolving emotional/intimacy state, and eventually offers a 'graduation' flow meant to help you let go rather than stay hooked. It's aimed at developers curious about companion-AI/persona-modeling architecture or anyone wanting a local, provider-agnostic alternative to Character.AI-style products.

End-to-end type safety (Drizzle schema -> tRPC router -> React Query hook) is real and verifiable, not just a diagram. The OpenAI-compatible adapter pattern covers 11 providers through one client plus baseURL/model swaps, which is the right amount of abstraction for that problem. Local-first storage plus an Ollama path means fully offline inference is actually achievable, not a marketing checkbox. The 'graduation' mechanic — detecting emotional closure via sentiment trend and generating a farewell letter — is a genuinely different design choice from the usual retention-maximizing companion bot.

WeChat integration depends on Wechaty/wechat4u, an unofficial protocol the README itself warns can get your account banned — a real liability, not a footnote. The 'emotion engine' is keyword matching against phrases like 想你 or 难过, not the state-machine sophistication the README's framing implies. The persona-distillation pipeline shells out to a separate Python subprocess, so debugging a failed analysis means tracing across a Node/Python process boundary. It stores and processes someone else's private chat history with password auth that's described only as SHA256-hashed (no mention of bcrypt/argon2 or per-user salting specifics), which is a lot of trust to extend to a project at this stage.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,288
Forks
3
Language
TypeScript
License
MIT
Last commit
19 Oct 2026

// nearby

If Mirrai isn't quite it.

All repos →