Skip to main content

Hermes bus integration plugin — auto-start, auto-register, message injection, bus tools

Project description

hermes-bus-plugin

English | 中文

Hermes Agent plugin for message bus integration — lifecycle management, external message injection, bus tools.

A thin integration layer between Hermes Agent and the hermes-bus / hermes-notify packages.

Install

# Via Hermes plugin manager
hermes plugins install hermes-bus-plugin

# Or copy to ~/.hermes/hermes-agent/plugins/
cp -r hermes-bus-plugin ~/.hermes/hermes-agent/plugins/
hermes plugins enable hermes-bus-plugin

Session Naming

Each CLI window registers a unique bus endpoint on startup. The default endpoint is hermes-bus (first session), with hermes-bus-2, hermes-bus-3, etc. for additional sessions. To give your session a stable name that survives reconnection:

/title my-agent-name

The plugin uses the title set by /title as the bus endpoint name.

Action When Description
Start bus daemon Plugin load Ensures hermes-bus is running
Register listener Plugin load Opens a bus endpoint for incoming messages
Print notifications On bus message Messages matching notify.yaml rules with print: true are printed to terminal immediately
Inject context pre_llm_call Queued bus messages (matching rules with context: true) are injected into LLM context

Provided Tools

bus_send — send a message through the bus to any endpoint:

bus_send(target="notifier", type="progress", text="50% done")

bus_status — check bus health and connected endpoints:

bus_status()

bus_info — show current session's bus connection details:

bus_info()

Route Rules

Messages arriving at the bus are matched against ~/.hermes/bus-rules.yaml rules. Each rule can trigger three independent actions — all, some, or none:

Field Behavior Default
print Print to terminal immediately false
print_format Template for terminal output (see below) [{from}] {text}
context Inject into LLM context on next agent call false
command Execute shell command (audio, script, etc.) none

The three actions are independentprint: true and context: true and a command will all fire for the same message.

Print Format

print_format supports ANSI colors and placeholders:

Placeholder Description Example
{from} Sender endpoint name 银锭
{text} Message body text 任务完成
{type} Message type task_done
{ts} Unix timestamp (raw) 1744986323
{ts:%Y-%m-%d %H:%M:%S} strftime formatted 2026-05-18 17:45:23
{color:cyan} Foreground color black/red/green/yellow/blue/magenta/cyan/white
{color:bold_green} Bold color variant bold_red, bold_green, ...
{bold} Bold text
{reset} Reset all styles

Example rule with all three actions:

callbacks:
  - match_type: task_done
    print: true
    print_format: "{color:bold_green}✔ {from}{reset}  {color:cyan}[{ts:%H:%M:%S}]{reset}  {text}"
    context: true
    command: "afplay ~/sounds/done.mp3"

Requirements

  • hermes-bus (pip)
  • hermes-notify (pip)

Both are auto-detected — the plugin degrades gracefully if they're missing.

Architecture

External process ──→ hermes-bus ──→ hermes-bus-plugin ──→ LLM context
                        (socket)        (pre_llm_call hook)
                        
Hermes session ──→ bus_send tool ──→ hermes-bus ──→ target endpoint

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hermes_bus_plugin-0.3.2.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hermes_bus_plugin-0.3.2-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file hermes_bus_plugin-0.3.2.tar.gz.

File metadata

  • Download URL: hermes_bus_plugin-0.3.2.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for hermes_bus_plugin-0.3.2.tar.gz
Algorithm Hash digest
SHA256 e2303f1fbd2288c2da7734f224b953608c3fe320c207ed3a4982cdca23d082b7
MD5 fc7e4346a6a51ce54037c1406d488023
BLAKE2b-256 5a31eb7b324addececb5de78375a1a159ec99a2d86e65faa1c541de09bf45b59

See more details on using hashes here.

File details

Details for the file hermes_bus_plugin-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for hermes_bus_plugin-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 37d3fdf948dc281b5e3f9e7daa1550b87714a4ba490db1042cad3c1d1349ba46
MD5 18abbcc04cb9f14d592685ced8f4c2ea
BLAKE2b-256 f60befbe5bf08c10a9c4d7fb73ddbc1d22b428bb0fd818a8a6d6a4eb27754111

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page