About this project
Liyuan (Liyuan) is a role-playing application with AI Agent at its core, RP-ifying the agent's various functions to provide users with a good role-playing experience.
Core features include:
1. Memory optimization: By modifying the harness to raise the memory ceiling from the source, the architecture layer re-trims the context each round, filtering out intermediate redundant operations and retaining only the narrative text and snapshots. A four-layer memory structure is adopted: pure context (working memory) → structured ledger (sidecar model automatically logs each round: items, affection, time, foreshadowing) → retrievable assets (world book + knowledge base, fetched when needed) → narrative compression (generating recaps according to narrative logic).
2. Agent inquiry mode: At key plot points (new character definition, major turning points, etc.), the agent pops up a choice card, offering multiple conceptual directions and a free input box, allowing users to deeply participate and decide the plot direction, avoiding repeated regeneration.
3. Panel system: The agent can generate and update various panels in real time, such as equipment库, SVG maps, etc., visualizing the role-playing process.
4. Extensibility: Supports the agent's classic skill and MCP mechanisms, simplifying the implementation of complex extensions such as text-to-image generation.
5. Worldline system: Provides game-level save functionality (/store pin save, /back rollback, /line view worldline panorama). When rolling back, the entire world (narrative text, status ledger, map, equipment库, mounted knowledge base) consistently returns to that point in time, with zero loss in saves.
6. Knowledge base and material library: Supports co-creation of a custom knowledge base by the agent and user; the material library stores uploaded files and images in a VPS folder, attaching only the path in messages to reduce context occupancy.
7. Dual-agent separation: The plot model focuses on acting, while an independent "assistant" agent handles system affairs (diagnosing response quality, adjusting configuration, fixing the ledger, etc.). The assistant can be assigned a specific model separately and never writes the narrative text.
Compatibility: Supports direct import of PNG cards and JSON cards (including embedded world books in the card), import of JSON world books (blue-light constant/green-light keyword activation), import of jsonl old chat logs for continuation (automatically cleaning and stripping old status bars and chains of thought), preset import (including variable engine), regex scripts (display beautification compatibility), and running of program cards in HTML/JS sandbox. Not compatible with full STscript, direct UI rewriting of narrative text, or front-end plugins that rely on tavern DOM/themes. The project does not use any SillyTavern code, implementing format parsing independently according to open specifications.
Deployment options include a one-click installation script (systemd service), Docker Compose, and manual packaging upload, requiring Node.js≥22 and an OpenAI-compatible API key. License is PolyForm Noncommercial 1.0.0; source code is open for personal and non-commercial use.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.