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 current edition is free — all current features included, no trial countdown, no license code. Just add your own API key.
- 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.
Update — Nov 26, 2026: Xinyu is now free. The current edition is free, permanently — all current features, no countdown. Future editions (a persistent little town, a theater mode, two-way voice) will be paid, and everyone who already bought a license upgrades free. No DeepSeek key yet? Meituan's LongCat platform currently gives new users 10M free tokens, and Xinyu accepts any OpenAI-compatible endpoint — base URL https://api.longcat.chat/openai/v1, model
Top comments (5)
The memory notebook is what stood out to me — keeping every memory as an inspectable entry with a timeline, and striking through the old version instead of silently overwriting it, so you can actually see what the companion remembered and fix it. Running the whole brain as about 4,700 lines of pure-stdlib Python with zero pip dependencies inside the APK via Chaquopy, talking straight to the DeepSeek API with your own key, is a bold way to keep there literally no server. The director step for group chats, deciding which 1–3 characters speak instead of everyone replying in turn, also sounds like the right fix for the meeting-transcript problem. One question: when a sensitive entry is marked and never surfaces in group chat, does it still get used as context in one-to-one chats with that same character, or is it excluded everywhere?
Thank you for reading so carefully — you got the design exactly right.
The 🔒 flag does not mean "excluded from memory". It means "never leaves her private ledger". In a 1-on-1 chat with that character, sensitive entries are still recalled and used as context — she remembers the private things you told her, like a person would.
They structurally cannot leak into group chat, for two reasons:
The one mechanic that crosses contexts — a character "letting something slip" when her mood hits an extreme — is feelings-only by design: the prompt tells her she might reveal that she's upset or fond, never the content of a private entry. And it only unlocks at the higher closeness stages.
So: remembered privately, used privately, absent everywhere else.
Struck-through memory history instead of silent overwrites is a really grounded design choice. The director call deciding who stays silent in group chat also feels closer to real conversation. Does editing a memory entry immediately change what the next reply can see, or is there a refresh step?
Immediate — the very next reply already sees the change.
There is no index or cache to refresh: the memory block is rebuilt from the ledger file on every single message (relevance-scored recall runs per request). So if you edit an entry, her next answer works from the edited version; if you delete one, it's gone from her context from the next reply on; if you mark something sensitive, the group-chat exclusion applies right away.
One honest caveat: this changes what she recalls going forward. It doesn't rewrite messages already sent in the current conversation — if she quoted the old version of a memory three replies ago, that text still sits in the chat history window, even though she'll never recall it that way again.
v3.2 just shipped — the trial is now built in, no code to claim