memory-inhabit: Loading SoulPod into Agent for Character Dialogue

Introduction

In general Agents, the common approach for conducting dialogues with “fixed personas, memory retention, and plot progression” is to manually write a system prompt each time or stuff scattered settings into the context. When the materials grow extensive, maintenance and reuse become arduous. If you already possess a character package extracted from text and desire the Agent to load the persona, story baseline, and memory according to a unified directory structure rather than piecing things together on the fly, you might want to check out memory-inhabit on SkillHub (coordinates @user_570cbaaa/memory-inhabit, current version 1.1.7). It is oriented towards the consumer side of SoulPod (MI Packages): transforming packages under personas/<character_name>/ into conversational characters and distinguishing between Replication Mode and Companion Mode. Standard SoulPods are typically generated by the upstream Memory-Trace.

What is this

memory-inhabit (入心 Memory-Inhabit) is an Agent Skill with a community source and categorized as ai-agent. The SkillHub publisher is user_570cbaaa; the metadata author within the package is EvangelionA, licensed under MIT. Official Description: Load SoulPod packages to converse as characters; supports Replication Mode and Companion Mode; SoulPods are typically generated by Memory-Trace.

The division of labor with Memory-Trace is clearly defined in the SKILL: Trace is responsible for analyzing materials and producing SoulPods; this skill is responsible for loading persona files under personas/ (such as profile.json, system_prompts.txt, memories/, etc.). It is ready for use after being installed via forge.py install or manual copying. Project and product descriptions can be found on GitHub: Memory-Series/Trace-Inhabit and the Official Product Page.

SkillHub tags include requires_api_key=true: Basic dialogue relies on the Agent’s built-in model; capabilities such as text-to-image generation and some TTS require external API configuration (see below).

Core Features

Below are only the capabilities explicitly written in the package’s SKILL that can be verified.

SoulPod Structure and Story Baseline

Each character directory is a complete MI package, with core files including:

File Function
profile.json Basic info such as name, source type, appearance, etc.
system_prompts.txt Speaking style
config.json Runtime configuration
memories/raw_memories.json Memory fragments
prompt/universal_prompt.txt A universal prompt ready for direct use by ordinary LLMs
prompt/story_baseline.txt Current main plot, relationship status, dialogue tendencies (must be read after loading as the main axis of interaction)
assets/images/, assets/audio/ Text-to-image references, voice replication materials

profile.json is required to contain fields such as name, source_type (virtual / real), source, gender, appearance, etc., used for persona matching and TTS/drawing alignment.

Two Dialogue Modes

  • Replication Mode: Passive response, staying close to the character’s original temperament.
  • Companion Mode: Adds proactive care on top of replication; the documentation mentions that when pushing scheduled messages, there is a 10%–20% probability that a voice message will be included as a surprise.

Activation and Exit

In conversations within an Agent where the Skill is enabled, you can switch via natural language, for example:

  • Enter: I want to chat with [Name], Talk to [Name], Enter [Name] mode
  • Exit: Back to normal mode, Stop chatting

Pre-set example characters in the package include Xia Yizhou, Ye Xiu, Qin Che, etc. (see the SKILL character section for details).

Secret Diary

Exclusive to Inhabit: When dialogue concludes or at the end of the day, if conditions such as the number of messages for that day are met, scripts/diary.py can write the full text and displayable traces to the local personas/<character>/memories/diary/. The full text is not shown to the user; it will only be read out in the character’s tone (1-2 traces) when the user explicitly asks about intentions like “private thoughts.”

Text-to-Image and Voice (Optional)

  • User phrases like “send a selfie” or “show me yourself” can trigger text-to-image generation with appearance; “landscape” phrases can result in pure scene images. The implementation script is scripts/imggen.py, requiring the environment variable MINIMAX_API_KEY for generation.
  • TTS is driven by scripts/tts.py, supporting edge and minimax (can be specified via tts_provider in config.json); dependencies include pip install edge-tts==7.2.8.

Installation and Activation

1. Install SkillHub CLI (if not installed)

command -v skillhub && skillhub --version

If not installed, follow the SkillHub installation documentation, for example, for a full installation:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

See SkillHub Installation and Priority Source Configuration for instructions.

2. Install memory-inhabit into the current Agent’s skills directory

When installing, you must use --dir to point to the skills directory actually read by the current Agent; otherwise, if it defaults to ./skills/, it may not be recognized.

skillhub install memory-inhabit --namespace user_570cbaaa --dir <your skills directory>

Common path examples (subject to installation documentation):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

The SkillHub page also supports letting the Agent install @user_570cbaaa/memory-inhabit via https://skillhub.cn/install/skillhub.md.

3. Optional API and Python Dependencies

Set this when using MiniMax text-to-image:

export MINIMAX_API_KEY="<Your MiniMax API Key>"

Install the specified version for voice synthesis:

pip install edge-tts==7.2.8

After installing or updating the Skill, restart or refresh the Agent according to the requirements of your Client to ensure SKILL.md is loaded.

Typical Usage

Dialogue: Loading a Character

  1. Confirm the SoulPod under personas/<character_name>/ is complete (self-built characters can be produced by Memory-Trace, then copied or installed via forge.py install).
  2. Use activation phrases in the conversation to enter the character role, e.g.: I want to chat with Ye Xiu.
  3. The Agent reads story_baseline.txt, system_prompts.txt, and memory files according to the SKILL to reply; say Back to normal mode when you need to exit.

Secret Diary Flow (Maintainer / Agent executes per SKILL)

First, check if generation conditions are met:

cd <skill root directory>/scripts
python3 diary.py check <character>
python3 diary.py prepare-write <character>

Save after writing (example JSON passed via stdin):

python3 diary.py save <character> <<'EOF'
{"full": "# Secret Diary ...", "traces": ["……15-40 characters.", "……Optional second entry."]}
EOF

When the user asks about private thoughts, traces can be listed (outputting *.full.md is prohibited):

python3 diary.py list-traces <character> --limit 2

Text-to-Image and Voice (Command Line Assistance)

Preview or generate images:

python3 scripts/imggen.py prompt <character> <scene>
python3 scripts/imggen.py generate <character> <scene>

Generate voice files:

python3 scripts/tts.py "Text message" -o /tmp/voice.mp3
python3 scripts/tts.py "Text message" -o /tmp/voice.mp3 --provider edge

In dialogue, you can also trigger these directly with natural language (e.g., “send a voice message”, “send a selfie”), and the Agent will call the above scripts according to the SKILL.

Use Cases and Notes

Who is it for

  • Developers or creators who use or plan to use Memory-Trace to generate SoulPods and wish to unify “persona loading” in environments like Cursor, Claude Code, or Codex.
  • Users who require story baselines, memory fragments, companion-style proactive interaction, or local secret diary gameplay, and who accept the maintenance costs of fiction/fan-oriented settings.

Limitations and Notes

  • Pre-set characters and settings involve specific work IPs; users should handle copyright and platform rules themselves for private use; self-built characters should ensure material sources are legal.
  • requires_api_key=true: Without configuring MINIMAX_API_KEY, text-to-image and other capabilities are unavailable, but text-based character dialogue can still proceed based on the Agent model and prompts in the package.
  • The secret diary and memories/diary/ are local data; the documentation notes they should not be committed to Git; pay attention to backup and privacy during deployment.
  • SkillHub statistics (based on community page scraping): Rating 100000, Downloads 850, Installations 3; actual experience varies depending on the Agent, model, and whether APIs are configured.

Conclusion

memory-inhabit transforms SoulPods from “a pile of JSON and txt files” into executable character skills for Agents: unified directories, story baselines, dual-mode interaction, and extensibility to diaries, TTS, and text-to-image. If you already have a package produced by Trace, simply install it into the corresponding skills directory and activate it via natural language; if starting from scratch, it is recommended to understand Memory-Trace first before installing into personas/.

  • SkillHub: https://www.skillhub.cn/skills/user_570cbaaa/memory-inhabit
  • Official Coordinate Page: https://api.skillhub.cn/user_570cbaaa/memory-inhabit
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye