π‘οΈ Hermes Room
Turn untrusted web, email, file and tool output into safe context before Hermes reads it β with receipts.
Local-first sanitizer + Trust Receipt. Follows your Hermes Desktop model. No extra key.
A skill can tell Hermes to be careful. Hermes Room changes the bytes Hermes receives β deterministically, with model help for semantic attacks, and evidence you can audit.
β¨ Features
- π§Ό Deterministic wash (always, free, local) β strips zero-width / bidi / control chars, ANSI escapes, hidden HTML, script/style payloads.
- π Secret / DLP masking β masks AWS keys, GitHub/GitLab/Slack/OpenAI/Google tokens, JWTs, generic
password=/secret=/api_key=assignments, and full private-key blocks before the model sees them. - π€ Host-model reviewer (Mode 1) β
ctx.llm.complete_structuredagainst your active Hermes model. No provider override, no extra API key. Runs only on suspicion. - π Link & hidden-content markers β replaces invisible spans with visible
[hidden β¦ removed]markers; annotates labelβhref domain mismatch. - π§Ύ Trust Receipt β local JSONL: SHA-256, rule IDs, reviewer verdict, provider/model. Never raw content by default.
- π Evidence tools β
trust_receipt(what changed) andtrust_report(Markdown audit export). - π οΈ Fail-open β reviewer timeout/error β keep Layer 1 result, never break Hermes tool loop.
ποΈ How it works
flowchart LR
subgraph Hermes
LLM[Main Agent Model]
end
Tool[Tool call: web / file / email / terminal] --> Result[Tool result]
Result --> Hook[transform_tool_result]
Hook --> L1[L1: Deterministic wash]
L1 -->|risk medium/high| L2[L2: Host-model reviewer]
L1 -->|clean| Receipt[(Trust Receipt)]
L2 --> Rewash[L1 re-wash of model output]
Rewash --> Receipt
Receipt --> Clean[Cleaned + UNTRUSTED header]
Clean --> LLM
Layer 1 is stdlib-only and runs on every tool result. It strips controls / hidden HTML / addresses and masks leaked secrets. Layer 2 runs only when Layer 1 flags something (or long imperative content), with strict caps: 20s timeout, 800 tokens, 8k chars.
π Quickstart
# Install into Hermes
hermes plugins install hermes-room
hermes plugins enable hermes-room
# Verify (same checks catalog CI runs)
hermes plugins doctor . --ci
hermes plugins validate . --install-deps
Then in Hermes:
Summarize
fixtures/poisoned.html
Call trust_receipt to see what was removed. Run tests/:
python -m unittest discover -s tests -t . -v
Demo variants
# 1. Poisoned page β hidden injection payload
fixtures/poisoned.html
# 2. Secret leak β fake AWS key / GitHub token / password / private key
fixtures/secret-output.txt
Both fixture files contain fake/example values only.
π¬ Demo (90s)
- Open
fixtures/poisoned.htmlβ harmless article + hidden injection payload. - Ask Hermes to summarize it.
trust_receiptβ removed items, hash, reviewer verdict.- Ask "What did you receive?" β Hermes quotes cleaned content only.
trust_reportβ export Markdown.- Repeat with
fixtures/clean.htmlβ passes unchanged. - Repeat with
fixtures/secret-output.txtβ fake secrets are masked, receipt showssecret_*rule IDs.
βοΈ Mode 1 β why no extra key
You pick the model in Hermes Desktop as usual. Hermes Room calls:
ctx.llm.complete_structured(instructions=..., input=..., json_schema=REVIEW_SCHEMA, purpose="hermes-room.sanitize")
No provider= / model= / task= override β uses your active provider/model, host-owned credentials, audited in agent.log. Clean content skips the call entirely.
π§© Why plugin, not skill
| Skill | Hermes Room Plugin |
|---|---|
| Advice the model may follow | Rewrites bytes before context |
| Can't strip hidden Unicode/HTML reliably | Mechanical, tested pipeline |
| Self-reported, no evidence | Local receipts with hashes + verdicts |
| Needs model compliance | Works in CLI / gateway / cron / subagents |
π Disclosure & honesty
- Modifies tool output only when changes are made; cleansed text gets
[UNTRUSTED source=β¦ risk=β¦]header. - Receipts local:
~/.hermes/hermes-room/receipts.jsonl(or$HERMES_HOME/hermes-room/). Raw content not stored by default. - Uses your Hermes host model for bounded reviewer calls. No network beyond that, no Node/Docker, no credentials, no auto-approval, no wallet access.
- Reduces poisoned context β not a guarantee, not an approval system or sandbox.
π Project structure
hermes-room/
βββ plugin.yaml # manifest: hermes-room 0.2.0
βββ __init__.py # register(ctx): hook + tools
βββ sanitizer.py # Layer 1 deterministic wash
βββ reviewer.py # Layer 2 host-model reviewer (Mode 1)
βββ receipts.py # Trust Receipt store
βββ schemas.py # trust_receipt / trust_report
βββ fixtures/ # poisoned / clean / hidden-unicode / ANSI / secret-output
βββ tests/ # 9 unittest cases
βββ README.md
βββ ARCHITECTURE.md
βββ LICENSE
βββ .gitignore
π€ Contributing & community
Issues/PRs welcome. Keep PRs stdlib-only, add fixtures + tests for new patterns, update README badges/version together.
π License
MIT. Built for the Hermes Agent Plugin Hackathon β hermes plugins install hermes-room should just work.
Made locally, reviewed locally. Your data stays in your Room.
README from the reviewed commit b2f7b25; it updates when the author re-pins.

adenijiridwan43