Get Hiyori running in three simple steps:
- Either:
- Download: Grab the latest release for Windows (
.exeNSIS installer) from the Releases page, or - Online: Go to GitHub Pages for the web app version. No data is stored in the server. Or,
- One of the other options below.
- Download: Grab the latest release for Windows (
- Connect AI: Open the app, go to Settings → AI Providers, and add your preferred provider (OpenAI, OpenAI-compatible, Ollama, etc.).
- Play: Click New Story → World Builder to generate your first universe!
| Option | How to Run | Recommendation |
|---|---|---|
| Installer | Download and install Hiyori_<version>.exe |
Recommended (Windows) |
| Built SPA | npm install && npm run build, then serve build/ |
Recommended (Web) |
| Online | Visit GitHub Pages or self-host | No install needed |
| Dev server | npm install && npm run dev |
For web development |
| Local desktop | npm install && npm run tauri dev (requires Rust) |
For app development |
| Android | See Building the Android APK below | For Android devices |
Note: Running the locally-built executable directly without the installer is not recommended, as the local data cache is not automatically erased between versions and can cause stale data issues. Web App Note:
localhost/127.0.0.1is allowed on HTTP. All other hosts require HTTPS. An HTTPS web app can only call HTTPS providers or localhost providers. See the WISP Proxy section for CORS workarounds.
- Multi-Phase Pipeline: A sequential orchestration of Writer → Reviewer → Editor → Template Fitter → Game Master ‖ Plot Planner, accompanied by an async Summarizer → Character Profile Compressor → Memory extraction chain.
- Write-Review-Edit Loop: An optional feedback cycle (with detailed or quick review modes) to guarantee writing quality and narrative consistency.
- Branching Narratives: Fork storylines at any point. Each branch is an independent act line sharing messages up to the fork point.
- Act Plots: AI-generated scene-by-scene plot outlines with guided interview creation that drives the storytelling.
- Act Phase System: Event-based plot mode structures stories through narrative phases (introduction → rising action → climax → falling action → resolution) with milestone gating and configurable advancement thresholds.
- Director Notes: Player-initiated directorial guidance to shift the narrative direction dynamically.
- Act Transitions: AI-assisted bridging between acts with strict continuity checks.
- Epilogue Generation: A dedicated pipeline for story-ending epilogues with multiple ending types (good, bad, bittersweet, alternative).
- Risk Evaluation: A dice-roll risk model for determining the outcome of risky actions.
- AI Tools: Pipeline agents have access to tools including scene reading, memory/inventory queries, character introduction, risk evaluation, phase advancement, and act ending.
- World Builder: An AI-guided interview that generates a comprehensive world document. Supports updating existing world documents via the World Builder.
- Import World: Import chat transcripts (JSON, Markdown, text) as new stories with automatic act and character extraction.
- Character & Act Cards: Extract characters from acts; generate cards detailing personality, appearance, and story arcs. Manageable via the Context Management page.
- Memory System: Vector-based memory with semantic search (
sqlite-vec). The AI recalls past events, locations, and character interactions via thequery-memoriestool. - Inventory Tracking: Per-character item, equipment, skill, clothing, and status tracking with change history, queryable by AI agents via the
query-inventorytool. - Character Profiles: Compressed per-character profiles with configurable importance thresholds, maintained by the Character Profile Compressor.
- Important Phrase Highlighting: Background LLM extraction of key narrative phrases, visually emphasized in the prose (gated by Minor Task Agent setting).
- Reviewer: An optional AI reviewer (detailed or quick mode) that validates continuity, character consistency, and narrative quality before the Editor runs.
- Wide API Support: Supports OpenAI, OpenAI-compatible, and Ollama endpoints via
chat-completionsorresponsesAPI formats. - Multi-Provider Assignment: Assign different models to specific pipeline roles (e.g., a fast model for the Reviewer, a creative model for the Writer).
- Per-Provider CORS Bypass: Configure WISP proxy or libcurl-based CORS bypass on a per-provider basis for web app usage.
- Fully User-Customizable Prompts: Edit bundled default prompts or create story-specific overrides via the File Manager. Every AI-facing instruction can be tailored.
- Story Export/Load: Per-story
.zipexport with selective act line import (overwrite or load as a new story with remapped IDs). Full app data backup/restore is available via Settings. - Context Management: Generate and manage act cards and character cards for controlling what context is fed to the AI pipeline.
Nothing works without an AI provider.
- Go to Settings → AI Providers and click + Add Provider.
- Choose a provider type: OpenAI Compatible, OpenAI, or Ollama.
- Fill in the Base URL and Model (use the Fetch Models button to auto-populate if supported).
- Select the correct API type:
chat-completionsfor most providers,responsesonly for OpenAI'sresponsesAPI. - Optionally configure a CORS bypass (WISP proxy or libcurl) for web app usage.
Ollama (Local) Users: Set
OLLAMA_ORIGINS=*on your Ollama server to allow browser CORS requests.
Since some API providers do not support CORS, API requests from the web app directly to those providers will fail.
- Per-Provider CORS Bypass: Each provider can be individually configured with a WISP proxy URL or the built-in libcurl-based CORS bypass.
- WISP Protocol: This app supports the WISP-protocol proxy. You can easily proxy web app requests by setting up a local server using wisp-server-python.
- Advanced Usage (Cost & Token Management): For power users managing multiple APIs, consider routing your Hiyori requests through an intermediate gateway. Deploying a self-contained Docker Compose stack running LiteLLM on a local NAS is an excellent strategy to bypass CORS restrictions, unify your endpoints, and monitor your overall token usage without relying on a host-machine database.
All pipeline roles default to your Main Provider. To optimize speed and cost, assign smaller/faster models to minor roles in Settings → Pipeline Roles. Each role is an independent agent that does not share much context with the others, and you can mix providers and models freely across roles.
- Enable the Reviewer to unlock the Editor role. Choose between detailed (thorough analysis) and quick (fast pass/fail) review modes.
- You must assign a Minor Task Agent to enable phrase extraction and template fitting.
The "minimum" requirement is a local Gemma 12B class model for everything.
Using open weight/open source frontier models (e.g. DeepSeek V4 Pro, GLM-5, Kimi K2.6) for everything is good, but may also be too slow for a semi-interactive game.
| Role | Recommendation | KV-cache |
|---|---|---|
| Main Provider | Cloud "Flash"-class models (e.g. DeepSeek V4 Flash, Gemini 3.1 Flash Lite Preview), or local ~24-30B models (e.g. Qwen3.6 27B/35B A3B, Gemma 31b/26B A4B, GPT-OSS 20B) | — |
| Minor Task Agent | Small, fast non-reasoning models (e.g. Gemma E4B, 12B class). May work with even smaller models. | Not needed |
| Plot Planner | Strong frontier models with Event-based mode; "Flash"-class with Guidance-based mode. Both modes are token-heavy and slow, but they drive the entire story direction. | Needed for Guidance-based, not for Event-based |
| Writer | Same as Main Provider, may also opt for frontier models. What you read will mostly be written by this model. | Needed |
| Reviewer | Reasoning models — quick review with stronger models, or detailed review with local ~24-30B models | Needed |
| Editor | Fast non-reasoning models, but not too weak — quality still matters (e.g. Gemma E4B/12B class). Depending on the reviewer, the editor will be asked to rewrite stuff. | Needed |
| Game Master | Same as Main Provider. Primarily generates decisions that drive the plot — weaker models work if decision quality isn't critical | Needed |
| Summarizer | Same as Main Provider, or a stronger frontier model with reasoning disabled — better summarization means higher-quality context for other agents | Needed |
KV-cache note: Roles marked "Needed" benefit significantly from prompt-caching. Using the same provider and model for these roles allows the cache to persist across turns. Conversely, the Minor Task Agent's context shifts every call, so prompt-caching offers no advantage — a different provider can be used without penalty.
The core loop: send a message → AI generates narrative → you choose a decision (or enter your own) → repeat.
-
Concluding Acts: When an act ends (via the
end-acttool or player choice), choosing "Continue to Next Act" creates a new act line. Choosing "End the story here" writes a concluding Epilogue with a selectable ending type (good, bad, bittersweet, or alternative). -
Message Actions: Every AI message features buttons to Copy (Markdown), Read (TTS), Fork (branch narrative), Regenerate, or Edit (reveals structured fields like scene title, background, and narrative that aren't visible in standard reading mode).
Forking lets you explore "what if" scenarios. Click Fork on any assistant message and choose:
- Keep current plot: Continue with the identical plot outline from the fork point.
- Tell us what's different: Describe the divergence in an interview, allowing the AI to generate an entirely new act plot for the branch.
Enable the Plot Planner in Settings → Pipeline Roles to shape narrative direction before the Writer runs.
- Event-based mode (Recommended): Structures the story through narrative phases (introduction → rising action → climax → falling action → resolution). The Writer uses the
advance-phasetool to progress through phases based on milestone gating (narrative completion score, player divergence score, goal completion). Runs at a configurable reevaluation frequency (default every 10 scenes). - Guidance-based mode: Runs every turn with strong, Bethesda-style directional guidance.
You can import chat transcripts, world cards, and character profiles as new stories (supports Open WebUI JSON transcripts, Markdown, and text files).
- The multi-step wizard handles story details, acts, characters, and settings.
- Use the Preview step to review and remove individual messages before committing.
- Note: Importing long chat histories is a token-heavy process.
An advanced feature disabled by default (unavailable in the web app due to browser SQLite limitations).
- Requires both a Memory provider and an Embedding provider.
- Memory extraction runs automatically after narrative generation.
- Use the Memory Manager page to search past context by character, location, or both.
-
Dynamic Typography: Use
Ctrl+Scrollto adjust text size (70%–150%), or use the Aa slider in the sidebar. -
Themes: Choose from 23 color themes, plus System/Light/Dark modes.
-
Localization: Fully supported in English and Traditional Chinese (Hong Kong).
-
Text-to-Speech (TTS): Enable Kokoro-based TTS in Settings to read stories aloud (requires a one-time ~300MB WASM model download; English locales only).
-
Mobile Navigation:
-
Swipe right from the left edge to open the sidebar drawer.
-
Use the bottom tab bar to switch between Chat, Choices, and Menu.
-
Swipe right-to-left on stories/acts to Delete.
-
Swipe left-to-right on stories/acts to Rename.
Linux system dependencies: Tauri requires WebKit2GTK and related libraries:
sudo apt install -y libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
(If developing via WSL2, ensure Rust is installed directly within your WSL environment along with build-essential gcc make).
Start the Vite dev server (http://localhost:1420) and launch the Tauri hot-reload window:
npm install
npm run tauri dev
Build standalone platform binaries:
npm run tauri build
Build the standalone static Web App (SPA):
npm install
npm run build
The resulting build/ directory can be deployed to any static host (Netlify, Vercel, GitHub Pages) or served locally. App data is stored in the browser via OPFS (Origin Private File System). The web app is PWA-enabled and can be installed as a standalone application.
The preprocessor (src/lib/utils/dialogue-preprocessor.ts) applies highlighting with strict precedence: dialogue > highlighted-phrase > character-name. Each layer masks its regions so subsequent passes cannot match inside them.
When Phrase Highlighting is enabled, the MinorTaskAgent extracts important phrases in the background (fire-and-forget) after the Editor phase. Older messages are sequentially backfilled when an act line is loaded.
The sqlite-vec extension is globally registered via main.rs and available to JS queries.
- Schema Constraints: Requires explicit dimension definitions (e.g.,
float[768]). - IPC Limitations:
tauri-plugin-sqlIPC cannot bind binary BLOBs from JS. You must pass vectors as JSON strings. - Primary Keys: Use
last_insert_rowid()in SQL, as JS numbers bind asREALandvec0requires integers. - KNN Queries: When JOINing with other tables, use a subquery pattern to ensure the
LIMITapplies directly to thevec0virtual table scan.
Add the Windows GNU target and install the MinGW-w64 cross-compiler:
rustup target add x86_64-pc-windows-gnu
sudo apt install -y gcc-mingw-w64-x86-64 nsis
Build the .exe:
npm run tauri build -- --target x86_64-pc-windows-gnu
npx tauri android build --debugOutput: src-tauri/gen/android/app/build/outputs/apk/universal/debug/app-universal-debug.apk
For a specific device architecture:
npx tauri android build --debug --target aarch64The release keystore and Gradle signing config are already set up. Ensure src-tauri/gen/android/key.properties points to your keystore, then:
npx tauri android build --target aarch64APK output: src-tauri/gen/android/app/build/outputs/apk/aarch64/release/app-aarch64-release.apk
Install via File Manager or adb install -r <path-to-apk>.
AGPL-3.0-or-later. See LICENSE for details.








