Run and restart WebUI

Host WebUI behind a reverse proxy, manage instance access keys, perform graceful restarts that resume interrupted runs, and inspect server logs.

Use this guide when operating a Harness UI instance for yourself or trusted collaborators. First start WebUI and verify a conversation. Instance access shares workbench authority; use Service for managed users and durable execution across workers.

Authentication and key retention

Startup prints the ordinary address. With a generated key, it also prints the key and fragment login link. The browser removes the fragment and retains a successfully used key in same-origin localStorage for authenticated API requests. Log out removes it and closes protected views. Static assets contain no key.

Key precedence is --apikey, A13N_HARNESS_UI_API_KEY, then a fresh process key. Supplied keys are not echoed, though command-line arguments can be visible to the OS. Empty keys and conflicting repeated values are rejected.

--dangerous-skip-permissions disables Web authentication only; Agent permissions and sharing gates still apply. It cannot be combined with a supplied key. --api-key and --dangerously-bypass-permission remain compatibility aliases. Review CLI options before exposing the listener.

Reverse proxies and public addresses

  1. Add your external address to the selected root YAML. Replace the example with your actual scheme, host, and port:

    YAML
    webui:
      allowed_origins:
        - "https://workbench.example.com:8090"
  2. Configure TLS termination and WebSocket upgrades. Preserve the external Host (including port) and browser Origin; forward the HTTPS scheme as X-Forwarded-Proto: https.

  3. When the proxy connects from an address other than loopback 127.0.0.1, set FORWARDED_ALLOW_IPS in the WebUI process environment to the proxy IPs/networks as seen by that process/container. Have the proxy overwrite client-supplied forwarding headers.

  4. Restart WebUI, open the external address, log in, and check a conversation and interactive connection.

Origin admission matches scheme, domain, and port. The example does not also allow HTTP or port 443. Default [] keeps listener-address restrictions; allowed_origins: ["*"] permits any address. Neither disables authentication or enables cross-origin API access. Trust only actual proxy peers; do not rewrite headers to loopback or use unrestricted forwarded-header trust to evade admission. See allowed origins.

Device pairing returns root-relative paths resolved against the paired Host URL, retaining public HTTPS and port. After approving a Device, confirm its active connection status and OS desktop permissions in Settings.

Restart or update the server

  1. Save private editor changes.
  2. Press Ctrl+C once or send SIGTERM. Wait for WebUI stopped and process exit.
  3. For an update, install the new package after exit using the installation workflow.
  4. Start the replacement with the same data directory. Inspect interrupted conversations and any recovery errors.

Graceful shutdown saves root/child checkpoints, finalizes Environments, and records a restart handoff for each complete task family. One slow family does not block unrelated saved work. The next start consumes the handoff once and continues compatible work in new Runs, retaining completed tool results without resending prompts.

shutdown_timeout_seconds (default 60 seconds) is one shared App grace budget for admission, restart boundaries, and active work. Each phase draws from the remaining time in that shared budget. Press Ctrl+C again to end the remaining grace period and request cancellation sooner while still completing task cleanup and storage finalization.

The grace budget does not bound total process exit. A root still waiting for its model response can retain its last saved request checkpoint after cancellation joins. Unfinished tools or failed checkpoint/Environment finalization exclude that task family. Cancellation and cleanup still take time; trusted Python code that ignores cancellation can delay exit. Use an external process supervisor if you need a hard termination deadline. Let the old process finish before starting its replacement.

After a force kill or process crash, the next same-data WebUI start automatically continues root work only when it was waiting for a model response at an armed, durable checkpoint. The Model may receive that request again; previously saved tool results stay in history. Active asynchronous children do not block a safe root checkpoint, but those children are not restarted. Their saved status remains available, and child inspection identifies missing local ownership. A root interrupted during tool handling, including a child wait, stays outside automatic process-loss recovery. Explicit Stop, archived Threads and pending human decisions stay stopped or waiting. Live, Bot and Memory keep their separate lifecycle policies.

Inspect saved history/logs before retrying uncertain effects or failed reconstruction. Recovery validates the original execution, selected checkpoint and captured configuration before model dispatch; a consumed failed attempt does not retry on every startup. Saved shared composers restore under their retention limits. Native terminals, old Shell handles, and unsaved editors are not restored. Use compatible releases for sequential replacement; a release that cannot read the new recovery record is not a rollback reader.

Server logs and shutdown

Use process.log_level and process.log_format to control logs. INFO reports normal API activity and shutdown phases with elapsed time and remaining App grace; DEBUG adds assets, health probes, and cleanup details. API entries record route templates, status, elapsed time, codes, and generated IDs, excluding bodies, keys, query values, and native paths.

ObservationAction
Stopping WebUIWait for cleanup; WebUI stopped confirms completion
Slow shutdownInspect the reported App phase; press Ctrl+C again to end grace early while completing cleanup
Connection interruptedLet reconnect run or choose Retry now; restart the server first if stopped
thread_history_continuation_changed / thread_continuation_conflictRefresh the conversation
object_payload_incompatibleInspect object/version/validation details in storage warnings; retain the data directory

Reconnect refreshes live observations; review and resubmit any failed saves or inputs explicitly. Browser disconnection leaves Runs and terminals running. WARNING log level hides normal progress.

Listener and application lifetime

The running server owns the App even without browser clients. Non-loopback listening shares instance authority with a trusted network; use TLS and suitable access controls. It does not provide tenant isolation. Unauthenticated /healthz and /readyz expose bounded liveness/readiness; readiness can mean ready for setup before a Model exists.

Compatible TUI/WebUI processes can use one local database across package upgrades. Compatible readers validate their required tables and columns directly while preserving newer migration records. Real storage, continuation/version, and payload incompatibilities still fail. Database compatibility does not share live execution ownership, and released binaries retain their own checks.

Container and installed assets

Install the Python distribution on the workbench Host. Its wheel/sdist bundles compiled WebUI assets, so end users need no Node.js or frontend checkout. Harness UI is distributed as a Python package; custom container deployments should pin the package version and configure listener, authentication, and persistent mounts (the published a13n-sandbox image serves Envd Agent execution sandboxes).

For repository development, make webui builds/installs assets and starts a foreground server with isolated config/data in var/harness-ui/. It prints a generated-key login link when no key was supplied. Use WEBUI_ARGS for server options and CLI_ARGS for global options:

Terminal
make webui WEBUI_ARGS='--port 9000 --no-share-computer'

See the development guide for seeding and environment overrides.

Options and ownership

Listener address, port, authentication, and native sharing are process options. Additional admitted origins live in root YAML. Use the command reference for the complete option list.

For your own client, continue with the HTTP workflow. For in-process integration, use the Python App. For scripts that need no listener, use one-shot execution.

On this page