Skip to content
Projects

About

Cross-platform virtual character immersive interaction engine

AI & Machine Learning

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README_EN.md

Original

Kokoro Engine banner

Kokoro Engine

Run an AI character on your desktop with a body, voice, and long-term memory.

Choose or import a character, connect your model provider, and start a conversation that can continue across sessions.

Telegram community Tauri v2 React 19 Rust MIT License

Download release · 10-minute setup · Troubleshooting · Architecture · Contributing


What you can do with Kokoro

  • Let a desktop character react to visible screen context.
  • Import SillyTavern character cards and keep separate conversations and memories.
  • Connect a local or cloud LLM, then opt into voice, vision, MCP, MOD, and bot features.

The current version includes three built-in characters, a main-screen selector, first-reply onboarding, and character management/import in Settings. See the character ecosystem design for the rationale.

What makes Kokoro Engine stand out

Kokoro Engine is not just a chat shell with a desktop pet skin. It is a complete desktop character runtime:

  • All-in-one: Live2D, LLM, TTS, and STT are integrated into one runtime loop.
  • Built for extensibility: a high-freedom MOD system and MCP protocol.
  • Local-first: local memory storage, offline-first behavior, and a controllable data path.
  • Developer-friendly & Zero-waste: Eliminates the notorious multi-gigabyte target/ bloat and disk exhaustion common in Rust/Tauri projects. Built-in closed-loop storage sentinel (KSS) automatically handles branch-switch orphan eviction, test artifact decay, and drive-level low-disk circuit breaking for a fast, lightweight dev experience.

Overview

Dimension Details
Target users virtual character creators, developers, and general users
Interaction modes text, voice, image, vision input, multimodal dialogue
Extension model MOD (HTML/CSS/JS + QuickJS), MCP servers
Tech stack React + TypeScript + Rust + Tauri v2 + SQLite
Language support 简体中文 / 繁體中文 / English / 日本語 / 한국어 / Русский

📸 UI screenshots

Homepage

Main screen

Settings

Settings screen

🚀 Quick start

Path 1: Download release (recommended)

Go to the Releases page, download the installer for your platform, and run it.

Path 2: Build from source

Requirements

Install and run

git clone https://github.com/chyinan/kokoro-engine.git
cd kokoro-engine
npm install
npm run tauri dev

If Cargo is absent from the inherited PATH, the Tauri launcher checks CARGO_HOME/bin and the user's .cargo/bin and makes the installed toolchain available to Tauri and its children. This also works in terminals or IDEs opened before Rust was installed.

💡 Developer-Friendly Note (100% Automated Storage Sentinel): Frequent Rust/Tauri dev cycles often cause build caches to swell beyond dozens of gigabytes and risk filling host disks. Kokoro Engine includes the Kokoro Storage Sentinel (KSS) for full-lifecycle closed-loop storage management: npm install auto-configures safe Git hooks, branch switching records a marker, and the next built-in npm dev command or manual prune evicts orphan caches, dev launches (npm run tauri dev or npm run dev) automatically maintain a 12 GB watermark with compiler lock yielding, test artifacts are scoped to a 30-minute grace window, and host drive space < 5 GB triggers emergency relief. Automatically checks and prunes before each dev launch, requiring zero manual cleanup commands. Run npm run storage:doctor anytime for an instant transparent health dashboard. See Developer Storage Full-Lifecycle & Fast Build Guide for details.

Build release

npm run tauri build

Path 3: Nix / Flakes (Linux only)

nix develop
npm install
npm run tauri dev

For more Nix usage, see docs/nix.md.

✨ Core capabilities

Character runtime

  • Live2D rendering, eye tracking, motion triggers, desktop floating mode.
  • Model hot-switching and interaction state recovery.

AI brain

  • Supports Ollama, llama.cpp, and protocol API interfaces compatible with OpenAI and Anthropic.
  • Codex Runtime — Experimental: an optional local runtime bridge using codex app-server --listen stdio:// to reuse the user's existing Codex authentication, model, and provider configuration. Kokoro does not read or store Codex credentials or modify Codex configuration. See the Codex Runtime documentation.
  • Supports multimodal input, context recall, long-term memory, and emotional state continuity.

Voice stack

  • TTS (text-to-speech): GPT-SoVITS, VITS, OmniVoice, OpenAI, Azure, ElevenLabs, Edge TTS, Browser TTS.
  • STT (speech-to-text): Whisper / faster-whisper / whisper.cpp / SenseVoice.
  • Supports VAD auto-stop and wake-word flow.

Extensibility

  • MOD framework: HTML/CSS/JS UI replacement + QuickJS script sandbox.
  • MCP support: connect MCP servers and call external tools.
  • Built-in official demo MOD: mods/genshin-theme.
  • Supports SillyTavern character card import.

Remote interaction

  • Built-in QQ, Telegram, Discord, LINE, and Webhook services.
  • AstrBot integration: connects AstrBot messages to Kokoro through an authenticated generic webhook, with character- and conversation-scoped text, image, and audio handling plus text/media replies. See the AstrBot integration guide.
  • Bridges the message types supported by each platform to the AI pipeline.

🏗️ Technical architecture

flowchart LR
  subgraph FE["Frontend (React + TypeScript)"]
    FE_UI["UI Layout Engine"]
    FE_REG["Component Registry"]
    FE_THEME["Theme & MOD UI"]
    FE_BRIDGE["kokoro-bridge.ts"]
    FE_UI --> FE_REG
    FE_REG --> FE_THEME
    FE_THEME --> FE_BRIDGE
  end

  subgraph IPC["Tauri Typed IPC"]
    IPC_INVOKE["invoke / events"]
  end

  subgraph BE["Backend (Rust / Tauri v2)"]
    BE_CMD["Commands Layer"]
    BE_ORCH["AI Orchestrator"]
    BE_MULTI["LLM / TTS / STT / Vision / ImageGen / MCP"]
    BE_MOD["MOD Runtime (QuickJS)"]
    BE_BOT["Bot Bridges (QQ / Telegram / Discord / LINE / Webhook)"]
    BE_CMD --> BE_ORCH
    BE_ORCH --> BE_MULTI
    BE_MOD --> BE_CMD
    BE_BOT --> BE_CMD
  end

  subgraph DATA["Data & Runtime Config"]
    DB[("SQLite: memories / summaries / conversations / characters")]
    CFG["Config Files: llm/tts/stt/vision/imagegen/mcp/bot"]
  end

  subgraph EXT["External Services"]
    EXT_LLM["OpenAI-Compatible / Anthropic / Ollama / llama.cpp / Codex Runtime"]
    EXT_TTS["TTS Providers"]
    EXT_MCP["MCP Servers"]
    EXT_BOT["QQ / Telegram / Discord / LINE / Webhook"]
  end

  FE_BRIDGE <--> IPC_INVOKE
  IPC_INVOKE <--> BE_CMD

  BE_MULTI <--> EXT_LLM
  BE_MULTI <--> EXT_TTS
  BE_MULTI <--> EXT_MCP
  BE_BOT <--> EXT_BOT

  BE_ORCH <--> DB
  BE_CMD <--> CFG
  • Frontend: declarative layout, component registry, theme system, MOD UI injection.
  • Backend: command modules + AI orchestration (LLM/TTS/STT/Vision/ImageGen/MCP).
  • Data layer: a local-first memory layer built on SQLite, persistently storing characters, conversations, summaries, and long-term memory, with embedding + FTS5 BM25 + RRF hybrid retrieval for stable long-term dialogue context; dream consolidation combines rule-based screening, LLM review, and scheduled/manual jobs to continuously govern duplicate, conflicting, and mergeable memories.

See docs/architecture.md for details.

🗺️ Roadmap

Current

  • Cross-platform stability and compatibility validation (Windows / Linux / macOS).
  • Deep testing of online service pipelines.
  • Ongoing optimization of memory and multimodal experience.

Next

  • Character marketplace / workshop.
  • Mobile support exploration (iOS / Android).
  • Stronger developer extension ecosystem.

🤝 Contributing

You can contribute in these ways:

  1. Pull requests: fix issues or add features.
  2. Issues: report bugs and propose improvements.
  3. Discussions: share ideas and practical experience.
  4. Design contributions: logo and visual assets are welcome.

💬 Community

👉 Kokoro Engine official Telegram group

👉 Kokoro Engine official QQ group: 810398532

❤️ Sponsor

👉 Sponsorship options / Sponsor

🎉 Special Thanks

Special thanks to all contributors for their contributions to Kokoro Engine.

@aegbirou
@aegbirou
@Initsnow
@Initsnow
@huwany1
@huwany1
@classical-coderrr
@classical-coderrr
@xilingjie
@xilingjie

📄 License

Core project code is licensed under MIT License.

⚠️ Live2D Cubism SDK notice

This project uses Live2D Cubism SDK, and related parts are owned by Live2D Inc. If you compile, distribute, or modify this project, you must comply with Live2D license terms:

Organizations with annual revenue above JPY 10 million may need a separate commercial license agreement with Live2D Inc.

⚠️ Bundled Live2D sample model notice

The bundled default model Hiyori Momose - PRO is official Live2D sample data. Use of this sample model is governed by the Live2D Free Material License Agreement and sample data terms:

Credits: Illustration: Kani Biimu / Modeling: Live2D. Do not modify Hiyori Momose's character design. Parties other than General Users or Small-Scale Enterprise Users should confirm whether additional permission from Live2D Inc. is required.


Kokoro Engine is an open-source project. Live2D is a registered trademark of Live2D Inc.

Star History

Star History Chart

Explore related projects

Loading…