Skip to content

Hermes plugin uses only part of Hermes's plugin interface; its hooks also run in the gateway #232

Open

Description

Hermes plugin hooks run in both the CLI and the gateway (event hooks: "CLI + Gateway"). plugin/hermes uses only part of that. It follows only classic CLI and one-shot sessions, so gateway sessions (Discord, Telegram, the API server), sub-agents and cron get no micro-skills or loop guard (docstring). Tool pruning, the repository map and /te are not ported (README).

Hermes documents an interface for each missing piece:

  • Tool pruning: llm_request middleware can "replace effective provider kwargs before provider execution", and the request includes the tool definitions.
  • Repository map: the same pre_llm_call hook the plugin already uses for micro-skills.
  • Sub-agents: subagent_start passes parent_session_id and child_session_id.
  • /te: ctx.register_command "adds /name in CLI and gateway sessions" (plugins).

We ported this repository at 7042ea8 with these interfaces: DylDigitals/tokeneconomizer-for-hermes. It runs in gateway sessions and supports 39 of the 41 capabilities in its MATRIX.md, with 131 offline tests and real-session runs on Hermes 0.22.2. It cannot prune tools under the codex_app_server runtime or import old session history.

Related: #85. Would you take a PR that extends plugin/hermes, or would you rather link our adapter from its README section?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions