
RikkaHub Plus · Lantern
An AI chat client for Android that is also a SillyTavern-compatible endpoint
Chat out of the box · prefix caching saves tokens · memory that doesn't fade · character cards / lorebooks / presets imported with official SillyTavern semantics
English | 简体中文 | Divergence map | Divergence map (EN)

A deeply customized fork of RikkaHub (merged with upstream v3.0.0, plus 2150+ commits of additions), natively implemented in Kotlin + Jetpack Compose.
- Just want a good AI chat app: plug in any API and start talking — multi-provider, streaming, voice calls, plugin tools, memory, cache savings. No "tavern" concepts required.
- Migrating from desktop SillyTavern: character cards, lorebooks, presets, regex and themes import losslessly with official semantics — no Termux, no Node.js.
Both routes share the same client and don't interfere with each other.
Website & docs: rikkahub.luoca.cn · Documentation (installation, configuration, tavern imports, plugin development)
Tavern compatibility
| Character cards (V3 card + 62-entry embedded lorebook) | Macro engine (60+ official macros) |
|---|
| |
Memory & caching
| Multi-dimensional memory settings | Prefix divergence diagnostics (character-level diff) |
|---|
|  |
This fork's exclusives
| HuaDeng Settings (compatibility & helpers) | HuaDeng Settings (access & automation) | Jev decisioning |
|---|
 |  |  |
| Plugin system |
|---|
 |
✨ Fork features
| Area | In one line |
|---|
| ⚡ | Prompt cache optimization | Removes per-turn context divergence — long-conversation token cost drops sharply |
| 🧠 | Memory & long conversations | Semantic RAG + three-layer memory + rolling compression |
| 🧿 | Jev decisioning | Mounts the TypeSafe System One judge model: memory screening + quick Q&A for the main model |
| 🧩 | Plugin system | QuickJS-sandboxed plugins, ZIP import, directly callable by the AI |
| 🍺 | Deep SillyTavern compatibility | Cards / lorebooks / presets / regex / QR / themes, lossless with official semantics |
| 🗼 | Proxy-station compatibility | Auto-fixes the three classic Gemini-via-OpenAI-proxy pathologies |
| 🔊 | Doubao voice | TTS 2.0 + Volcengine ASR; one Agent Plan key powers voice/video calls |
| 📱 | On-device augmentation | 30 device tools (lazy-discovery), WeChat/QQ Bots, AI proactive messaging |
| 🏮 | HuaDeng Settings | One page collecting this fork's new switches |
| 🎨 | Appearance & themes | 7 custom colors + SillyTavern theme import |
| 🛠 | Skills & tools | GitHub one-click skill install, 20 new tools, DSML text tool-call compat |
| 💞 | Companionship | Couples space, life hub (cycle / memo / calendar / music / reading) |
| 🛡 | Privacy & stability | Log sanitization, approval boundaries, telemetry off, SSE & DB hardening |
🗺️ Where this fork sits between its two upstreams (click to expand)
Two upstream lineages meet here — knowing them makes the diff readable:
rikkahub/rikkahub (original upstream, v2.5.6)
│
├──► heikeyangle-code/rikkahub-plus (intermediate fork, mingli2)
│ │ tavern system / macro engine / slash commands / group chats
│ ▼
└──► MiaoWuNYA/rikkahub-sillytavern-android ← this repo
│ cache optimization / plugins / memory / proxy fix / on-device
│
├─ also from orangechat & Tumin: three-layer memory, couples space,
│ life hub, appearance customization, early plugin system
└─ also ported from Rikkahub-Revised: semantic memory RAG, rolling compression
- vs. original upstream
rikkahub: everything preserved; the tavern/plugin/memory work is purely additive
- vs. intermediate
heikeyangle-code/rikkahub-plus (mingli2): the tavern core comes from it; this fork adds cache optimization, plugins, memory, proxy fix, voice, and privacy hardening on top
- vs. other same-origin forks: see Credits — feature provenance is stated per project
🚀 Quick start
- Grab the latest APK from Releases (
arm64-v8a, Android 8.0+)
- Settings → Models & Services → Providers, add your API; then Default models & prompts to pick models for chat / title / compression
- Start chatting. Want more:
- Import a character card (Assistants page → import, PNG / V2 / V3 JSON; lorebooks and presets come along automatically)
- Import lorebooks / presets / regex / QR (Settings → Extensions)
- Try a SillyTavern theme (Settings → Preferences → Chat appearance → import theme)
- Add plugins (Settings → Plugins → import ZIP; bundled plugins work out of the box)
In-app update: Settings → About → Check for updates (GitHub Releases API, with an auto-fallback mirror for mainland China)
💬 Chat features (this fork's core enhancements)
⚡ Prompt Prefix Cache Optimization
Major providers (DeepSeek / Kimi / Claude, etc.) offer automatic prefix caching: a byte-identical prefix to the previous request is a cache hit, billed far below the normal rate. But in chat, plenty of content changes every turn (timestamps, recent chats, memories, random numbers, rolling summaries) — one divergence kills the whole cache.
Drawing on the DeepSeek Harness prefix-stability design, this fork eliminates those divergence points one by one:
| Divergence point | How it's handled |
|---|
| Dynamic injections (recent chats, memory refs) | Frozen anchors: old block stays in place, new block appends at the tail |
{{random}} / {{pick}} and other random macros | Resolved deterministically per message — history no longer re-rolls |
| Lorebooks / skills / cross-window memory / OCR / regex depth | Frozen per user turn, so repeated requests in a turn share a prefix |
| Macro rendering of assistant messages already in history | Frozen per message — no longer varies with time or variables |
Time-family macros ({{time}}, …) | Aligned to 5-minute granularity, avoiding second-level jitter |
| Rolling compression summaries | Append-style chaining keeps the token prefix stable across compressions |
| Full memory injection / Recent Chats | Moved out of the prefix zone (the former to the context tail) |
| Multiple API keys | Sticky per session, so upstream caching isn't invalidated by key switching |
Claude redacted_thinking | Preserved and replayed, keeping the thinking-block structure intact |
Diagnostics: a built-in prefix divergence view compares consecutive requests item by item, shows the common prefix and estimated hit rate, and supports character-level diff location — you can always see exactly why a cache missed. A prompt viewer also shows the exact prompt sent this turn.
Actual results vary by conversation shape: in steady, append-only chats the hit rate improves noticeably; the exact gain depends on how often content changes and on each provider's pricing.
🧠 Memory & Long Conversations
- Semantic memory RAG (ported from Rikkahub-Revised): memories split into FACT / EPISODIC, embedded with the vector model and retrieved via cosine similarity (with a lexical fallback of word terms + CJK bigrams); episodic memories get recency weighting; results are injected within a budget
- Three-layer memory (from orangechat/Tumin): a fixed-memory section (independently editable without touching the character card) + a recent-life stream (cross-conversation memory of the current chat; unread events from other conversations auto-injected) + long-term recall via lexical-overlap scoring; the stream is auto-summarized in the background past a threshold
- Enhanced
memory_tool: a list read operation plus fact / episodic distinction — the model can review existing memories before writing or updating
- Memory management page: view / edit / delete entries per assistant
- Rolling context compression: past a threshold (auto-computed from the model's context window or set manually), a compression model rolls earlier turns into a summary (originals preserved, replaced only at request time), injected as a system message — staying in-window without losing persona or foreshadowing
- Recent chats reference: optionally inject the assistant's recent conversation list for cross-session continuity
- Transient-content pruning: web-search results / images / audio / video older than two turns are dropped from requests (with the message ID so the AI can retrieve the original via
read_history_message)
- First-turn auto memory: the first turn injects the most recent memories (no relevance query exists yet), later turns recall by relevance — the AI knows you from the first message
Memory features (memory tool / RAG / three-layer memory / cross-window life stream) are on by default — memory helps the AI know you better and isn't sacrificed to save context. Existing assistants keep their settings and can opt out per assistant.
🧿 Jev decisioning (TypeSafe System One)
Settings → HuaDeng Settings → Jev decisioning. Jev is a dedicated small model that only judges — it never generates text (~100ms end to end, output tokens free). It mounts as an invisible decision layer inside the client: paste an API key and it works. Two takeover switches:
| Switch | What it does |
|---|
| Automatic memory screening | Instead of embedding-similarity retrieval, Jev judges each memory "is this relevant to the current conversation?" — no embedding API calls. Candidates are batched in parallel newest-first; anything over 50% relevance probability is injected; identity memories (what to call you, preferences) count as relevant even when not mentioned |
| judge tool for the main model | Gives the main model a judge tool (shown as "Jev 明断" in the UI): when unsure about a yes/no, multiple-choice, or rating question it asks Jev instead of guessing. A tool-routing note is injected into the system prompt so weaker models discover it too |