Install
openclaw skills install openclaw-tavernSillyTavern-compatible roleplay plugin with character cards, long memory, multimodal output (TTS/image), and Generative-Agents-style companion.
openclaw skills install openclaw-tavernA full-featured roleplay (RP) extension for OpenClaw with first-class SillyTavern asset compatibility, multimodal abilities, long-term memory, and a Generative-Agents-style Companion system.
When installed, this plugin registers the /rp slash command namespace and three OpenClaw hooks (message_received, before_prompt_build, llm_output) to provide an immersive, persistent roleplay experience across Discord, Telegram, and OpenClaw native chat.
active → paused → summarizing → ended) with per-session mutex, auto-summarization, and prompt budget trimming.Relevant Memory Recall. Built-in multilingual hashed embedder works out of the box without external APIs./rp speak (TTS), /rp image (image generation with style hints), and an optional rp_generate_image agent tool for native-agent use./rp companion-nudge and the companion_tick hook.clawhub install openclaw-rp-plugin
https://github.com/garfeildma/openclaw-tavernopenclaw-rp-plugin./rp help — if the command list appears, installation is complete.The plugin has two optional peer dependencies for enhanced functionality:
better-sqlite3 (≥9.0) — enables SQLite persistence for sessions, assets, summaries, and memory vectors. Without it, data is stored in memory only.js-tiktoken (≥1.0) — enables accurate cl100k token counting. Falls back to heuristic estimation without it.Install them in your OpenClaw workspace if needed:
npm install better-sqlite3 js-tiktoken
/rp import-card (attach a character card file)
/rp import-preset (attach a preset file)
/rp import-lorebook (attach a lorebook file, optional)
/rp start --card <card_name_or_id> --preset <preset_name_or_id> --lorebook <lorebook_name_or_id>
Send plain messages to continue the story. The plugin intercepts dialogue automatically through the registered hooks.
/rp session/rp pause / /rp resume/rp retry [--edit "..."]/rp end| Command | Description |
|---|---|
/rp help | Show full command list |
/rp import-card | Import a SillyTavern character card (PNG or JSON) |
/rp import-preset | Import a SillyTavern preset |
/rp import-lorebook | Import a SillyTavern lorebook / world |
/rp list-assets | List imported assets (--type, --search, --page) |
/rp show-asset <id> | Show asset details |
/rp delete-asset <id> --confirm | Delete an asset |
/rp start | Start a new RP session |
/rp session | Show current session status |
/rp retry [--edit "..."] | Regenerate last reply, optionally with edited user turn |
/rp speak | TTS of last assistant reply |
/rp image [--prompt] [--style] | Image generation from RP context |
/rp agent-image | Manage agent image tool settings |
/rp companion-nudge | Trigger proactive companion outreach |
/rp sync-agent-persona | Write current RP character into Agent SOUL.md |
/rp restore-agent-persona | Remove RP character from SOUL.md, restore original |
/rp pause / /rp resume / /rp end | Session lifecycle control |
Trigger a proactive companion interaction:
/rp companion-nudge --force --reason "evening emotional check-in" --mode balanced
/rp companion-nudge --idle-minutes 180 --mode checkin
Modes: balanced, checkin, question, report.
The companion_tick hook can be wired to a scheduler for automatic proactive check-ins.
api.config~/.openclaw/openclaw-rp/provider.jsonOPENCLAW_RP_LOCALE, OPENAI_*, GEMINI_*)Add to your OpenClaw config to expose rp_generate_image as an agent tool:
{
"plugins": {
"entries": {
"openclaw-rp-plugin": {
"config": {
"agentImage": {
"enabled": true,
"provider": "openai",
"imageModel": "gpt-image-1"
}
}
}
}
}
}
Then allow the tool in your agent config:
{
"tools": {
"profile": "messaging",
"alsoAllow": ["rp_generate_image"]
}
}
Supports Chinese (zh) and English (en). Resolution priority:
OPENCLAW_RP_LOCALE → provider.json locale → openclaw.json locale → system LANG → default zh.
export OPENCLAW_RP_LOCALE=en
better-sqlite3, js-tiktoken, ffmpeg (for PCM→MP3 transcoding)Key entry points:
src/openclaw/register.js — Native OpenClaw extension registration (hooks & commands)src/plugin.js — Plugin entry, hook wiringsrc/core/sessionManager.js — Session lifecycle, summaries, long memorysrc/core/commandRouter.js — /rp command routingsrc/core/promptBuilder.js — Prompt assembly and budget managementsrc/store/sqliteStore.js — SQLite persistence layer