Skip to content

Showcase: hermes-companion — persona evolution + emotion state + ambient processing + proactive check-ins as a single zero-patch plugin (refs #11919 #22136 #9645 #13529) #28893

Description

@gejifeng

TL;DR

I built hermes-companion, a zero-patch plugin that bundles several long-standing community requests (persona evolution, ambient processing, proactive check-ins, emotional state exposure) into one cohesive "AI companion" layer on top of Hermes v0.12+.

Repo: https://github.com/gejifeng/Hermes_Soul_patch

This is a showcase / reference implementation, not a feature request — opening this so people watching the related issues below can find a working example, and so the Hermes team / community can give feedback or pull anything useful upstream.


What it implements (and which existing issues it relates to)

Feature Relates to
EMOTION_STATE.md injected into system prompt; valence/arousal/dominance auto-decays each turn; auto-inferred from conversation via the auxiliary LLM; drops on tool failure; /mood, /mood-set commands #13529 (Agent Activity API & Emotional State Exposure)
daily_seed (method C): fixed anchor events + persona-driven LLM augmentation written into world_state/events.json at each day rollover — SOUL.md effectively evolves day-to-day through lived events instead of being static #11919 (SOUL.md should evolve with usage)
Background heartbeat thread: idle-time emotion drift, periodic daydream candidates, arousal-threshold triggered proactive messages #22136 (Ambient "Daydreaming"), #9645 (Optional, Configurable Proactive Check-Ins)
LLM-callable agenda tools (agenda_add, agenda_done, agenda_ambient), /recall for past-day brief #12323-style daily summary use cases
Time awareness sub-module delegates entirely to hermes_time._resolve_timezone_name() — respects HERMES_TIMEZONE env / ~/.hermes/config.yaml — no duplicated logic sister extension https://github.com/gejifeng/hermes-time_perception-extension
All wired through the official plugin hook surface (pre_llm_call / post_llm_call / post_tool_call / on_start / on_shutdown) + slash commands — zero patches to Hermes core

87 unit tests, no external deps in the test path. Verified against the v0.12.x plugin hook surface.


Why post here

The features above each have their own open issue/discussion, but nobody (that I could find) has tried to wire them together end-to-end as a single plugin. Maybe this saves someone time, or surfaces gaps in the current plugin API that would be worth addressing upstream — e.g.:

  • Plugin-side proactive injection currently has to fall back to either ctx.inject_message from inside the process or a file-queue picked up by an external watcher; a first-class "plugin → gateway outbound" path (similar to Plugin system lacks webhook delivery extension point — plugins must patch core source code #15006) would make this much cleaner.
  • post_llm_call is the only practical hook for cheap auxiliary-LLM emotion inference; if auxiliary_client shape changes between versions, plugins like this break silently. A small stability contract there would help.

Happy to split anything useful into separate, focused issues if there's interest.


中文版

我做了一个零侵入的 Hermes 插件 hermes-companion,把社区里几个长期 open 的 feature request 拼接成一个完整的"AI 陪伴层",跑在 Hermes v0.12+ 上。

仓库:https://github.com/gejifeng/Hermes_Soul_patch

这不是新的 feature request,而是一个 showcase / 参考实现,发在这里是让关心下面这些 issue 的人能找到一个可运行的样例,也欢迎 Hermes 团队和社区给反馈或抽取有用的部分到上游。

对应到现有 issue:

87 个单测,测试路径无外部依赖。已对 v0.12.x 插件 hook 表面验证。

做这个过程中发现两个可能值得上游处理的小痛点:

  1. 插件侧发起主动消息目前只能 ctx.inject_message 或落文件队列+外部进程消费,缺一条"插件 → gateway 出站"的官方通路(与 Plugin system lacks webhook delivery extension point — plugins must patch core source code #15006 思路类似)。
  2. post_llm_call 是做廉价 auxiliary LLM 情绪推断的唯一可用 hook;如果 auxiliary_client 形状跨版本变动,这类插件会静默失效。有个轻量的稳定性约定会很有帮助。

如果其中任何一点有兴趣继续推进,我可以拆成单独的 focused issue。

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/pluginsPlugin system and bundled pluginstype/featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions