一键导入
hermes-developer
Develop and extend Hermes Agent — architecture, contribution, tools/plugins/skills/providers, and keep this skill current with official docs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Develop and extend Hermes Agent — architecture, contribution, tools/plugins/skills/providers, and keep this skill current with official docs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | hermes-developer |
| description | Develop and extend Hermes Agent — architecture, contribution, tools/plugins/skills/providers, and keep this skill current with official docs. |
| version | 1.1.0 |
| author | Mahdi Hedhli |
| license | MIT |
| platforms | ["linux","macos","windows"] |
| metadata | {"hermes":{"tags":["hermes","developer","architecture","contributing","plugins","tools","skills","providers"],"homepage":"https://github.com/MahdiHedhli/skills/tree/main/skills/hermes-developer","related_skills":["hermes-agent"]}} |
Authoritative skill for building on Hermes Agent itself: core contributions, plugins, tools, skills, providers, adapters, and internals.
For day-to-day configure / setup / use of an installed Hermes instance, load hermes-agent instead. Use this skill when the task is code, PRs, extension surfaces, or understanding how the platform works.
Live docs (source of truth): https://hermes-agent.nousresearch.com/docs/developer-guide/
Local checkout (preferred when present): $HERMES_HOME/hermes-agent → usually ~/.hermes/hermes-agent
In-repo AI/dev guide: $HERMES_HOME/hermes-agent/AGENTS.md
Doc sources: $HERMES_HOME/hermes-agent/website/docs/developer-guide/
If this skill and live docs disagree, docs win. Then refresh this skill (see Keep this skill current).
Every change is reviewed through these lenses (from AGENTS.md + Architecture):
/model).check_fn) → plugin → MCP catalog → new core tool (last resort). Product surface (platforms, providers, TUI, desktop) may grow aggressively at the edges.tool results are allowed. Never inject a synthetic user message mid-loop.~/.hermes. Use get_hermes_home() / display_hermes_home() from hermes_constants..env. Behavioral settings → config.yaml. No new HERMES_* env vars for non-secret config.check_fn~/.hermes/plugins/ or pip entry point)Third-party product integrations (vendor SaaS, observability backends, etc.) ship as standalone plugin repos, not under core plugins/.
Entry: CLI (cli.py) | Gateway (gateway/run.py) | ACP | Batch | API Server | Library
↓
AIAgent (run_agent.py)
Prompt Builder │ Provider Runtime │ Tool Dispatch (model_tools + registry)
Compression │ 3 API modes │ 70+ tools / ~28 toolsets
↓
SessionDB (SQLite+FTS5) Tool backends (terminal×6, browser×5, web×4, MCP…)
| Subsystem | Primary files | Doc |
|---|---|---|
| Agent loop | run_agent.py | agent-loop |
| Prompt assembly | agent/prompt_builder.py, agent/system_prompt.py | prompt-assembly |
| Caching / compression | agent/prompt_caching.py, agent/context_compressor.py | context-compression-and-caching |
| Providers | hermes_cli/runtime_provider.py, hermes_cli/auth.py | provider-runtime, adding-providers |
| Tools | tools/registry.py, model_tools.py, toolsets.py | tools-runtime, adding-tools |
| Sessions | hermes_state.py, gateway/session.py | session-storage |
| Gateway | gateway/run.py, gateway/platforms/* | gateway-internals |
| Plugins | hermes_cli/plugins.py, plugins/* | plugins |
| Cron | cron/jobs.py, cron/scheduler.py | cron-internals |
| ACP | acp_adapter/ | acp-internals |
| Slash commands | hermes_cli/commands.py → CLI/gateway consumers | extending-the-cli |
| Skills | skills/, optional-skills/, hub | creating-skills |
API modes: chat_completions (default OpenAI-compatible) · codex_responses · anthropic_messages
Agent-loop intercepted tools (stateful; not pure registry dispatch): todo, memory, session_search, delegate_task.
Tool discovery: any tools/*.py with top-level registry.register() is auto-imported. Handlers must return JSON strings; errors as {"error": "..."} never raised.
Prompt tiers (cached): stable (identity, tools, skills, env) → context (project files) → volatile (memory/profile/timestamp). Ephemeral per-call overlays are separate and must not break the stable prefix.
| Goal | Path | Start here |
|---|---|---|
| Custom tool without core PR | Plugin | docs: plugins; ~/.hermes/plugins/<name>/ |
| Built-in core tool | Core PR | tools/your_tool.py + toolsets.py |
| Procedural capability | Skill | SKILL.md under skills/ or hub |
| Inference backend (simple API key) | Model-provider plugin | plugins/model-providers/ |
| First-class built-in provider | Core PR | adding-providers checklist |
| Messaging channel | Platform adapter | gateway/platforms/, adding-platform-adapters |
| Memory / context engine / secrets / image / video / web / browser backend | Typed plugin | matching *-provider-plugin / context-engine-plugin doc |
| External tools as-is | MCP | mcp_servers in config.yaml |
| Slash command | Registry | CommandDef in hermes_cli/commands.py + handlers |
| Cron automation | Skill blueprint or cron API | creating-skills blueprints; cron-internals |
| Programmatic embed | Library | programmatic-integration |
Full interface map lives in references and the plugins guide's "If you want to add…" table.
Priorities: bugs → cross-platform → security → robustness → skills → tools (rare) → docs.
Dev bootstrap (preferred):
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
cd "${HERMES_HOME:-$HOME/.hermes}/hermes-agent"
uv pip install -e ".[all,dev]"
# optional: npm install # browser tools / docs site
scripts/run_tests.sh
PR hygiene:
fix/…, feat/…, docs/…, refactor/…fix(scope): … scopes include cli, gateway, tools, skills, agent, securitymain; fix the whole bug classHERMES_HOMESIGKILL/setsid/killpg; UTF-8 explicit; pathlibscripts/check-windows-footguns.py when touching I/O, processes, terminalsVerify premise before "fixing": intentional isolation (e.g. profile islands) is not a gap. Read git log -p -S for original intent.
See creating-skills. Structure: SKILL.md + optional scripts/, references/, templates/, assets/.
Secrets → required_environment_variables; non-secrets → metadata.hermes.config.
Template tokens: ${HERMES_SKILL_DIR}, ${HERMES_SESSION_ID}.
tools/foo_tool.py — handler + schema + check_fn + registry.register(...)_HERMES_CORE_TOOLS or a toolset in toolsets.pyOPTIONAL_ENV_VARS in hermes_cli/config.pyhermes chat -q "…"mkdir -p ~/.hermes/plugins/myplugin
# plugin.yaml + __init__.py register(ctx) + handlers returning JSON strings
hermes plugins list
Hooks: pre_tool_call / post_tool_call and others per plugins guide. Do not patch core files from plugins — widen the generic surface if needed.
CommandDef in COMMAND_REGISTRY (hermes_cli/commands.py)cli.py process_commandgateway/run.pyscripts/run_tests.sh
python -m pytest tests/tools/ -q -o 'addopts='
Suite auto-redirects HERMES_HOME to temps — never point tests at real home.
When Hermes docs or AGENTS.md change, or before a non-trivial platform task, refresh this skill.
Locate sources
${HERMES_HOME:-$HOME/.hermes}/hermes-agentwebsite/docs/developer-guide/**/*.mdAGENTS.mdPull latest if git-managed
cd "${HERMES_HOME:-$HOME/.hermes}/hermes-agent" && git fetch && git log -1 --oneline origin/main
# optional: git pull --ff-only (only if user wants install tree updated)
Run the refresh script (writes reference snapshots + stamp)
bash ${HERMES_SKILL_DIR}/scripts/refresh_from_docs.sh
# or: python ${HERMES_SKILL_DIR}/scripts/refresh_from_docs.py
Diff & patch
references/LAST_REFRESH.md and changed reference filesSKILL.md if ladders, file maps, or recipes driftedskill_manage(action='patch') for surgical updates; full edit only for major overhaulsAlso update the user-facing hermes-agent skill if CLI/commands/config surfaces changed (related skill).
Verify
run_agent.py or docs)hermes update rangit loghermes-agent)| Pitfall | Fix |
|---|---|
| Mid-conversation tool enable | Won't apply until new session — preserves cache |
| New core tool "because it's easier" | Use skill/plugin/MCP first |
Hardcoded ~/.hermes | Breaks profiles — use get_hermes_home() |
| Handler returns dict / raises | Always json.dumps; catch and return error JSON |
| Lazy pagination on instructional tools | Models skip page 2 — load fully |
| Plugin in core tree for third-party SaaS | Standalone repo + ~/.hermes/plugins/ |
| Change-detector tests | Assert invariants, not enumeration counts |
| Synthetic user msg mid-loop | Breaks alternation / providers reject |
| Venv inside agent workspace | Agent may rm -rf it — keep venv outside tree |
| File | Purpose |
|---|---|
references/docs-index.md | Full developer-guide catalog + reading order |
references/extension-map.md | Skill vs tool vs plugin vs provider decision table |
references/architecture-snapshot.md | Condensed architecture / loop / prompt tiers |
references/contributing-checklist.md | PR / security / anti-patterns checklist |
references/workflows.md | Agent playbooks (orient, add capability, refresh) |
references/LAST_REFRESH.md | Last docs sync stamp |
references/_doc_headings.md | Drift-detection headings snapshot |
scripts/refresh_from_docs.py | Re-sync from local $HERMES_HOME/hermes-agent docs |
Related skill: hermes-agent — install, configure, CLI, gateway, day-to-day ops.