Skip to content

Autonomous OODA-loop pentesting agent. Hermes brain, Kali + Playwright tools over MCP, ATT&CK as the Orient language.

15.3 KB
Raw Blame
# config.yaml — Hermes profile of vulnerator-ai's OODA executor (DIRECT OODA to Kali).
# It lives in the home of Hermes's default profile (/opt/data/config.yaml inside the
# ooda-agent container; see docker-compose.yml).
#
# DESIGN: Hermes is a CLIENT of two MCP servers and runs the tools DIRECTLY: the Kali's
# (`kali`, CLI pentest tools) and the browser's (`playwright`, headless Chromium for the web
# side). There is no core, API or UI in between: there are no gates (scope/consent/intrusiveness/audit).
# Hermes's entire surface is those two MCPs (zero native toolsets), and the responsibility for the
# scope rests with the operator (see the WARNING in docker-compose.yml).
#
# VERIFIED against the official Hermes docs:
#   - mcp_servers (HTTP + tools.include/exclude + prompts/resources):
#     https://github.com/NousResearch/hermes-agent/blob/main/website/docs/user-guide/features/mcp.md
#   - profiles / per-profile config:
#     https://github.com/NousResearch/hermes-agent/blob/main/website/docs/user-guide/profiles.md

# --- Model (LLM provider = OpenRouter) --------------------------------------
# Hermes reads the LLM key from the OPENROUTER_API_KEY environment variable (NOT HERMES_LLM_API_KEY):
# the compose injects it as-is into the process and Hermes picks it up from there. NO interactive
# `hermes setup` and NO cleartext secret in the repo.
# --- Skin / branding --------------------------------------------------------
# Custom skin for Vulnerator. Activates the cyber-red theme, "Vulnerator"
# agent name, ⚡ prompt symbol, and custom ASCII banner in the TUI and dashboard.
# The skin YAML is served from agent-ooda/profile/skins/vulnerator.yaml and
# copied to /opt/data/skins/ by the docker-compose startup script.
display:
  skin: "vulnerator"
  # Pet (petdex `gat-reaper`) — the floating OODA mascot shown in the Webapp/Desktop
  # (Settings → Appearance) and the CLI/TUI. The sprite is installed at startup by the
  # docker-compose command (`hermes pets install gat-reaper --select`) into
  # <HERMES_HOME>/pets/gat-reaper; selecting it here keeps it active across rebuilds.
  pet:
    enabled: true
    slug: "gat-reaper"
    scale: 0.33

model:
  # mistral-large-4-0: a model suited to the authorized-pentest offensive framing. Claude
  # (anthropic/claude-sonnet-*) rejects the offensive framing (the OpenRouter/Anthropic safety
  # filter returns "violative cyber content" and does not respond). Mistral Large does not refuse the
  # authorized pentest, which is why it is the OODA driver's model.
  # NOTE: this value is the fallback DEFAULT. It can be overridden at startup with the
  # OPENROUTER_MODEL environment variable (see docker-compose.yml / .env.example): if OPENROUTER_MODEL
  # is defined and non-empty, startup runs `hermes config set model.default <value>`; if it is
  # empty or undefined, this value is used as-is.
  # LOCAL/REMOTE INFERENCE (optional): if OLLAMA_BASE_URL is defined in the .env, startup
  # selects an Ollama endpoint (OpenAI-compatible) at runtime via
  # `hermes config set model.provider custom` + `model.base_url <OLLAMA_BASE_URL>` +
  # `model.default <OLLAMA_MODEL>`, and Hermes uses Ollama instead of OpenRouter. If OLLAMA_BASE_URL
  # is empty/undefined, the fallback is OpenRouter + this model.default (unchanged).
  default: "mistralai/mistral-large-4-0"

# --- Automatic fallback (Hermes native) -------------------------------------
# FALLBACK CHAIN: if the primary model fails (rate-limit 429, server error 500/502/503,
# auth failure 401/403), Hermes switches AUTOMATICALLY to the fallback mid-session without losing
# the conversation context. The fallback is PER-TURN: each new message attempts the
# primary again; if it fails again, it re-activates the fallback just for that turn.
#
# GLM-5.3 Flash ADVANTAGES vs Mistral Large 4:
#   - Same Cyber Index (both 50% on Artificial Analysis)
#   - 20x cheaper: $0.07/M in, $0.21/M out (vs $1.36/$4.18)
#   - Proven in real production: 0-days in the browser, Hugging Face incident response
#   - Multimodal: accepts images (useful for screenshots of web targets)
#   - Context: 1M tokens
#   - Bypassable safeguards (but in an authorized pentest that is an advantage, not a problem)
#   - CyberGym 84.5% (top score), ExploitBench 54.4%, real end-to-end exploit case
#
# DISADVANTAGES:
#   - NexBench 29/100 (rank 13): CyberGym does not translate to long autonomous pentesting
#   - Less public data on refusal rates in a corporate context (Mistral more battle-tested)
#
# PROMPT CACHE WARNING: when the fallback activates, the new provider:model does NOT have the
# cached prefix of your conversation, so the next request re-reads the whole history at
# full input-token price (not the 75-90% cache discount). The same applies when the
# turn ends and the primary is restored. It is the cost of staying alive during an outage.
#
# SYNTAX: a `fallback_providers` list (not the singular `fallback_model`). Each entry needs
# `provider` and `model`. See https://hermes-agent.nousresearch.com/docs/user-guide/features/fallback-providers
fallback_providers:
  - provider: openrouter
    model: z-ai/glm-5.3-flash

# --- First MCP server: the Kali (`kali` container) --------------------------
# Hermes is a CLIENT of this MCP: it runs the CLI pentest tools DIRECTLY on the Kali. It is the
# primary path to the target (the browser goes through the second MCP, `playwright`, below). Syntax
# verified in mcp.md (HTTP servers + Per-server filtering).
#
# SERVER NAME = `kali`. Hermes registers the MCP tools as `mcp_<server>_<tool>`, so the
# effective tools are `mcp_kali_<tool>` (e.g. `mcp_kali_kali_run`). The `tools.include` filter is
# applied over the tool name AS the server exposes it (`kali_run`, `iam_enum`, ...), not
# over the effective name.
mcp_servers:
  kali:
    # Endpoint of the kali-mcp server (streamable-HTTP over `/`, the compose internal network). NO
    # headers or token: the kali-mcp server does not authenticate; the endpoint's security is the
    # isolation of the docker internal network.
    url: "http://kali:8900"
    tools:
      # POSTURE (the MCP SERVER is the SOURCE OF TRUTH: "what the server exposes = what
      # Hermes sees"). The `tools.include` that previously did an exact whitelist of the Kali's
      # tools is REMOVED. Deliberate consequences (user's decision):
      #   - The VISIBLE surface goes from 10 tools to the 15 native ones that the server
      #     publishes by introspection (server_info already derives its list from FastMCP's registry).
      #   - Any tool that the server adds LATER (including those contributed by a third-party
      #     plugin) enters Hermes's surface WITHOUT passing through a gate here: there is no
      #     case-by-case review in this file.
      # If one wanted to review tool by tool again, the way is to RE-ADD an `include:` with the
      # exact whitelist of names (as the server exposes them) under this same `tools:` key.
      # It is NOT done now: the source of truth is the server.
      # Disables the utility wrappers Hermes would add (list_prompts/get_prompt,
      # list_resources/read_resource). Verified in mcp.md ("Filter utility tools too").
      prompts: false
      resources: false

  # --- Second MCP: the browser (`playwright-mcp` container) -------------------
  # Gives Hermes a REAL browser (headless Chromium) for the WEB side of the pentest, over
  # MCP. It does NOT re-enable any native toolset (browser/web stay disabled below): the
  # web surface is `mcp_playwright_*`, not Hermes's `browser` toolset. That way the web
  # side is NOT limited to `kali_run`: the CLI tools (nmap/whatweb/nuclei/ffuf/sqlmap) go
  # through the Kali and navigation/DOM/interaction go through this MCP. The `web-pentest`
  # skill uses it. Streamable-HTTP endpoint at `/mcp` (official microsoft/playwright image).
  playwright:
    url: "http://playwright-mcp:8931/mcp"
    # NO tools.include: the browser tools the image ships are exposed (navigate,
    # click, type, snapshot, evaluate, ...). The effective name the model sees is
    # `mcp_playwright_<tool>`. The utility wrappers are filtered the same as on kali.
    tools:
      prompts: false
      resources: false

# --- Toolsets: ONLY the two MCPs (Kali + browser) ---------------------------
# GOAL: that Hermes's surface be EXCLUSIVELY the two MCPs (`kali` + `playwright`) —
# nothing of native terminal/code_execution/file/browser/web (they clutter the loop's reasoning and
# reintroduce surface we do not want). The browser arrives over MCP, NOT via the `browser` toolset.
#
# `toolsets:` is a LIST of bundles (toolsets-reference.md), NOT `toolsets.enabled` (that key does
# not exist and Hermes ignores it -> it would fall back to the default platform toolset `hermes-api-server`,
# which brings file/terminal/web/browser/code_execution...). Each MCP server generates a dynamic toolset
# `mcp-<server>` (here `mcp-kali` and `mcp-playwright`), referenceable by the server name. By
# listing ONLY these two, the only surface is the tools of both MCPs (already filtered by tools).
toolsets:
  - kali                 # the Kali's MCP (dynamic `mcp-kali`): CLI pentest tools.
  - playwright           # the browser's MCP (dynamic `mcp-playwright`): real web. ZERO native tools.
  - todo                 # todo_list: the OODA loop's live state, compaction-resistant (see SOUL.md).
  - kanban               # kanban_*: durable task board, shared SQLite, multi-profile coordination.

# Defense in depth (agent.disabled_toolsets, toolsets-reference.md): although `toolsets: [kali]`
# already excludes the rest, the native bundles are EXPLICITLY disabled, in case a platform
# default reintroduced them. They must disappear from the OODA driver's reasoning.
#
# EXCEPTION: `delegation` IS enabled (it is NOT in this list). The OODA driver needs
# `delegate_task` for CONTEXT HYGIENE: it can delegate a long, bounded exploration branch
# (e.g. "enumerate this whole /24 and summarize") to a SUBAGENT with FRESH context, which inherits the
# parent's toolsets (`kali`+`playwright` -> `mcp_kali_*`/`mcp_playwright_*`) and ONLY returns its
# final summary to the driver. That way the
# OODA loop's context is not bloated with the raw output of long branches. See the `pentest-ooda` skill
# (delegation section). Verified: delegation.md (delegate_task = isolated context + inherited
# toolset + only the summary returns to the parent).
agent:
  disabled_toolsets:
    - code_execution
    - terminal
    - file
    - browser
    - web
    - search
    - computer_use
    - memory
    - skills

# Progressive tool disclosure (Tool Search bridge): by default Hermes DEFERS the MCP tools and
# exposes bridge tools (`tool_describe`/`tool_search`) to load their schema on demand, which
# clutters the log. With few MCP tools it is not needed: we DISABLE it so Hermes sees the
# Kali's tools directly (toolsets-reference.md / tool-search.md).
tools:
  tool_search:
    enabled: false

# --- Terminal backend -------------------------------------------------------
# Hermes does NOT use a native terminal (the `terminal` toolset is disabled above): it executes on the
# Kali through the MCP (kali_run). `local` is left in case the image requires it at startup. NOTE: `local`
# is NOT a sandbox (profiles.md).
terminal:
  backend: "local"

# --- Delegation: elevated concurrency for large network pentests ------------
# The OODA driver uses delegate_task for CONTEXT HYGIENE (see above). By default Hermes
# limits to 10 concurrent tasks; for large-network pentests (/24, 254 hosts) it is raised to 50
# (validated in Nous's 1,393-agent refactor: 218 concurrent workers without issues).
delegation:
  max_concurrent_children: 50

# --- Memory / learning ------------------------------------------------------
# Ephemeral per engagement: the default profile is recreated on each startup by copying this
# declarative template (see docker-compose.yml command), so learned memory/skills are not inherited between
# engagements even though the named volume persists physically.

# --- API server platform ----------------------------------------------------
# Hermes's OpenAI-compatible API server (/v1/runs, /v1/runs/{id}/events, /health) lets you
# trigger and observe Hermes over HTTP. VERIFIED against the image: the platform must be DECLARED
# here (platforms.api_server) for the gateway to start it; env vars alone are not enough. The `key`
# is NOT versioned: startup injects it (docker-compose command) from HERMES_API_SERVER_KEY.
platforms:
  api_server:
    enabled: true
    host: "0.0.0.0"   # reachable over the compose internal network
    port: 8642        # published to the host via docker-compose.yml ports: (and reachable on the internal network)

# --- Web dashboard ----------------------------------------------------------
# Hermes' built-in web dashboard. Binds to 0.0.0.0 (port 9119, published to the host via
# docker-compose.yml ports:) only when an auth provider is registered. We use basic_auth so
# the container can be reached from the browser without entering the TUI.
# Credentials: admin / vulnerator (change password and regenerate hash with:
#   docker exec <ooda-agent> python3 -c "from plugins.dashboard_auth.basic import hash_password; print(hash_password('your-password'))"
# then update dashboard.basic_auth.password_hash below).
dashboard:
  host: "0.0.0.0"
  port: 9119
  basic_auth:
    username: "admin"
    # Hash for "vulnerator" — regenerate if you change the password.
    password_hash: "scrypt$16384$8$1$2ZcMvpA3ilGi8e2A3wmOBQ==$IdIdI0Mxd71T2lh7aKc++9/VPPnuGYjgwXIlwNBrVko="
  # ember = crimson/bronze built-in theme — closest to Vulnerator-AI red palette.
  # Other built-in options: cyberpunk (green matrix), midnight, mono, nous-blue, rose.
  theme: "ember"

# --- Webapp (the Desktop workspace in a browser, Hermes >= 0.23) ------------
# The gateway can serve the full Desktop workspace (sessions, profiles, Capabilities, Artifacts,
# the terminal rail, ...) to a browser on its own listener. This is NOT the web dashboard above: the
# dashboard is an admin panel, the Webapp is the Desktop UI itself. Enabled here; the gateway serves
# it on port 9120 (published to the host via docker-compose.yml ports:). With host 0.0.0.0 the
# gateway REQUIRES the dashboard sign-in gate, so access reuses the dashboard basic_auth account
# (admin / vulnerator) — change it in the `dashboard:` block above.
#
# ACCESS: browse to http://localhost:9120 and sign in with the dashboard account. If the bundle has
# not been built yet (status says so), build it once from the host with:
#   docker compose exec ooda-agent hermes webapp --no-open
# then reload. The gateway reads these settings at startup; after changing them restart it
# (the compose startup already runs `hermes gateway run`).
#
# REQUIRES Hermes >= 0.23 (the Webapp feature). The ooda-agent image is `nousresearch/hermes-agent`
# with no tag (`latest`), which now resolves to 0.23.x — a `docker compose pull` picks it up.
#
# SECURITY: a signed-in Webapp user can run arbitrary commands as the OS account running Hermes and
# drive the (no-guardrails) agent. Keep port 9120 on loopback / a trusted host only, use a strong
# password, and never expose it to an untrusted network (prefer an SSH tunnel or a trusted VPN).
webapp:
  enabled: true
  host: "0.0.0.0"   # reachable from the host via the published port; forces the dashboard sign-in gate
  port: 9120

# --- Messaging / cron -------------------------------------------------------
# Do NOT connect messaging bots or cron: messaging is an untrusted input vector. Only
# the api_server platform above is declared.