PluginContext API
ctx.register_hook(hook_name: str, callback: Callable) -> Nonectx.register_command(name: str, handler: Callable, description: str = "", args_hint: str = "") -> Nonectx.register_cli_command( name: str, help: str, setup_fn: Callable, handler_fn: Callable | None = None, description: str = "",) -> Nonectx.register_tool(name, toolset, schema, handler, ...) -> NoneHandler signature for slash commands: fn(raw_args: str) -> str | None
(sync or async — both supported).
register_cli_command details (verified against hermes_cli/plugins.py)
Section titled “register_cli_command details (verified against hermes_cli/plugins.py)”Creates a hermes <name> ... terminal subcommand (distinct from in-session slash
commands, which use register_command).
setup_fn— receives anargparsesubparser (theArgumentParserobject added byadd_subparsers().add_parser(name, ...)). Use it to call.add_argument()or add further sub-subparsers. Return value is ignored.handler_fn— if provided, registered viasubparser.set_defaults(func=handler_fn). When Hermes dispatches the command it callsargs.func(args), sohandler_fnreceives the parsedargparse.Namespace. IfNone, the caller is expected to wireset_defaults(func=...)itself insidesetup_fn.description— optional long description stored in the command registry; not passed to argparse automatically.- Return value —
None. Registers metadata in_manager._cli_commands[name]; does not immediately add to the live parser (the manager wires parsers at startup).
hermes-telemetry is an independent community plugin for Hermes Agent. It is not affiliated with or endorsed by Nous Research.