Privacy
What it is
The boundary around what Hermes may store, retrieve, expose, or send to providers.
In plain terms
Imagine a courier who blacks out your home address on the envelope before handing it to a stranger for inspection, while quietly keeping the real address on file so your package still arrives. Hermes can do something similar with what reaches the model versus what stays local: an identifier gets hashed or a phone number gets stripped before it ever enters the LLM’s context, even though the underlying data is unchanged.
Why it matters
Memory and retention policy both operate inside a boundary privacy defines: what’s allowed to be stored at all, what’s eligible for retrieval later, and — critically — what actually gets sent to an external model provider versus kept local. That boundary becomes concrete the moment someone runs a local model specifically to avoid sending sensitive project data to a hosted API. Team-facing workflows like a Slack second brain put extra pressure here, since a pool of curated knowledge can reveal more collectively than any one message ever did on its own.
How it works
build_session_context_prompt() in gateway/session.py receives the caller’s redact_pii choice and the platform’s PII-safety capability. When both permit redaction, it strips phone numbers and replaces user or chat IDs with deterministic hashes before building the context sent to the LLM. The original identifiers remain available to the gateway’s routing layer, so replies still reach the correct conversation without exposing those raw values to the model context.
A concrete example
With privacy.redact_pii turned on over a PII-safe messaging platform, build_session_context_prompt replaces the sender’s real phone number and chat identifier before model context is assembled. The model receives a stable hashed identifier, so it can still distinguish participants across the conversation, while the real routing values remain behind the local gateway boundary.
How it connects
This note belongs to the Memory family. Its closest neighboring concepts are: Retention, Memory Tools, Agent Runtime, Personal OS.
Source evidence
vendor/hermes-agent/gateway/session.py#<file>— Structural Source Map fallback for gateway/session.py. A core source file in the Memory and Session State — Other Core Files structure within Memory and Session State.
Workflows
- Slack Second Brain
Related articles
- Mastering Hermes Desktop: From Local Chat App to an Always-On Agent Control Center
