Skip to main content

Kiokuko(記憶庫) for Hermes Agent

日本語版

Kiokuko(記憶庫) is a memory plugin for Hermes Agent. It separates memories by person, conversation, and workspace, and keeps model-generated proposals pending until a human approves them.

During compaction and at the end of a conversation, Kiokuko stores only facts that can be rechecked against project files or configuration. The database is stored at $HERMES_HOME/kiokuko/kiokuko.db.

Kiokuko supports Python 3.11–3.14 and Hermes 0.21, including the current PM source contract tested at 88c60858468d7adee27a752242c7c507fa4129d0. Python 3.14 requires Hermes 0.21.4 or later in the 0.21 series; earlier hosts use an incompatible thread executor for memory synchronization.

Install with current Hermes PM

Current Hermes manages plugin code and Python dependencies together. Use this route for the Python 3.14 Gateway. Installing into an old venv/bin/python does not add a PM workspace member. The published 0.1.13 wheel excludes Python 3.14; these instructions require the 0.1.14 source distribution containing the native plugin entry point.

For the supplied, unpublished fix, extract hermes_kiokuko-0.1.14.tar.gz on the Gateway machine. Set PLUGIN_SOURCE to the extracted directory and HERMES_HOME to the profile served by that Gateway. Use the hermes launcher belonging to that installation:

export HERMES_HOME="/absolute/path/to/target/profile"
PLUGIN_SOURCE="/absolute/path/to/hermes_kiokuko-0.1.14"
test -f "$PLUGIN_SOURCE/plugin.yaml" && test -f "$PLUGIN_SOURCE/__init__.py" || exit 1
test ! -e "$HERMES_HOME/plugins/kiokuko-tools" || { echo 'Existing plugin: use its managed update/replacement procedure'; exit 1; }
mkdir -p "$HERMES_HOME/plugins"
cp -R "$PLUGIN_SOURCE" "$HERMES_HOME/plugins/kiokuko-tools"
hermes plugins enable kiokuko-tools || exit 1
hermes kiokuko setup
hermes kiokuko doctor --load-plugin

Approve dependency preparation when Hermes asks. A failure at enable means stop and resolve the PM error before running setup. When doctor reports ok: true and command registration succeeds, restart the Gateway serving this profile and check /commands. setup disables native MEMORY.md/USER.md use and preserves their files and existing Kiokuko data.

Once the repaired source is published, new installations can use:

hermes plugins install askdkc/kiokuko-ha --enable --yes-deps || exit 1
hermes kiokuko setup
hermes kiokuko doctor --load-plugin

This is a custom Git source; catalog listing is not required. --yes-deps explicitly approves dependency installation. Git installations update with hermes plugins update kiokuko-tools, then a Gateway restart. An archive copied manually has no tracked Git source; replace it through an approved source-install procedure rather than assuming plugins update can fetch it. /kiokuko-update in native mode gives the managed update instructions and never invokes pip.

The official catalog is a separate human-reviewed submission. This repository is not claimed to be catalog-listed or catalog-approved; legacy pip self-update code also requires a separate catalog-policy review. See Hermes plugin documentation and catalog submission requirements.

Legacy pip installation (Hermes without PM)

The procedures below apply only to older Hermes installations with a directly managed Python venv. Do not use them to modify a current PM-managed environment.

Install Kiokuko into the Python environment that actually runs the target Hermes process. For Gateway chats, use the interpreter in that Gateway's launch command or service configuration, keeping its venv path. $HOME/.hermes/hermes-agent/venv/bin/python is correct only if the Gateway uses it; installing there does not affect a Gateway running another Python.

Replace the path below with that interpreter. Confirm its path and version before installing:

export HERMES_PY="/absolute/path/to/gateway/python"
"$HERMES_PY" -c 'import sys; print(sys.executable); print(sys.version)'
if command -v uv >/dev/null 2>&1; then
  uv pip install --python "$HERMES_PY" --upgrade hermes-kiokuko
else
  "$HERMES_PY" -m pip install --upgrade hermes-kiokuko
fi

Initialize the profile:

: "${HERMES_PY:?Set HERMES_PY to the Python executable used by the target Hermes process}"
export HERMES_HOME="$HOME/.hermes"
cd "$HOME/.hermes/hermes-agent" || exit 1
"$HERMES_PY" -m hermes_kiokuko setup
"$HERMES_PY" -m hermes_kiokuko doctor

When doctor reports ok: true, restart Hermes. Native MEMORY.md and USER.md are disabled, but existing files are preserved.

When the profile is wrong

If you see active profile is 'main' together with Falling back to .../.hermes, set the active profile explicitly and run setup again:

: "${HERMES_PY:?Set HERMES_PY to the Python executable used by the target Hermes process}"
export HERMES_HOME="$HOME/.hermes/profiles/main"
cd "$HOME/.hermes/hermes-agent" || exit 1
"$HERMES_PY" -m hermes_kiokuko setup
"$HERMES_PY" -m hermes_kiokuko doctor

HERMES_HOME defines the profile boundary. Use the same value that Hermes uses to start the target profile; each profile has separate configuration, database, and sessions.

Update

After the Kiokuko command plugin has loaded, run these commands in the interactive Hermes CLI or a Gateway chat such as Discord or Telegram:

/kiokuko-update
/kiokuko-update status

The update runs in the background using Hermes's own Python interpreter, with the current profile explicitly passed as HERMES_HOME. It upgrades the PyPI package hermes-kiokuko (the repository is named kiokuko-ha). Profiles sharing that Python environment receive the same package update; profile settings and memory databases are left intact. Use /kiokuko-update retry after a failure. Gateway access follows Hermes command permissions.

/kiokuko-update requires pip in Hermes's Python environment. If it is unavailable, use the terminal procedure below with uv.

For the first upgrade from v0.1.0, or to update from a terminal:

: "${HERMES_PY:?Set HERMES_PY to the Python executable used by the target Hermes process}"
export HERMES_HOME="$HOME/.hermes/profiles/main" # Use your actual profile path
cd "$HOME/.hermes/hermes-agent" || exit 1
if command -v uv >/dev/null 2>&1; then
  uv pip install --python "$HERMES_PY" --upgrade hermes-kiokuko
else
  "$HERMES_PY" -m pip install --upgrade hermes-kiokuko
fi
"$HERMES_PY" -m hermes_kiokuko doctor

Wait for the update to finish, then restart the Hermes process. For Telegram/Discord, restart the Hermes Gateway process serving those chats: a new chat session does not reload the installed plugin code. No OS reboot is needed. If a service manages the Gateway, verify its launch interpreter too: restarting from a different terminal Python does not change the service configuration.

When /kiokuko-update returns Unknown command

The command is not registered in that Gateway. An unregistered update command cannot repair this state. Check configuration and registration from a terminal using the same Python and profile. This example targets main:

: "${HERMES_PY:?Set HERMES_PY to the Python executable used by the target Hermes process}"
export HERMES_HOME="$HOME/.hermes/profiles/main"
cd "$HOME/.hermes/hermes-agent" || exit 1
"$HERMES_PY" -m hermes_kiokuko setup
"$HERMES_PY" -m hermes_kiokuko doctor --load-plugin

--load-plugin loads configured Hermes plugins into this terminal process and checks ownership and registration of all four Kiokuko commands. Ordinary doctor does not load plugins and reports checked: false for command registration. Neither proves what the running Gateway loaded. The enabled label in hermes plugins list also describes configuration, rather than successful loading.

After both command_registration.ok: true and the overall ok: true, restart the Gateway serving the same profile:

"$HERMES_PY" -m hermes_cli.main --profile main gateway restart

Check that /commands in the chat lists kiokuko-update. If terminal registration succeeds but the Gateway still lacks the command, check the serving process's Python, profile, and restart target. If registration fails, inspect its diagnostics and the Gateway startup log for Failed to load plugin 'kiokuko-tools'. Older releases without --load-plugin need the normal terminal update above before this check. Missing pip affects the update after registration; it does not explain Unknown command.

When hermes_yaml is missing

hermes_yaml is Hermes's own hermes_yaml.py, not a Kiokuko dependency. If an editable install created before a Hermes update cannot find new root modules, Kiokuko adds the Hermes source tree belonging to the installed hermes_cli to the import path. It does not use files in the working directory or profile as a recovery source.

If loading still fails, check the Python and checkout used to run Hermes.

: "${HERMES_PY:?Set HERMES_PY to the Python executable used by the target Hermes process}"
cd "$HOME/.hermes/hermes-agent" || exit 1
test -f hermes_yaml.py || { echo 'Hermes source is missing hermes_yaml.py'; exit 1; }
"$HERMES_PY" -c 'import hermes_yaml; from hermes_cli.plugins import get_plugin_commands; print(hermes_yaml.__file__)'
"$HERMES_PY" -m hermes_kiokuko doctor --load-plugin

If Hermes requires this module but the file is absent, repair the missing or inconsistent Hermes source. If the file exists but dependencies such as ruamel.yaml are missing, repair them using Hermes's own installation procedure. Kiokuko does not inject an alternative YAML implementation or skip host compatibility checks. After the terminal checks pass, restart the target Gateway and verify commands in chat.

Manual wheel installation and recovery

Reinstallation is not required on every startup. Use the normal update procedure for published releases. Use this procedure only to install a supplied wheel, including an unpublished fix or a replacement build with the same version. PyPI updates do not include unpublished repository changes.

Transfer the wheel to the machine running Hermes and set WHEEL to its actual path; replace VERSION below with the supplied filename's version. Use the target profile's HERMES_HOME. The --no-deps option assumes Kiokuko's dependencies are already installed in this Hermes environment; omit it for a first installation that needs dependencies.

: "${HERMES_PY:?Set HERMES_PY to the Python executable used by the target Hermes process}"
export HERMES_HOME="$HOME/.hermes/profiles/main"
cd "$HOME/.hermes/hermes-agent" || exit 1

WHEEL="$HOME/hermes_kiokuko-VERSION-py3-none-any.whl"

if command -v uv >/dev/null 2>&1; then
  uv pip install --python "$HERMES_PY" --no-deps --reinstall "$WHEEL"
else
  "$HERMES_PY" -m pip install --no-deps --force-reinstall "$WHEEL"
fi

"$HERMES_PY" -c 'from plugins.memory import find_provider_dir; p = find_provider_dir("kiokuko"); print(p); assert p is not None'
"$HERMES_PY" -m hermes_kiokuko doctor

For a first installation, run setup for the target profile before doctor, as shown above. A detected directory confirms discovery in this CLI process; it does not prove the running Gateway loaded the package. After installation succeeds and doctor reports ok: true, restart the Hermes process serving the target profile. If detection returns None or doctor fails, see provider discovery and host diagnostics.

Explicit storage and approval

Send the entire message in this form to store the original text immediately. The body is limited to 600 characters.

@kiokuko remember --scope principal
Reply in Japanese.

Model proposals and natural-language requests such as “remember this” become pending candidates. Review and approve them from the CLI:

: "${HERMES_PY:?Set HERMES_PY to the Python executable used by the target Hermes process}"
"$HERMES_PY" -m hermes_kiokuko pending
"$HERMES_PY" -m hermes_kiokuko approve CANDIDATE_ID

kioku-curation rechecks verified project memories and lets you share selected items as Global memories within the same profile.

From an interactive Hermes CLI session in the project directory (v0.1.1+):

/kioku-curation
/kioku-curation select 1 3
/kioku-curation share
/kioku-curation confirm CODE

Replace CODE with the confirmation code shown after share. Use cancel to exit without sharing. Global memories are shared with every user and project in the profile. Gateway chats (DM/group) cannot use this administrative flow; run it from the local CLI. The terminal command is also available:

: "${HERMES_PY:?Set HERMES_PY to the Python executable used by the target Hermes process}"
"$HERMES_PY" -m hermes_kiokuko curation
# Or, when the venv bin directory is on PATH:
kioku-curation

See curation details, operational boundaries, and verification.

Optional API monitoring and experience memory

OrcaReplay records Hermes's OpenAI-compatible API requests and responses from the CLI and Gateway. With Node.js 22.12 or later installed, enable monitoring and check its status in the interactive Hermes CLI or a Gateway chat for the intended profile:

/kiokuko-monitor enable
/kiokuko-monitor status

Stop with /kiokuko-monitor disable.

Every completed turn schedules additional model extraction (up to four windows); useful experiences can be recalled automatically as unverified historical examples, separately from approved memory. Monitoring is initially disabled; traces are retained for at most seven days / 1 GiB per profile. See setup, model routing, boundaries and deletion. Optional derived lessons add evidence-based updates and conditional recall, with learning initially off. See learning controls and evaluation.

Optional task-profile memory

Local task-profile memory can recall explicit targets from completed CLI/DM requests without extra model calls. It defaults to off. Enable collection without displaying hints, then inspect its status:

python -m hermes_kiokuko task-profiles mode shadow
python -m hermes_kiokuko task-profiles status

Setup, modes, limits and deletion

Buffered research and diagnostics: /kiokuko-research <request> / /kiokuko-research status.

Metadata

Release files for hermes-kiokuko 0.1.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hermes-kiokuko 0.1.14
File Size Uploaded Provenance Actions
hermes_kiokuko-0.1.14.tar.gz 312.0 kB Without provenance Details for hermes_kiokuko-0.1.14.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hermes-kiokuko 0.1.14
File Interpreter ABI Platform Actions
hermes_kiokuko-0.1.14-py3-none-any.whl Python 3 none any Details for hermes_kiokuko-0.1.14-py3-none-any.whl

Total release size: 566.1 kB

Release files / hermes_kiokuko-0.1.14.tar.gz

Download URL hermes_kiokuko-0.1.14.tar.gz
Size 312.0 kB
Tags Source
SHA-256 checksum
How to use checksums
574ab1df3902e58b7a2de1be26bbd48654fe37fe6a499cbec77c48e783801e1b
BLAKE2b-256 checksum
How to use checksums
a709f1fed70315e7cae283e8fdbc98f588edbb71cf96d1a720c9c12c6cf9584c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / hermes_kiokuko-0.1.14-py3-none-any.whl

Download URL hermes_kiokuko-0.1.14-py3-none-any.whl
Size 254.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b795bdc19b0b3176a8d4be08f8ff304631e933642a3294798f34b23ffc5885c0
BLAKE2b-256 checksum
How to use checksums
0bdccece92d21e068bedfbac0ed3a43fa18277be550853cd8e27f02b9334b70d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for hermes-kiokuko 0.1.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page