Ansible role for our hermes agents https://hermes-agent.nousresearch.com/
  • Python 84.4%
  • Jinja 15.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Conrad 39ce852974
All checks were successful
Lint + Tag / format (push) Successful in 47s
Lint + Tag / tag (push) Successful in 46s
fix: fixed a paperclip mcp issue
2026-10-15 01:27:10 +07:00
.forgejo/workflows feat: added initial version 2026-10-12 15:42:27 +07:00
defaults feat: added initial version 2026-10-12 15:42:27 +07:00
files fix: fixed a paperclip mcp issue 2026-10-15 01:27:10 +07:00
handlers feat: added initial version 2026-10-12 15:42:27 +07:00
meta feat: added initial version 2026-10-12 15:42:27 +07:00
tasks feat: added initial version 2026-10-12 15:42:27 +07:00
templates feat: added initial version 2026-10-12 15:42:27 +07:00
tests feat: added initial version 2026-10-12 15:42:27 +07:00
.gitignore feat: added initial version 2026-10-12 15:42:27 +07:00
CHANGELOG.md fix: fixed a paperclip mcp issue 2026-10-15 01:27:10 +07:00
LICENSE feat: added initial version 2026-10-12 15:42:27 +07:00
README.md Prettified Code! 2026-10-12 08:43:36 +00:00

Hermes

Installs Hermes Agent (Nous Research) on a Debian host or LXC container and runs its gateway as a systemd service. Built for self-hosted operation: the model comes from an OpenAI-compatible endpoint (e.g. LiteLLM), web search from SearXNG, page extraction from a Firecrawl-compatible API (e.g. crw) — Hermes' fallbacks to hosted vendors are switched off.

Requirements

  • Debian 13 (bare metal, VM or LXC; LXC needs nesting=1)
  • Outbound HTTPS during install (GitHub, the installer's pinned uv/Python/Node, PyPI/npm)

Variables

Variable Default Description
hermes_version v2026.9.24 Release tag. The installer re-runs only when this (or hermes_browser) changes.
hermes_user hermes Unprivileged user the agent and its tools run as.
hermes_home /home/hermes/.hermes Data: config.yaml, .env, sessions, memory, skills.
hermes_llm_base_url ~ Required. OpenAI-compatible base URL incl. /v1.
hermes_llm_api_key ~ Required. Key for that endpoint.
hermes_model auto Model name at the endpoint.
hermes_context_length 131072 Context window (Hermes needs ≥ 64000).
hermes_image_input_mode native native for multimodal models, else text/auto.
hermes_can_search true web_search/web_extract. Requires hermes_searxng_url.
hermes_searxng_url ~ SearXNG base URL (JSON format enabled).
hermes_firecrawl_url ~ Firecrawl-compatible API for web_extract (e.g. crw).
hermes_firecrawl_api_key ~ Its key.
hermes_can_run_code true terminal and execute_code toolsets.
hermes_can_read_pdf true Adds poppler (scanned-page detection); the converter is a core dep.
hermes_browser false Headless Chromium browser tools (Playwright).
hermes_approvals_mode smart Dangerous-command policy: smart, manual, off.
hermes_approvals_unattended deny What API/email/cron sessions do on a dangerous command: deny, approve.
hermes_api_server_key ~ Enables the HTTP API server (Paperclip hermes_gateway, /v1/chat/completions).
hermes_api_server_host/port 0.0.0.0 / 8642 API server bind.
hermes_email ~ IMAP/SMTP mailbox dict, see defaults/main.yml.
hermes_show_reasoning false Show the model's reasoning above chat replies.
hermes_forgejo ~ Forgejo tools via forgejo-mcp (url, token, optional tools allowlist); without token only installs the binary.
hermes_forgejo_mcp_version 3.2.0 forgejo-mcp release, checksum-verified.
hermes_signal ~ Signal via signal-cli's HTTP daemon (http_url, account, allowlists, relay), see defaults/main.yml.
hermes_signal_relay_port 8098 Local port of the Signal relay (hermes_signal.relay: true, for a signal-cli on another host).
hermes_paperclip ~ {api_url, api_key, company_id, agent_id}: Paperclip MCP tools (files/mcp_paperclip.py).
hermes_tool_search auto tools.tool_search.enabled; off works better with smaller local models.
hermes_mcp_servers {} Extra MCP servers merged into config.yaml (${env:VAR} resolves from .env).
hermes_soul "" Personality/identity (SOUL.md).
hermes_extra_hosts [] /etc/hosts pins, e.g. public names → internal proxy.
hermes_extra_config {} Dict merged into config.yaml.
hermes_extra_env {} Extra .env entries.
hermes_uninstall false Stops and removes the service.
hermes_purge false Also deletes the user and all agent data. Irreversible.

Usage

hermes_llm_base_url: https://lite.example.com/v1
hermes_llm_api_key: "{{ vault_hermes_llm_key }}"
hermes_searxng_url: http://10.0.0.5:8080
hermes_firecrawl_url: http://10.0.0.5:3000
hermes_firecrawl_api_key: "{{ vault_crw_key }}"
hermes_api_server_key: "{{ vault_hermes_api_key }}"

Paperclip: create an agent with adapter hermes_gateway, apiBaseUrl: https://<hermes_api_server_tls.domain> (Paperclip refuses plain HTTP to non-localhost hosts), apiKey: <hermes_api_server_key>.

Notes

  • Nothing goes to hosted vendors by default. web.keyless_fallback/keyless_rescue are off (else web tools rotate onto Exa/Parallel/Firecrawl cloud/Keenable), runtime package installs are off (security.allow_lazy_installs), and passive update checks are off. Helper tasks (compression, titles, vision, curator) use the main model; with no other provider keys present there is nothing to fall back to.
  • config.yaml is merged, not templated. Hermes adds keys and migrates the file itself; the role only writes when one of its own values differs.
  • Sending email. Hermes itself only replies to incoming mail; there is no agent-callable send tool. With hermes_email set, the role adds a small local MCP tool send_email (files/mcp_send_email.py) that sends through the same SMTP account (send_tool: false to skip).
  • Paperclip tools are our own, not @paperclipai/mcp-server. Paperclip only accepts an agent's write calls with the current run id (X-Paperclip-Run-Id). The official server takes it once from PAPERCLIP_RUN_ID at startup, which can't work for a long-lived gateway serving many runs. files/mcp_paperclip.py looks up the agent's running run (live-runs) on every write call instead — models copying the 36-character run id from the prompt drop characters, and Paperclip answers a wrong id with HTTP 500.
  • Email login = sender address. Hermes has no separate IMAP/SMTP username. Only senders in allowed_users are processed, and only if the receiving server stamps an Authentication-Results header that authenticates the sender's domain.
  • Approvals. API-server and email sessions have nobody to answer a prompt; with hermes_approvals_unattended: deny dangerous commands are refused there and the agent has to find another way.
  • Upgrades. Bump hermes_version; the installer moves the checkout forward and the service restarts.