The philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When building narratives or RPG experiences, you usually need to write code for each scene or maintain complex state machines. dsh-agentnoodle provides an alternative: build the game world as conversational context, dynamically managed by an agent.
Introduction¶
dsh-agentnoodle is a DSH plugin maintained by bigharm for an AI-driven ensemble chat game framework. It turns a single action or sentence into independent responses from 2–4 present NPCs in the scene, with each reaction rendered as a separate chat room message.
The plugin is adapted from the LazyNoodle project and supports managing the game world directly through conversation, allowing new features to be added or existing logic modified without writing code.
Core Features¶
- Ensemble Reactions: One action → AI selects 2–4 present NPCs to respond independently; each is rendered separately.
- Multiple Worlds: Each world has independent worldview / locations / NPCs / character saves.
- World Creation via Conversation: No coding required; create worlds and generate locations and NPCs directly in conversation.
- Extensible Framework: Worlds, locations, NPCs, and new features can all be added or modified by the agent in conversation.
- Avatar Illustrations: Each message displays the speaker’s avatar; if no avatar is available, a placeholder circle with the speaker’s initial is shown.
- Character Card and World Import: Compatible with SillyTavern character cards (V1/V2/V3 JSON or PNG) and LazyNoodle world directories.
- Local Persistence: JSON file saves; new locations unlocked by the AI are automatically registered in the location library.
- Model-Agnostic: Reuses default model routing from DeepSeek Harness; no additional API Key required.
Installation and Activation¶
Install via the command line:
dsh plugin --profile web add dsh-agentnoodle
After installation, restart dsh web. A 🍜 AgentNoodle Chat Room floating window appears in the bottom-right corner of the page. It can be dragged and minimized without disturbing the main interface.
Typical Usage¶
1. Create a New World¶
Call tools in conversation to create the world skeleton and define the worldview:
// 创建世界
agentnoodle_create_world(worldId, name, worldview)
// 生成内容
agentnoodle_generate_content(worldId, stage=locations) // 生成地点
agentnoodle_generate_content(worldId, stage=npcs) // 生成 NPC
2. Import Existing Data¶
- Character Cards: Call
agentnoodle_import_cardand paste SillyTavern JSON or a local PNG/JSON path. - Worlds: Call
agentnoodle_import_worldto import a LazyNoodle-style world directory.
3. Update Rules¶
Use agentnoodle_update_rules(worldId, rulesText) to set hard constraints. These rules are injected into a prominent position in the game prompt and are also followed during content generation (locations/NPCs).
Conversation Tool List¶
The following tools are registered as model tools and can be called directly by the agent:
| Tool | Purpose |
|---|---|
agentnoodle_create_world |
Create a new world |
agentnoodle_update_worldview |
Update the worldview text |
agentnoodle_generate_content |
Generate locations, NPCs, or both based on the worldview |
agentnoodle_list_worlds |
World overview; pass worldId to view details |
agentnoodle_add_location |
Manually add a location |
agentnoodle_add_npc |
Manually add an NPC (validates location ownership) |
agentnoodle_import_card |
Import a SillyTavern character card as an NPC |
agentnoodle_import_world |
Import a LazyNoodle-style world directory |
Rules and Constraints¶
- Hard Constraints: Rules added via
agentnoodle_update_rulesare injected into a prominent position in the prompt, take precedence over the worldview, and are followed during content generation. - Soft Constraints: Prompt-level rules (mostly followed by the AI).
- Code Extensions: Mechanisms requiring programmatic enforcement (death states, numeric systems, etc.) belong to plugin code extensions.
Data Structures¶
World data is stored in local JSON files, with the default path <dataDir>/worlds/<id>/.
<worldId>/
├── worldview.txt # 世界观设定
├── locations.json # 地点列表
├── npcs.json # NPC 列表
├── avatars/ # NPC 头像 PNG(可选)
└── sessions/characters/ # 角色存档
The plugin includes default data (such as the “Twilight Tavern” world) and automatically seeds it on first startup. To customize, configure dataDir in the profile’s cordis.patch.yml.
This plugin enables the construction of complex narrative worlds through conversation without writing code. For details and source code, visit the GitHub repository.