Academy → Hermes FeaturesOfficial documentation · Arabic guidance

Plugins

الإضافات

Intermediate to advanced30 min readLesson 315 questions✓ 2026-08-18
Before you read

What this page is, and what it holds.

This page covers Plugins. It carries a source warning and takes about 30 minutes to read. A plugin runs with the agent's full permissions. Do not install one you cannot read.

11sections
25code examples
10tables
22commands
5,016source words
The official one-line description

Extend Hermes with custom tools, hooks, and integrations via the plugin system

What you will be able to do

Outcomes taken from this page, not a template.

  • Understand what الإضافات is and when you need it.
  • Run hermes plugins install and hermes plugins and understand what happens next.
  • Read the table and take only the row that applies to you.
  • Avoid the mistake the source warns about.
Identifiers you will meet

Exactly as they appear in Hermes.

Commands
  • hermes plugins install
  • hermes plugins
  • hermes plugins search
  • hermes plugins update
  • hermes plugins install user
  • hermes plugins list
  • hermes plugins enable
  • hermes plugins pack export
Page map

Jump to the part you need.

  1. 01Quick overview
  2. 02What plugins can do
  3. 03Plugin discovery
  4. 04Plugins are opt-in (with a few exceptions)
  5. 05Available hooks
  6. 06Plugin types
  7. 07Pluggable interfaces — where to go for each
  8. 08NixOS declarative plugins
  9. 09Managing plugins
  10. 10Injecting Messages
  11. 11Calling MCP servers from plugins
The full official page

Nothing summarised away.

The documentation body below is reproduced from the official source so commands and identifiers stay exact. Each section carries a short note describing what it contains.

Hermes has a plugin system for adding custom tools, hooks, and integrations without modifying core code.

If you want to create a custom tool for yourself, your team, or one project, this is usually the right path. The developer guide's Adding Tools page is for built-in Hermes core tools that live in tools/ and toolsets.py.

→ Build a Hermes Plugin — step-by-step guide with a complete working example.

Quick overview

Settings you configure once. Change one at a time so you can see what each does.

Drop a directory into ~/.hermes/plugins/ with a plugin.yaml and Python code:

Text5 lines
~/.hermes/plugins/my-plugin/
├── plugin.yaml      # manifest
├── __init__.py      # register() — wires schemas to handlers
├── schemas.py       # tool schemas (what the LLM sees)
└── tools.py         # tool handlers (what runs when called)

Start Hermes — your tools appear alongside built-in tools. The model can call them immediately.

Minimal working example

Here is a complete plugin that adds a hello_world tool and logs every tool call via a hook.

~/.hermes/plugins/hello-world/plugin.yaml

YAML3 lines
name: hello-world
version: "1.0"
description: A minimal example plugin

~/.hermes/plugins/hello-world/__init__.py

Python39 lines
"""Minimal Hermes plugin — registers a tool and a hook."""




def register(ctx):
    # --- Tool: hello_world ---
    schema = {
        "name": "hello_world",
        "description": "Returns a friendly greeting for the given name.",
        "parameters": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string",
                    "description": "Name to greet",
                }
            },
            "required": ["name"],
        },
    }

    def handle_hello(params, **kwargs):
        del kwargs
        name = params.get("name", "World")
        return json.dumps({"success": True, "greeting": f"Hello, {name}!"})

    ctx.register_tool(
        name="hello_world",
        toolset="hello_world",
        schema=schema,
        handler=handle_hello,
    )

    # --- Hook: log every tool call ---
    def on_tool_call(tool_name, params, result):
        print(f"[hello-world] tool called: {tool_name}")

    ctx.register_hook("post_tool_call", on_tool_call)

Drop both files into ~/.hermes/plugins/hello-world/, restart Hermes, and the model can immediately call hello_world. The hook prints a log line after every tool invocation.

The model-facing tool description belongs in schema["description"]. The optional ctx.register_tool(description=...) value is separate ToolEntry registry metadata: when omitted, it defaults to the schema description, but Hermes does not copy it back into a schema that lacks description. Prefer defining the text once in the schema. If you provide both values, keep them synchronized; the model sees the schema value.

Project-local plugins under ./.hermes/plugins/ are disabled by default. Enable them only for trusted repositories by setting HERMES_ENABLE_PROJECT_PLUGINS=true before starting Hermes.

What plugins can do

A lookup table. Do not read it all; find the row that applies to you.

Every ctx.* API below is available inside a plugin's register(ctx) function.

CapabilityHow
Add toolsctx.register_tool(name=..., toolset=..., schema=..., handler=...)
Add hooksctx.register_hook("post_tool_call", callback)
Add slash commandsctx.register_command(name, handler, description) — adds /name in CLI and gateway sessions
Dispatch tools from commandsctx.dispatch_tool(name, args) — invokes a registered tool with parent-agent context auto-wired
Add CLI commandsctx.register_cli_command(name, help, setup_fn, handler_fn) — adds hermes <plugin> <subcommand>
Inject messagesctx.inject_message(content, role="user", session_key=...) - see Injecting Messages ↗
Ship data filesPath(__file__).parent / "data" / "file.yaml"
Bundle skillsctx.register_skill(name, path) — namespaced as plugin:skill, loaded via skill_view("plugin:skill")
Gate on env varsrequires_env: [API_KEY] in plugin.yaml — prompted during hermes plugins install
Distribute via pip[project.entry-points."hermes_agent.plugins"]
Register a gateway platform (Discord, Telegram, IRC, …)ctx.register_platform(name, label, adapter_factory, check_fn, ...) — see Adding Platform Adapters
Register an image-generation backendctx.register_image_gen_provider(provider) — see Image Generation Provider Plugins
Register a video-generation backendctx.register_video_gen_provider(provider) — see Video Generation Provider Plugins
Register a context-compression enginectx.register_context_engine(engine) — see Context Engine Plugins
Route human approval promptsctx.register_approval_transport(name, present_fn) — see Approval transports ↗
Register a memory backendSubclass MemoryProvider in plugins/memory/<name>/__init__.py — see Memory Provider Plugins (uses a separate discovery system)
Run a host-owned LLM callctx.llm.complete(...) / ctx.llm.complete_structured(...) — borrow the user's active model + auth for a one-shot completion with optional JSON schema validation. See Plugin LLM Access
Call an MCP tool (capability-gated)ctx.call_mcp(server, tool, arguments, timeout=30) — see Calling MCP servers from plugins ↗
Register an inference backend (LLM provider)register_provider(ProviderProfile(...)) in plugins/model-providers/<name>/__init__.py — see Model Provider Plugins (uses a separate discovery system)

Plugin discovery

A lookup table. Do not read it all; find the row that applies to you.

SourcePathUse case
Bundled<repo>/plugins/Ships with Hermes — see Built-in Plugins
User~/.hermes/plugins/Personal plugins
Project.hermes/plugins/Project-specific plugins (requires HERMES_ENABLE_PROJECT_PLUGINS=true)
piphermes_agent.plugins entry_pointsDistributed packages
Nixservices.hermes-agent.extraPlugins / extraPythonPackagesNixOS declarative installs — see Nix Setup

Later sources override earlier ones on name collision, so a user plugin with the same name as a bundled plugin replaces it.

Plugin sub-categories

Within each source, Hermes also recognizes sub-category directories that route plugins to specialized discovery systems:

Sub-directoryWhat it holdsDiscovery system
plugins/ (root)General plugins — tools, hooks, slash commands, CLI commands, bundled skillsPluginManager (kind: standalone or backend)
plugins/platforms/<name>/Gateway channel adapters (ctx.register_platform())PluginManager (kind: platform, one level deeper)
plugins/image_gen/<name>/Image-generation backends (ctx.register_image_gen_provider())PluginManager (kind: backend, one level deeper)
plugins/memory/<name>/Memory providers (subclass MemoryProvider)Own loader in plugins/memory/__init__.py (kind: exclusive — one active at a time)
plugins/context_engine/<name>/Context-compression engines (ctx.register_context_engine())Own loader in plugins/context_engine/__init__.py (one active at a time)
plugins/model-providers/<name>/LLM provider profiles (register_provider(ProviderProfile(...)))Own loader in providers/__init__.py (lazily scanned on first get_provider_profile() call)

User plugins at ~/.hermes/plugins/model-providers/<name>/ and ~/.hermes/plugins/memory/<name>/ override bundled plugins of the same name — last-writer-wins in register_provider() / register_memory_provider(). Drop a directory in, and it replaces the built-in without any repo edits.

Plugins are opt-in (with a few exceptions)

A lookup table. Do not read it all; find the row that applies to you. Commands here: hermes plugins.

General plugins and user-installed backends are disabled by default — discovery finds them (so they show up in hermes plugins and /plugins), but nothing with hooks or tools loads until you add the plugin's name to plugins.enabled in ~/.hermes/config.yaml. This stops third-party code from running without your explicit consent.

YAML6 lines
plugins:
  enabled:
    - my-tool-plugin
    - disk-cleanup
  disabled:       # optional deny-list — always wins if a name appears in both
    - noisy-plugin

Three ways to flip state:

Shell3 lines
hermes plugins                    # interactive toggle (space to check/uncheck)
hermes plugins enable <name>      # add to allow-list
hermes plugins disable <name>     # remove from allow-list + add to disabled

After hermes plugins install owner/repo, you're asked Enable 'name' now? [y/N] — defaults to no. Skip the prompt for scripted installs with --enable or --no-enable.

For a reproducible install, pin a full immutable commit (tags, branches, and abbreviated SHAs are not accepted):

Shell1 line
hermes plugins install owner/repo --ref 0123456789abcdef0123456789abcdef01234567

Hermes checks out the commit detached, verifies that HEAD exactly matches the requested SHA, and records the canonical source, installed revision, and pin status in the current profile. hermes plugins update refuses to move a pinned plugin; choose a new exact commit explicitly with hermes plugins install <source> --force --ref <new-commit>. The profile-local install metadata contains no config values, environment values, secrets, or capability grants.

What the allow-list does NOT gate

Several categories of plugin bypass plugins.enabled — they're part of Hermes' built-in surface and would break basic functionality if gated off by default:

Plugin kindHow it's activated instead
Bundled platform plugins (IRC, Teams, etc. under plugins/platforms/)Auto-loaded so every shipped gateway channel is available. The actual channel turns on via gateway.platforms.<name>.enabled in config.yaml.
Bundled backends (image-gen providers under plugins/image_gen/, etc.)Auto-loaded so the default backend "just works". Selection happens via <category>.provider in config.yaml (e.g. image_gen.provider: openai).
Memory providers (plugins/memory/)All discovered; exactly one is active, chosen by memory.provider in config.yaml.
Context engines (plugins/context_engine/)All discovered; one is active, chosen by context.engine in config.yaml.
Model providers (plugins/model-providers/)All bundled providers under plugins/model-providers/ discover and register at the first get_provider_profile() call. The user picks one at a time via --provider or config.yaml.
Pip-installed backend pluginsOpt-in via plugins.enabled (same as general plugins).
User-installed platforms (under ~/.hermes/plugins/platforms/)Opt-in via plugins.enabled — third-party gateway adapters need explicit consent.

In short: bundled "always-works" infrastructure loads automatically; third-party general plugins are opt-in. The plugins.enabled allow-list is the gate specifically for arbitrary code a user drops into ~/.hermes/plugins/.

Approval transports

An approval transport changes where a human sees and answers an existing Hermes tool-approval request. It does not decide whether a command needs approval and it is not an authorization-policy API.

Python9 lines
def present(request):
    # Deliver request.command and request.description to your UI, wait for
    # its authenticated human response, then return a request-bound decision.
    choice = send_to_my_ui_and_wait(request)  # once/session/always/deny
    return request.respond(choice)


def register(ctx):
    ctx.register_approval_transport("my-ui", present)

present may be synchronous or async. Hermes runs it on a bounded worker and enforces the canonical approvals.timeout even if the plugin does not. The request is immutable and contains redacted display text, its host presentation class (cli or gateway), the host timeout, allowed choices, and an opaque request ID/digest. Return the result of request.respond(choice); unbound dictionaries and stale or changed request IDs/digests are rejected. A plugin cannot return a scope that the host did not offer (for example, always on a once-only request).

Registration alone does nothing. Enabling the plugin and explicitly selecting its transport are separate consent steps:

YAML7 lines
plugins:
  enabled: [my-approval-plugin]

security:
  approval:
    transport: my-ui
    transport_fallback: deny     # default

Transport exceptions, timeouts, unavailable registrations, invalid choices, and stale responses deny by default. To deliberately show the prompt on the ordinary CLI/TUI/gateway/ACP surface when the selected transport fails, set transport_fallback: builtin. Without that exact opt-in, Hermes never materializes the prompt on another surface.

Hermes still owns hardline blocks, sudo-stdin protection, user deny rules, request binding, allowed scopes, persistence, hooks, and final authorization. Hardline commands are blocked before any transport callback. There is intentionally **no plugin approval policy, auto-allow callback, or required pre_tool_call policy** in this interface. A future approval-policy capability may use the plugin capability-consent model, but transport selection does not grant it.

Migration for existing users

When you upgrade to a version of Hermes that has opt-in plugins (config schema v21+), any user plugins already installed under ~/.hermes/plugins/ that weren't already in plugins.disabled are automatically grandfathered into plugins.enabled. Your existing setup keeps working. Bundled standalone plugins are NOT grandfathered — even existing users have to opt in explicitly. (Bundled platform/backend plugins never needed grandfathering because they were never gated.)

Available hooks

Explains the idea itself. Read it slowly; the later sections build on it.

Plugins can register the 26 lifecycle events currently accepted by hermes_cli.plugins.VALID_HOOKS. The Event Hooks catalog is canonical for exact timing, return handling, payload fields, and privacy notes.

Descriptive categoryShipped hooks
Directive/controlpre_tool_call, pre_llm_call, pre_verify, pre_gateway_dispatch
Transformtransform_tool_result, transform_terminal_output, transform_llm_output, pre_transcription
Observerpost_tool_call, post_llm_call, pre_api_request, post_api_request, api_request_error, on_stream_start, on_stream_delta, on_stream_end, on_interim_message, on_session_start, on_session_end, on_session_finalize, on_session_reset, on_skill_lifecycle, subagent_start, subagent_stop, pre_approval_request, post_approval_response, pre_command, kanban_task_claimed, kanban_task_completed, kanban_task_blocked

These categories describe current behavior rather than defining future naming rules. Plugin middleware remains a separate registry/surface.

Plugin types

A lookup table. Do not read it all; find the row that applies to you.

Hermes has four kinds of plugins:

TypeWhat it doesSelectionLocation
General pluginsAdd tools, hooks, slash commands, CLI commandsMulti-select (enable/disable)~/.hermes/plugins/
Memory providersReplace or augment built-in memorySingle-select (one active)plugins/memory/
Context enginesReplace the built-in context compressorSingle-select (one active)plugins/context_engine/
Model providersDeclare an inference backend (OpenRouter, Anthropic, …)Multi-register, picked by --provider / config.yamlplugins/model-providers/

Memory providers and context engines are provider plugins — only one of each type can be active at a time. Model providers are also plugins, but many load simultaneously; the user picks one at a time via --provider or config.yaml. General plugins can be enabled in any combination.

Pluggable interfaces — where to go for each

A lookup table. Do not read it all; find the row that applies to you.

The table above shows the four plugin categories, but within "General plugins" the PluginContext exposes several distinct extension points — and Hermes also accepts extensions outside the Python plugin system (config-driven backends, shell-hooked commands, external servers, etc.). Use this table to find the right doc for what you want to build:

Want to add…HowAuthoring guide
A tool the LLM can callPython plugin — ctx.register_tool()Build a Hermes Plugin · Adding Tools
A lifecycle hook (pre/post LLM, session start/end, tool filter)Python plugin — ctx.register_hook()Hooks reference · Build a Hermes Plugin
A slash command for the CLI / gatewayPython plugin — ctx.register_command()Build a Hermes Plugin · Extending the CLI
A subcommand for hermes <thing>Python plugin — ctx.register_cli_command()Extending the CLI
A bundled skill that your plugin shipsPython plugin — ctx.register_skill()Creating Skills
An inference backend (LLM provider: OpenAI-compat, Codex, Anthropic-Messages, Bedrock)Provider plugin — register_provider(ProviderProfile(...)) in plugins/model-providers/<name>/Model Provider Plugins · Adding Providers
A gateway channel (Discord / Telegram / IRC / Teams / etc.)Platform plugin — ctx.register_platform() in plugins/platforms/<name>/Adding Platform Adapters
A memory backend (Honcho, Mem0, Supermemory, …)Memory plugin — subclass MemoryProvider in plugins/memory/<name>/Memory Provider Plugins
A context-compression strategyContext-engine plugin — ctx.register_context_engine()Context Engine Plugins
An image-generation backend (DALL·E, SDXL, …)Backend plugin — ctx.register_image_gen_provider()Image Generation Provider Plugins
A video-generation backend (Veo, Kling, Pixverse, Grok-Imagine, Runway, …)Backend plugin — ctx.register_video_gen_provider()Video Generation Provider Plugins
A TTS backend (any CLI — Piper, VoxCPM, Kokoro, xtts, voice-cloning scripts, …)Config-driven (recommended) — declare under tts.providers.<name> with type: command in config.yaml. OR Python backend plugin — ctx.register_tts_provider() for Python-SDK / streaming engines that need more than a shell template.TTS Setup · Python plugin guide
An STT backend (any CLI — whisper.cpp, custom whisper binary, local ASR CLI)Config-driven (recommended) — declare under stt.providers.<name> with type: command in config.yaml, or set HERMES_LOCAL_STT_COMMAND for the legacy single-command escape hatch. OR Python backend plugin — ctx.register_transcription_provider() for Python-SDK engines (OpenRouter, SenseAudio, Gemini-STT, etc.).STT Setup · Python plugin guide
External tools via MCP (filesystem, GitHub, Linear, Notion, any MCP server)Config-driven — declare mcp_servers.<name> with command: / url: in config.yaml. Hermes auto-discovers the server's tools and registers them alongside built-ins.MCP
Additional skill sources (custom GitHub repos, private skill indexes)CLI — hermes skills tap add <repo>Skills Hub · Publishing a custom tap
Gateway event hooks (fire on gateway:startup, session:start, agent:end, command:*)Drop HOOK.yaml + handler.py into ~/.hermes/hooks/<name>/Event Hooks
Shell hooks (run a shell command on events — notifications, audit logs, desktop alerts)Config-driven — declare under hooks: in config.yamlShell Hooks

NixOS declarative plugins

Commands you type in a terminal. Understand what one does before copying it. Commands here: hermes plugins install.

On NixOS, plugins can be installed declaratively via the module options — no hermes plugins install needed. See the Nix Setup guide for full details.

NIX8 lines
services.hermes-agent = {
  # Directory plugin (source tree with plugin.yaml)
  extraPlugins = [ (pkgs.fetchFromGitHub { ... }) ];
  # Entry-point plugin (pip package)
  extraPythonPackages = [ (pkgs.python312Packages.buildPythonPackage { ... }) ];
  # Enable in config
  settings.plugins.enabled = [ "my-plugin" ];
};

Declarative plugins are symlinked with a nix-managed- prefix — they coexist with manually installed plugins and are cleaned up automatically when removed from the Nix config.

Managing plugins

Carries a warning. Read it before running anything here. Commands here: hermes plugins, hermes plugins list. The upstream warning appears below.

Shell12 lines
hermes plugins                               # unified interactive UI
hermes plugins list                          # table: enabled / disabled / not enabled
hermes plugins search <term>                 # search the community plugin index
hermes plugins install <name>                # install by index name (resolved to repo @ pinned ref)
hermes plugins install user/repo             # install from Git, then prompt Enable? [y/N]
hermes plugins install user/repo --enable    # install AND enable (no prompt)
hermes plugins install user/repo --no-enable # install but leave disabled (no prompt)
hermes plugins update my-plugin              # pull latest (local edits are autostashed and re-applied)
hermes plugins remove my-plugin              # uninstall
hermes plugins enable my-plugin              # add to allow-list
hermes plugins disable my-plugin             # remove from allow-list + add to disabled
hermes plugins capabilities [my-plugin]      # declared vs granted capabilities

Plugins can declare the privileged host surfaces they want in their plugin.yaml:

YAML4 lines
name: my-plugin
capabilities:
  - tools.override        # replace built-in tools
  - llm.model_override    # pick the model for host-owned LLM calls

When a plugin declares capabilities, hermes plugins install (and hermes plugins enable) shows the list with one-line risk descriptions and asks once. Consenting records the grant under plugins.entries.<id>.granted_capabilities together with a consent hash and timestamp. Declining leaves the plugin enabled with those capabilities off — a well-behaved plugin probes with ctx.has_capability() and degrades gracefully.

Update re-consent: if a plugin update declares capabilities you haven't granted, hermes plugins update surfaces the additions and asks again. New capabilities stay off until you consent — a plugin update can never silently widen its access.

Non-interactive sessions fail closed: installing or updating without a TTY completes the install, but declared capabilities are not granted. Run hermes plugins enable <id> interactively to grant them later.

Inspect the state at any time:

Shell2 lines
hermes plugins capabilities             # all plugins with declared/granted capabilities
hermes plugins capabilities my-plugin   # one plugin, declared vs granted

Capability ids map 1:1 to the older per-feature config gates, which keep working but are deprecated in favor of the consent flow:

CapabilityLegacy key (plugins.entries.<id>.…)
tools.overrideallow_tool_override
llm.provider_overridellm.allow_provider_override
llm.model_overridellm.allow_model_override
llm.agent_id_overridellm.allow_agent_id_override
llm.profile_overridellm.allow_profile_override
llm.task_overridellm.allow_task_override
gateway.platform_actionsallow_platform_actions

A gate is open when either the capability is granted or the legacy key is set — existing configs keep working unchanged.

Platform actions

ctx.platform_actions gives a plugin a minimal, capability-gated verb set for acting on connected chat platforms through the live gateway adapter registry — the sanctioned alternative to monkeypatching an adapter. **It is off by default**: every call re-checks the gateway.platform_actions capability (legacy key plugins.entries.<id>.allow_platform_actions), and an ungranted call returns a structured error instead of acting.

v1 verbs (both async, both return a plain dict, and neither ever raises into hook dispatch):

Python8 lines
result = await ctx.platform_actions.add_reaction(
    platform="telegram", chat_id="-100123", message_id="456", emoji="👍",
)
result = await ctx.platform_actions.set_thread_title(
    platform="discord", chat_id="123", thread_id="456", title="New title",
)
if not result["ok"]:
    print(result["error"], result.get("detail"))

Success is {"ok": True, "action": <verb>}. Failures are {"ok": False, "error": <code>, "detail": <str>} with stable error codes: capability_not_granted, invalid_argument, gateway_unavailable, unknown_platform, adapter_not_registered, adapter_disconnected, unsupported_platform_action, action_failed. Actions validate that the target adapter exists and is connected before acting; a disconnected or missing adapter degrades to a structured error, never an exception.

Platforms supported in v1: Telegram and Discord. Telegram's add_reaction sets the bot's reaction (the Bot API replaces a previous bot reaction rather than stacking). Every action — allowed or denied — is written to the log with the plugin id, verb, platform, and outcome.

Discovering community plugins

hermes plugins search <term> searches the community plugin index — a static, machine-readable JSON catalog of community plugins. Matching is fuzzy across name, description, and tags:

Shell5 lines
hermes plugins search telegram               # fuzzy search
hermes plugins search                        # browse the whole index
hermes plugins search --capability platform  # filter by declared capability
hermes plugins search media --json           # machine-readable output
hermes plugins search --refresh              # bypass the 24h local cache

Once you've found a plugin, install it by bare name — the name is resolved through the index to its owner/repo plus the index-pinned commit:

Shell1 line
hermes plugins install hermes-media-studio

If a name matches more than one entry, the candidates are listed and nothing is installed. Explicit owner/repo or Git-URL identifiers never touch the index and keep working exactly as before. An explicit --ref <sha> always overrides the index pin.

How the index is fetched. The index lives at a canonical URL (https://raw.githubusercontent.com/NousResearch/hermes-plugin-index/main/index.json, overridable via hermes config set plugins.index_url <url>). Fetches are cached under ~/.hermes/cache/plugin_index.json for 24 hours; when the remote is unreachable the stale cache is used, and when there is no cache at all a bundled seed copy ships with Hermes — so search works fully offline.

Index entry format. Each entry is a JSON object:

JSON13 lines
{
  "name": "hermes-media-studio",
  "description": "Generative media workspace plugin.",
  "author": "NousResearch",
  "tags": ["media", "image-gen"],
  "repo": "NousResearch/hermes-media-studio",
  "ref": "<40-char commit SHA>",
  "subdir": null,
  "homepage": "https://github.com/NousResearch/hermes-media-studio",
  "capabilities": ["tools", "dashboard"],
  "api_version": 1,
  "added_at": "2026-08-12"
}

repo is the owner/name GitHub identifier, ref pins an immutable commit SHA, and optional subdir supports monorepos. The bundled seed file (hermes_cli/data/plugin_index.json in the repo) is the format reference.

Submitting a plugin. The index is maintained as a plain JSON file — submit a pull request to the hermes-plugin-index ↗ repository adding your entry (name, description, author, tags, owner/repo, and a pinned commit SHA). Review covers the entry's metadata only.

Plugin packs

A plugin pack is a declarative, shareable YAML file (hermes-pack.yaml) that pins a set of plugins — like sharing a modpack. Installing a pack fans out to ordinary pinned installs; nothing new exists at runtime.

YAML14 lines
name: voice-assistant-pack
description: STT + streaming TTS + approval relay
author: hyper
version: 1.0.0
plugins:
  - name: hermes-media-studio            # bare community-index name…
    ref: e8d59971d2b7901405b39dac7b03bdd616272d0d
  - repo: owner/approval-relay           # …or explicit owner/repo (or git URL)
    ref: 8f3c2d1a9b4e5f6071829304a5b6c7d8e9f00112
    subdir: plugins/relay                # optional monorepo path
config:                                  # optional, non-secret seeds only
  hermes-media-studio:
    default_model: flux-3
skills: []                               # declared list only (not auto-installed yet)
Shell4 lines
hermes plugins pack show ./hermes-pack.yaml     # dry-run review
hermes plugins pack install ./hermes-pack.yaml  # review → confirm → install
hermes plugins pack export > hermes-pack.yaml   # snapshot the current install
hermes plugins pack export --enabled-only       # only plugins.enabled

Supply-chain posture. Every entry's ref must be an exact 40-character commit SHA — tags and branch names are rejected with an error naming the entry, the same rule as the community index. Pack installs ride the exact same pinned install path as hermes plugins install --ref <sha> and record the same provenance in plugins/.install-metadata.json, so two installs of the same pack resolve identically. Packs build on the manifest v2 fields (manifest_version, api_version, requires_plugins) — each plugin's own manifest still validates through the normal install path.

Consent is never bulk-granted. pack install shows a mandatory review screen (every plugin, source, pinned ref, and the capabilities it declares), then asks one confirmation for the pack contents. After that, each plugin's declared capabilities go through the standard per-plugin capability-consent prompt — identical to a single hermes plugins install. There is no --yes, and non-interactive sessions cannot install packs.

Secrets never travel in packs. config: seeds are limited to non-secret plugins.entries.<id> keys — secret-shaped key names (*token*, *key*, *password*, …), capability grants, and the deprecated allow_* trust gates are rejected on install and stripped on export. Plugins that need secrets declare them in their own requires_env, which prompts during install as usual. Existing user values in plugins.entries.<id> always win over pack seeds.

Partial failure. Each plugin installs independently; failures are reported per plugin, the rest continue, and the command exits non-zero if any plugin failed.

Export caveats. pack export only includes plugins with known Git provenance (installed via hermes plugins install). Local-only plugins are listed as warning comments in the emitted YAML, not as installable entries.

The skills: list is parsed and displayed at install time but not yet auto-installed — install those manually for now (hermes skills). Wiring skill-hub ids into pack install is a documented follow-up seam.

Install-time security scanning

Every hermes plugins install and hermes plugins update runs a static security scan over the plugin tree before it is activated (inspired by Claude Cowork's skill & plugin security scanning). The scanner reuses the same threat-pattern engine as the Skills Hub guard — exfiltration of credential stores, reverse shells, destructive commands, persistence mechanisms, obfuscated execution, and prompt injection in documentation files — with plugin-aware exemptions: a provider plugin reading its own API key from the environment (the documented requires_env pattern) is not flagged.

Three verdicts, matching Cowork's pass/warn/fail:

VerdictBehavior
safeInstalls normally, no extra output
cautionFindings are shown; you confirm Install anyway? [y/N] (or pass --force)
dangerousBlocked. --force does not override

On hermes plugins update, a dangerous verdict on the updated tree disables the plugin until you review the findings and re-enable it.

Scanning is on by default; disable it in config.yaml:

YAML2 lines
plugins:
  scan_on_install: false

Interactive UI

Running hermes plugins with no arguments opens a composite interactive screen:

Text11 lines
Plugins
  ↑↓ navigate  SPACE toggle  ENTER configure/confirm  ESC done

  General Plugins
 → [✓] my-tool-plugin — Custom search tool
   [ ] webhook-notifier — Event hooks
   [ ] disk-cleanup — Auto-cleanup of ephemeral files [bundled]

  Provider Plugins
     Memory Provider          ▸ honcho
     Context Engine           ▸ compressor
  • General Plugins section — checkboxes, toggle with SPACE. Checked = in plugins.enabled, unchecked = in plugins.disabled (explicit off).
  • Provider Plugins section — shows current selection. Press ENTER to drill into a radio picker where you choose one active provider.
  • Bundled plugins appear in the same list with a [bundled] tag.

Provider plugin selections are saved to config.yaml:

YAML5 lines
memory:
  provider: "honcho"      # empty string = built-in only

context:
  engine: "compressor"    # default built-in compressor

Enabled vs. disabled vs. neither

Plugins occupy one of three states:

StateMeaningIn plugins.enabled?In plugins.disabled?
enabledLoaded on next sessionYesNo
disabledExplicitly off — won't load even if also in enabled(irrelevant)Yes
not enabledDiscovered but never opted inNoNo

The default for a newly-installed or bundled plugin is not enabled. hermes plugins list shows all three distinct states so you can tell what's been explicitly turned off vs. what's just waiting to be enabled.

In a running session, /plugins shows which plugins are currently loaded.

Injecting Messages

Carries a warning. Read it before running anything here. The upstream warning appears below.

Plugins can inject messages into a CLI conversation or a known gateway session using ctx.inject_message():

Python9 lines
# Active CLI conversation
ctx.inject_message("New data arrived from the webhook", role="user")

# Existing gateway conversation
ctx.inject_message(
    "New data arrived from the webhook",
    role="user",
    session_key="agent:main:telegram:dm:123456789",
)

Signature: ctx.inject_message(content: str, role: str = "user", *, session_key: str | None = None) -> bool

In CLI mode:

  • If the agent is idle (waiting for user input), the message is queued as the next input and starts a new turn.
  • If the agent is mid-turn (actively running), the message interrupts the current operation — the same as a user typing a new message and pressing Enter.
  • For non-"user" roles, the content is prefixed with [role] (e.g. [system] ...).
  • Returns True if the message was queued successfully.

In gateway mode:

  • session_key is required and must identify an existing gateway session. It is the stable routing key, not the CLI session ID.
  • Hermes reuses that session's stored platform, chat, thread, profile, and conversation history. Plugins cannot supply a new chat route through this API.
  • Hermes rechecks the stored route against the gateway's current authorisation rules before dispatch.
  • Routes that relied only on an adapter-time or upstream authorisation decision are rejected unless Hermes can revalidate them from current core allowlists, pairing, or explicit allow-all configuration.
  • Injected text is always conversational input. It cannot invoke slash commands, approve tools, or resolve pending confirmation and clarification prompts.
  • The route and conversation are pinned while dispatch is pending. Hermes drops the request if topic recovery changes the route or the session rotates before handling starts.
  • The request enters the platform adapter's normal message path. Active sessions use the existing busy-session queue rather than starting a competing turn.
  • Returns True when the live gateway accepts the request for asynchronous dispatch. This does not confirm that the agent turn or platform delivery has completed.
  • Returns False when session_key is omitted, the permission is not granted, or no live gateway can accept the request. Unknown or unroutable session keys discovered after asynchronous acceptance are written to the gateway log.

This enables plugins like remote control viewers, messaging bridges, or webhook receivers to feed messages into the conversation from external sources.

Gateway injection can send an agent response to an external messaging platform. It is disabled by default for every plugin. Grant it per plugin in config.yaml:

YAML4 lines
plugins:
  entries:
    my-plugin:
      allow_gateway_injection: true

Calling MCP servers from plugins

Carries a warning. Read it before running anything here. The upstream warning appears below.

ctx.call_mcp() lets a plugin call a tool on one of the user's configured MCP servers — synchronously, from any hook or tool handler — routing through Hermes' existing native MCP client (same connections, trust-tier gates, circuit breaker, and reconnect logic as model-invoked MCP tools; never a parallel client).

Python10 lines
result = ctx.call_mcp(
    "knowledge_rag",            # server name from mcp.servers
    "query_knowledge",          # tool on that server
    {"query": "deploy runbook"},
    timeout=30,                 # seconds; clamped to 1–600
)
if result["ok"]:
    print(result["result"])
else:
    print("MCP error:", result["error"])

Signature: ctx.call_mcp(server: str, tool: str, arguments: dict | None = None, timeout: float = 30) -> dict

Returns a stable envelope: {"ok": True, "result": ...} (plus structuredContent when the server provides it) or {"ok": False, "error": "..."}. Results over ~64 KB are truncated and flagged with "truncated": True.

Security: default-off, per-server allowlist

A plugin has no MCP access by default. The operator must grant each server explicitly in config.yaml:

YAML4 lines
plugins:
  entries:
    my-plugin:
      mcp_allowlist: ["knowledge_rag", "github"]
  • Calling a server not in the list raises PermissionError naming the exact config key to set.
  • The grant is per-server and per-plugin — never ambient authority over every configured server, and "*" wildcards are not honored.
  • Every call has an enforced timeout (default 30 s) so a hung MCP server cannot stall the hook or tool pipeline that invoked it.
  • MCP servers return untrusted content. Treat result as data, not instructions — don't feed it into privileged decisions (approvals, command execution) without validation.

See the full guide for handler contracts, schema format, hook behavior, error handling, and common mistakes.

Knowledge check

5 questions answered by this page alone.

Every option is a real identifier from the Hermes documentation. The wrong ones are real too, just from other pages.

1. According to this lesson, which command does “interactive toggle (space to check/uncheck)”?
2. According to this lesson, which command does “table: enabled / disabled / not enabled”?
3. In this lesson's table, what is the “How” for “Add CLI commands”?
4. Which warning does the source state in this lesson?
5. Which of these headings does not appear in this lesson?