Compare commits

...

4 commits

Author SHA1 Message Date
Pi Agent
07ce1279fa Drop persist_user_timestamp kwarg for older hermes-agent compatibility
The pinned hermes-agent@sha256:2f1f2f1... doesn't support
persist_user_timestamp in AIAgent.run_conversation(). The webui
expects this parameter, so any prompt fails with:
  TypeError: AIAgent.run_conversation() got an unexpected keyword
  argument 'persist_user_timestamp'

Same pattern as the existing moa_config workaround above each call
site: drop the kwarg, accept the feature gap (timestamp not persisted
on user messages) until the agent is bumped to a version that adds
the parameter.

Co-authored-by: Orca <help@stably.ai>
2026-08-05 17:07:09 +02:00
Pi Agent
eb8da48144 Add hermes-agent service back so WebUI can find agent source
Co-authored-by: Orca <help@stably.ai>
2026-08-04 20:35:52 +02:00
Pi Agent
0c33c835f4 Disable Hermes auth for WFDASH iframe embedding
is_auth_enabled() now always returns False, which:
- Hides the login screen
- Lets the WebUI load directly in an iframe
- Bypasses password/passkey/OIDC checks

WARNING: This makes Hermes publicly accessible to anyone who hits the URL.
Don't use this patch on any deployment you want to keep private.

Co-authored-by: Orca <help@stably.ai>
2026-08-04 20:12:21 +02:00
Pi Agent
8a23134300 Use patched webui image: build from repo Dockerfile
Co-authored-by: Orca <help@stably.ai>
2026-08-04 19:32:38 +02:00
3 changed files with 60 additions and 62 deletions

View file

@ -536,13 +536,15 @@ def get_oidc_startup_warning() -> str | None:
def is_auth_enabled() -> bool: def is_auth_enabled() -> bool:
"""True if password auth, passkeys, OIDC login, or trusted-header auth is configured.""" """True if password auth, passkeys, OIDC login, or trusted-header auth is configured.
return (
is_password_auth_enabled() PATCHED FOR WFDASH IFRAME: always returns False. Login screen is bypassed
or are_passkeys_enabled() so the Hermes WebUI can be embedded in the WFDASH /webview?src=hermes iframe
or is_oidc_auth_enabled() without requiring a separate password prompt. Hermes is reachable on a
or is_trusted_auth_enabled() public sslip.io URL, so do NOT use this patch on any deployment you
) don't want publicly accessible.
"""
return False
def verify_password(plain: str) -> bool: def verify_password(plain: str) -> bool:

View file

@ -9555,7 +9555,6 @@ def _run_agent_streaming(
), ),
task_id=session_id, task_id=session_id,
persist_user_message=msg_text, persist_user_message=msg_text,
persist_user_timestamp=getattr(s, 'pending_started_at', None),
) )
# Only pass moa_config when a /moa override is actually active, so a # Only pass moa_config when a /moa override is actually active, so a
# normal send never trips a TypeError on an older hermes-agent whose # normal send never trips a TypeError on an older hermes-agent whose
@ -10039,7 +10038,6 @@ def _run_agent_streaming(
), ),
task_id=session_id, task_id=session_id,
persist_user_message=msg_text, persist_user_message=msg_text,
persist_user_timestamp=getattr(s, 'pending_started_at', None),
) )
if moa_config is not None: if moa_config is not None:
_heal_kwargs["moa_config"] = moa_config _heal_kwargs["moa_config"] = moa_config
@ -11263,7 +11261,6 @@ def _run_agent_streaming(
), ),
task_id=session_id, task_id=session_id,
persist_user_message=msg_text, persist_user_message=msg_text,
persist_user_timestamp=getattr(s, 'pending_started_at', None),
) )
if moa_config is not None: if moa_config is not None:
_heal_kwargs2["moa_config"] = moa_config _heal_kwargs2["moa_config"] = moa_config

View file

@ -1,57 +1,56 @@
# Hermes WebUI — single-container Docker Compose
#
# QUICK START (most users):
# 1. (Optional) Copy .env.docker.example to .env and edit values
# 2. docker compose up -d
# 3. Open http://localhost:8787
#
# This is the simplest setup: one WebUI container that runs the agent in-process.
# The WebUI auto-detects host UID/GID from the mounted .hermes volume.
#
# For multi-container setups (separate agent + webui or agent+webui+dashboard),
# see docker-compose.two-container.yml or docker-compose.three-container.yml.
services: services:
hermes-webui: hermes-agent:
build: . image: 'nousresearch/hermes-agent@sha256:2f1f2f1725e5dc9a61cf6a2dea5aca52a776ec4d022cb29679e6aa3ff303e77a'
ports: command: 'gateway run'
# select only one; use 127.0.0.1 version to expose to localhost only
- "127.0.0.1:8787:8787"
# - "8787:8787"
volumes:
# Mount your Hermes home directory into the container.
# The default (${HOME}/.hermes) works on both macOS (/Users/<you>/.hermes)
# and Linux (/home/<you>/.hermes) — no change needed for standard installs.
# Only set HERMES_HOME explicitly if your .hermes lives somewhere non-standard.
# macOS note: set UID and GID below to match your user ID (run `id -u` and `id -g`).
- ${HERMES_HOME:-${HOME}/.hermes}:/home/hermeswebui/.hermes
# Your workspace directory shown on first launch (adapt if yours is different, the container will use the mounted /workspace)
- ${HERMES_WORKSPACE:-${HOME}/workspace}:/workspace
environment: environment:
# Set to your host user ID: run `id -u` and `id -g` to find them. - HERMES_HOME=/home/hermes/.hermes
# On macOS, UIDs start at 501 (not 1000), so set UID and GID in a .env file: - HERMES_UID=1000
# echo "UID=$(id -u)" >> .env - HERMES_GID=1000
# echo "GID=$(id -g)" >> .env - 'OPENROUTER_API_KEY=${OPENROUTER_API_KEY}'
# Without this, the container may not be able to read your mounted files. - 'ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}'
- WANTED_UID=${UID:-1000} - 'OPENAI_API_KEY=${OPENAI_API_KEY}'
- WANTED_GID=${GID:-1000} - 'GOOGLE_API_KEY=${GOOGLE_API_KEY}'
# Required: bind address and port volumes:
- 'hermes-home:/home/hermes/.hermes'
- 'hermes-agent-src:/opt/hermes'
healthcheck:
test:
- CMD-SHELL
- 'test -d /home/hermes/.hermes || exit 1'
interval: 10s
timeout: 5s
retries: 5
hermes-webui:
build:
context: .
dockerfile: Dockerfile
image: hermes-webui:0.51.92-frameable
depends_on:
- hermes-agent
environment:
- SERVICE_URL_HERMESWEBUI_8787
- HERMES_WEBUI_HOST=0.0.0.0 - HERMES_WEBUI_HOST=0.0.0.0
- HERMES_WEBUI_PORT=8787 - HERMES_WEBUI_PORT=8787
# Where to store sessions, workspaces, and other state (default: ~/.hermes/webui)
- HERMES_WEBUI_STATE_DIR=/home/hermeswebui/.hermes/webui - HERMES_WEBUI_STATE_DIR=/home/hermeswebui/.hermes/webui
# Default workspace directory shown on first launch - WANTED_UID=1000
# - HERMES_WEBUI_DEFAULT_WORKSPACE=/workspace - WANTED_GID=1000
# Optional: set a password for remote access - 'HERMES_WEBUI_PASSWORD=${SERVICE_PASSWORD_HERMESWEBUI}'
# - HERMES_WEBUI_PASSWORD=your-secret-password volumes:
# - 'hermes-home:/home/hermeswebui/.hermes'
# Bind-mount permission handling (fixes #1389, #1399): - 'hermes-agent-src:/home/hermeswebui/.hermes/hermes-agent:ro'
# When you mount an EXISTING ~/.hermes directory (the common case), - 'hermes-workspace:/workspace'
# the WebUI's startup credential-permission fixer can clash with healthcheck:
# your host file modes (e.g. 0640 group-readable .env files). test:
# Set HERMES_SKIP_CHMOD=1 to bypass the fixer entirely, OR set - CMD
# HERMES_HOME_MODE=0640 to allow group bits while still stripping - curl
# world-readable. Both are documented in api/startup.py. - '-f'
# - HERMES_SKIP_CHMOD=1 - 'http://127.0.0.1:8787/health'
# - HERMES_HOME_MODE=0640 interval: 30s
restart: unless-stopped timeout: 5s
retries: 3
volumes:
hermes-home:
hermes-agent-src:
hermes-workspace: