Build Hermes Agent Extensions
Choose the owned extension surface before creating files. Hermes uses several unrelated plugin and integration systems; do not force them into one generic package.
Select the Surface
- Use a skill for instructions, existing commands, and progressive disclosure.
- Use MCP for an external tool server.
- Use a general Python plugin for registered tools, lifecycle hooks, slash commands, CLI commands, or bundled namespaced skills.
- Use a specialized provider/plugin surface for models, messaging platforms, memory, context engines, secrets, image/video generation, web search, or browser sessions.
- Use configuration for TTS commands, STT commands, shell hooks, MCP, and other explicitly config-driven surfaces.
- Use gateway hook directories for gateway event handlers.
- Use the desktop SDK or dashboard SDK only for their respective UI host; they do not share the Python plugin API.
- Use ACP when an editor or compatible client drives the agent; hand generic ACP implementation to
build-acp-agentand existing client setup tooperate-acp-agent-integration. - Use A2A when independently operated agents exchange discovered tasks; hand
operation to
operate-a2a-agent-integrationand use Hermes's specialized platform adapter only when extending its native A2A surface. - Use TUI gateway JSON-RPC or the OpenAI-compatible API server for custom programs that drive the agent without an ACP client.
- Modify Hermes core only when the feature belongs upstream and the official contributor guide selects that path.
Read references/extension-surface-map.md before implementing any surface beyond a skill or MCP declaration.
Implement a Standalone Python Plugin
For a third-party or project integration:
- Keep it in an independently installable repository or project/user plugin directory.
- Add
plugin.yamland a narrowregister(ctx)entry point. - Split schemas from handlers so model-visible contracts stay reviewable.
- Declare provided tools, hooks, commands, skills, and required environment only when they are actually registered or required.
- Keep credentials in Hermes/private environment configuration.
- Add unit tests for registration, schemas, handlers, redaction, and failure messages.
- Add an opt-in smoke test for the real backend.
- Require explicit enablement through
plugins.enabled; discovery alone must not execute third-party code. Test bundled, user, project, and pip discovery plus name-collision precedence when more than one source can provide it.
Do not merge third-party product integrations into the Hermes core repository merely for discoverability.
Preserve Runtime Boundaries
- The agent loop, gateway, cron, ACP, and auxiliary calls share provider runtime resolution; a provider change must account for each consumer.
- Built-in tools and user/project plugins have different ownership and contribution paths.
- Project plugins require the explicit project-plugin enablement boundary.
- General and third-party plugins are opt-in even when discovery lists them.
- Later plugin sources can override earlier sources; test name collisions and replacement behavior.
- General Python plugins, desktop plugins, dashboard plugins, and provider subtypes have separate discovery and APIs.
- Prompt assembly separates stable, context, and volatile material; do not inject frequently changing data into stable prompt layers without measuring cache consequences.
Validate in Layers
- Static manifest and schema validation.
- Unit tests with fake providers or clients.
- Registration/discovery test in an isolated Hermes home or profile.
- Harmless runtime invocation.
- Failure-path and missing-secret checks.
- Host-specific smoke test for gateway, desktop, dashboard, or provider behavior.
- Docs and example review against the current developer guide.
- Install/enable/disable lifecycle proof without changing the operator's live Hermes home during development.
Output Contract
State:
classification: durable building block, local implementation detail, or conscious stopgap;surface: exact Hermes extension system;ownership: standalone, project, user, bundled, or upstream core;files: concrete files and entry points;state: configuration, credentials, or services touched;verification: unit and runtime evidence;portability: what remains Hermes-specific versus Agent Skills or MCP portable.