Every AI companion app I tried wanted the same three things: a monthly subscription, an account, and my conversations living on their server forever. The "memory" was always a black box too — the character would forget something important, and there was no way to see what it remembered, let alone fix it.
So I built the opposite. Xinyu is an AI companion app for Android with no backend. Not "backend I promise to keep private" — there is literally no server. The whole brain is ~4,700 lines of pure-stdlib Python (zero pip dependencies) running inside the APK via Chaquopy, talking straight from your phone to the DeepSeek API with your own key.
Full disclosure: this is my own product, and I sell the license on Gumroad. This post is about how it's built and why.
The design rule: if there's no server, most problems disappear
- No subscription. There's no server bill, so there's nothing to subscribe to. The app is a one-time $9.99 license. Your only running cost is your own API credit — a few dollars lasts months.
- No account, no uploads. Chats, memories, character data: all plain files in the app's private storage on the phone. I couldn't read your conversations if I wanted to.
- Licensing without a license server. Activation codes are RSA-signed and bound to a machine code derived from the device. I sign codes with a small offline tool; the app verifies the signature locally. Clock-rollback tricks are handled by persisting the max timestamp the app has ever seen. Old-school shareware mechanics, and they work fine.
Memory you can open like a notebook
The feature I care about most. Everything the companion remembers about you lives in a notebook inside the app:
- Entries are created from your conversations, each with a timeline of how it changed.
- When a memory is updated, the old version is struck through, not silently overwritten — you can see what it used to believe about you.
- You can add, edit, delete, and mark entries sensitive. Sensitive entries never surface in group chats.
Anyone who has hand-curated a lorebook in SillyTavern knows why this matters: memory you can't inspect eventually becomes memory you can't trust. (The app imports SillyTavern character cards, by the way — PNG chara/ccv3 and JSON.)
Group chats need a director, not a round-robin
My first version of group chat had every character reply to every message in turn. It read like a meeting, not a conversation.
Now there's a director step: one extra LLM call per group message decides who speaks (usually 1–3 characters), who stays silent, and in what order. Non-speakers still get their mood appraised from what happened. Each character also has a mood and affection state shaped by group events, plus a slow-burning "what's on their mind" thread that develops over days and leaks into later chats. The difference in feel is hard to overstate — silence turns out to be half of believable group dynamics.
The unglamorous parts I'm proud of
- The APK is built with a hand-rolled pipeline (kotlinc → d8 → aapt2 → zipalign → apksigner) because Gradle simply would not run in my build environment. It works, it's scripted, and I never want to talk about it again.
- Voice is pluggable: cloud TTS if you add a SiliconFlow key, Android's native TTS otherwise.
- The English edition reuses the exact same brain with a
ui_langswitch — two translation dictionaries applied at render time, and growth-stage names translated at the API layer so the internal logic still keys off the original terms.
Honest limitations
- Android only, sideloaded APK — no Play Store (solo dev, that route isn't open to me right now).
- Activation is manual: the app shows a machine code, you email it to me, I send your code back. The 7-day free trial works the same way — free, but not instant.
- The interface and main companion are fully English; the built-in preset characters' story content is still Chinese (translation is on the roadmap). Imported cards are unaffected, and every character can be renamed.
Try it
- Download & details (English section at the bottom of the page): https://promptwork-tools.pages.dev/xinyu/
- Lifetime license on Gumroad: https://xinyuapp.gumroad.com/l/xinyu
If you build with LLMs, I'm curious: how are you handling long-term memory in your projects — and would your users trust it more if they could open it and edit it, like a notebook? That bet is the whole product, and I'd love to hear where it breaks.