labels: ["enhancement", "install", "windows"]
project-board: "Hermes-Agent"
📋 Issue: Playwright Browser Download Path Not Configurable via Hermes Install Flow
Problem Statement
When installing Hermes Agent's Desktop application on Windows, the Playwright SDK dependency automatically downloads Chromium (~183 MB), FFmpeg (~1.3 MB), and Chrome Headless Shell (~113 MB) into a hard-coded location: C:\Users\<user>\AppData\Local\ms-playwright\. This totals approximately 500 MB of data written to the system drive (typically C:).
Hermes provides no mechanism—neither in setup.py, setup-hermes.sh, the Desktop installer UI, nor any runtime environment variable—to redirect this download path. While Playwright internally respects PLAYWRIGHT_BROWSERS_PATH (a standard NPM ecosystem variable), Hermes does not pass this through during installation or configure it post-install.
Users with limited C: disk space (e.g., systems where C: has < 10 GB free) cannot relocate these binaries without manual intervention that will be overwritten on every update.
Current Behavior
- During installation (
pip install hermes-agent + Desktop app setup), npm installs @playwright/test as a transitive dependency.
- Playwright's native install script runs automatically, downloading browsers to
%LOCALAPPDATA%\ms-playwright\.
- No configuration file, CLI flag, or environment variable is read to override this path.
- On subsequent updates, the same download/re-install cycle repeats, always targeting C:.
Expected Behavior
- Install-time redirection: When running
pip install hermes-agent or the Desktop installer, detect and honor the PLAYWRIGHT_BROWSERS_PATH environment variable before triggering browser downloads. If set, browsers are downloaded to the specified directory instead of the default ms-playwright location.
- Config file support: Add a section to
config.yaml:
playwright:
browsers_path: "D:/ms-playwright" # Optional; defaults to standard location
Hermes should export this value when invoking any Playwright subprocess.
- Desktop UI option: Include a "Browser cache location" path picker in Desktop settings → System/Storage tab, allowing users to change the location at any time without reinstalling.
Root Cause Analysis
- Playwright's download behavior is controlled entirely by the
PLAYWRIGHT_BROWSERS_PATH environment variable (documented at https://playwright.dev/docs/browser-cli#environment-variables).
- Hermes'
setup.py uses tempfile.mkdtemp() for temporary files but does NOT wrap or intercept the Playwright browser install process. There is no code path that reads PLAYWRIGHT_BROWSERS_PATH or configures it before calling npx playwright install.
- The Electron desktop app also does not expose or manage this variable in its startup sequence.
Code References
E:/hermes/hermes-agent/setup.py:31 — tempfile.mkdtemp(prefix=f"hermes-agent-{kind}-") (only for temp files, not browser binaries)
--The browser download path for Playwright is controlled by the environment variable PLAYWRIGHT_BROWSERS_PATH. Set this variable before running npx playwright install, and all browser binary packages will be downloaded to the specified directory instead of the default location.
Default paths:
Windows: %LOCALAPPDATA%\ms-playwright
macOS: ~/Library/Caches/ms-playwright/
Linux: ~/.cache/ms-playwright/
Example (PowerShell):
Run $env:PLAYWRIGHT_BROWSERS_PATH="D:\my-browsers" before installation, and the browser path will become D:\my-browsers\ms-playwright\chromium-1228.
- Install logs confirm the default path:
C:/Users/16866/AppData/Local/Temp/hermes-playwright-install-*.log shows downloads going to C:\Users\16866\AppData\Local\ms-playwright\chromium-1228
Suggested Fix Architecture
# In setup.py or an install bootstrap script
import os
def prepare_playwright_environment():
"""Ensure PLAYWRIGHT_BROWSERS_PATH is set before browser download."""
custom_path = os.environ.get("PLAYWRIGHT_BROWSERS_PATH", "")
if not custom_path:
# Check config.yaml for a configured path
try:
import yaml
cfg = yaml.safe_load(open(os.path.expanduser("~/.hermes/config.yaml")))
custom_path = cfg.get("playwright", {}).get("browsers_path", "")
except Exception:
pass
# Export for any child processes (including npx/npm which invoke playwright)
if custom_path:
os.makedirs(custom_path, exist_ok=True)
os.environ["PLAYWRIGHT_BROWSERS_PATH"] = custom_path
For the Desktop UI setting, add a Qt/Electron file picker dialog bound to a config key that gets exported as PLAYWRIGHT_BROWSERS_PATH before any Playwright subprocess is launched.
Recommendation Priority
| Aspect |
Effort |
Impact |
| Detect/env-pass PLAYWRIGHT_BROWSERS_PATH in install flow |
Low |
Critical — solves immediate problem with zero cost |
| Add playwright.browsers_path to config.yaml |
Low |
High — persistent across reboots and updates |
| Desktop UI path picker |
Medium |
Medium — good UX polish for advanced users |
This is a one-line-environment-variable-pass-through in most cases. Playwright already supports this natively; Hermes simply needs to not strip it away during installation.
labels: ["enhancement", "install", "windows"]
project-board: "Hermes-Agent"
📋 Issue: Playwright Browser Download Path Not Configurable via Hermes Install Flow
Problem Statement
When installing Hermes Agent's Desktop application on Windows, the Playwright SDK dependency automatically downloads Chromium (~183 MB), FFmpeg (~1.3 MB), and Chrome Headless Shell (~113 MB) into a hard-coded location:
C:\Users\<user>\AppData\Local\ms-playwright\. This totals approximately 500 MB of data written to the system drive (typically C:).Hermes provides no mechanism—neither in
setup.py,setup-hermes.sh, the Desktop installer UI, nor any runtime environment variable—to redirect this download path. While Playwright internally respectsPLAYWRIGHT_BROWSERS_PATH(a standard NPM ecosystem variable), Hermes does not pass this through during installation or configure it post-install.Users with limited C: disk space (e.g., systems where C: has < 10 GB free) cannot relocate these binaries without manual intervention that will be overwritten on every update.
Current Behavior
pip install hermes-agent+ Desktop app setup), npm installs@playwright/testas a transitive dependency.%LOCALAPPDATA%\ms-playwright\.Expected Behavior
pip install hermes-agentor the Desktop installer, detect and honor thePLAYWRIGHT_BROWSERS_PATHenvironment variable before triggering browser downloads. If set, browsers are downloaded to the specified directory instead of the default ms-playwright location.config.yaml:Root Cause Analysis
PLAYWRIGHT_BROWSERS_PATHenvironment variable (documented at https://playwright.dev/docs/browser-cli#environment-variables).setup.pyusestempfile.mkdtemp()for temporary files but does NOT wrap or intercept the Playwright browser install process. There is no code path that readsPLAYWRIGHT_BROWSERS_PATHor configures it before callingnpx playwright install.Code References
E:/hermes/hermes-agent/setup.py:31—tempfile.mkdtemp(prefix=f"hermes-agent-{kind}-")(only for temp files, not browser binaries)--The browser download path for Playwright is controlled by the environment variable PLAYWRIGHT_BROWSERS_PATH. Set this variable before running npx playwright install, and all browser binary packages will be downloaded to the specified directory instead of the default location.
Default paths:
Windows: %LOCALAPPDATA%\ms-playwright
macOS: ~/Library/Caches/ms-playwright/
Linux: ~/.cache/ms-playwright/
Example (PowerShell):
Run $env:PLAYWRIGHT_BROWSERS_PATH="D:\my-browsers" before installation, and the browser path will become D:\my-browsers\ms-playwright\chromium-1228.
C:/Users/16866/AppData/Local/Temp/hermes-playwright-install-*.logshows downloads going toC:\Users\16866\AppData\Local\ms-playwright\chromium-1228Suggested Fix Architecture
For the Desktop UI setting, add a Qt/Electron file picker dialog bound to a config key that gets exported as
PLAYWRIGHT_BROWSERS_PATHbefore any Playwright subprocess is launched.Recommendation Priority
This is a one-line-environment-variable-pass-through in most cases. Playwright already supports this natively; Hermes simply needs to not strip it away during installation.