Deploying Hermes AI Agent and WebUI on GCP: A Step-by-Step Hands-On Guide
The AI Agentic space is moving incredibly fast. In the Google Workspace ecosystem, we’ve recently been introduced to Gemini Spark — your…
Deploying Hermes AI Agent and WebUI on GCP: A Step-by-Step Hands-On Guide
The AI Agentic space is moving incredibly fast. In the Google Workspace ecosystem, we’ve recently been introduced to Gemini Spark — your 24/7 personal AI agent designed to help navigate your digital life. It works autonomously in the background, even when your laptop and phone are turned off, while always remaining under your direction.
As a Google Workspace developer, this got me thinking. I wanted to start testing and jump headfirst into this AI Agentic space. To begin exploring autonomous workflows in the cloud, I decided to deploy Hermes (an open-source agent by Nous Research) along with its beautiful WebUI (by nesquena) on Google Cloud Platform (GCP).

In this walkthrough, I’ll share my hands-on experience setting up Hermes Agent and Hermes WebUI on a cost-effective GCP VM, complete with Chrome Remote Desktop for remote GUI access so you can watch your agent work in real time.
Edit : If you like Antigravity check OpenGravity to turn Antigravoty to autonomous agent.
The Stack
To run a graphical browser, a Python execution environment, and the agent server, we don’t need a heavy, expensive machine. I chose:
- VM Instance: GCP Compute Engine
e2-medium(2 vCPUs, 4 GB RAM) - cheap, yet perfectly capable. - OS: Ubuntu 26.04 LTS.
- Remote Display: Chrome Remote Desktop running a lightweight XFCE desktop environment.
- Agent Engine: Hermes Agent & Hermes WebUI, powered by Google Gemini (via Google AI Studio).
Step 1: Provisioning the GCP Instance
First, create a new VM instance in your Google Cloud Console with the following settings:
- Name:
hermes-agent-workspace - Region: Your preferred region (e.g.,
us-central1oreurope-west9). - Machine Type:
e2-medium(2 vCPUs, 4 GB RAM). - Boot Disk: Ubuntu 26.04 LTS (30 GB Balanced SSD in OS and Storage tab).
- API Access: Go to Security and check Allow full access to all Cloud APIs.

VM Instance on Google Cloud Platform to install Hermes Agent
Save money : if you want to run your agent for a lower cost you can select “Spot” in VM provisioning model on the tab Machine Configuration, this will cut price by 2 (50% discount).
Step 2: The Sudo & OS Login Setup
During installation, the Hermes bootstrap script will need to install system packages (like ripgrep, ffmpeg, and compilation tools) using sudo. On GCP, the default OS Login security policy restricts sudo commands. You might run into:
sudo: I'm sorry <username>. I'm afraid I can't do that
Even if you are the project Owner, you will be blocked. To resolve this, we will disable OS Login on this VM and inject a startup script to set up our user’s root rights.
Why do this? Disabling OS Login simply reverts the VM to standard metadata-based SSH key management. This is a common and standard practice for development instances to allow straightforward user and permissions configuration without impacting the security of your cloud network.
- Edit your VM details in the GCP Console.
- Under Metadata, add
enable-oslogin=FALSE.- Under Automation, find the Startup script text box (do not add it in the general metadata table) and paste:
#!/bin/bash
echo "your_gcp_username ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/hermes-sudo
chmod 0440 /etc/sudoers.d/hermes-sudo
Make sure to replace
your_gcp_usernamewith your actual GCP login username. You can fin it in the SSH connexion check below or in the page of the VM, if you go to section “SSH Keys”, under Username you have the id.
- Click Save and Stop/Start (Reboot) the VM. A full reboot is mandatory to reload the PAM and SSH security configurations.
Once the VM is back online, SSH in and verify with sudo whoami. It should print root immediately.
Step 3: Graphical Environment & Chrome Remote Desktop
Next, we will install the graphical interface and Chrome Remote Desktop. Open SSH from the console, in the VM page you must see a SSH button, click and select “Open in browser window”. Run this in your SSH terminal:
# Update system and install XFCE (Lightweight GUI)
sudo apt update && sudo apt upgrade -y
sudo apt install xfce4 xfce4-goodies lightdm dbus-x11 -y*
# Select 'lightdm' as the default display manager when prompted.
# Install Google Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb -y
# Install Chrome Remote Desktop
wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
sudo apt install ./chrome-remote-desktop_current_amd64.deb -y
# Configure Chrome Remote Desktop to start XFCE by default
echo "exec /usr/bin/xfce4-session" > ~/.chrome-remote-desktop-session
Suppressing the Color Profile Authentication Popup
When logging into XFCE remotely, the system color daemon ( colord) will continually prompt you for authentication. Bypass this by adding a Polkit rule:
sudo tee /etc/polkit-1/rules.d/45-allow-colord.rules << 'EOF'
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.color-manager.") === 0) {
return polkit.Result.YES;
}
});
EOF
sudo systemctl restart polkit
Step 4: Connecting to the GUI
-
On your local machine, open Chrome and go to remotedesktop.google.com/headless.
-
Sign in, click Begin -> Next -> Authorize. Copy the Linux setup command.

- Paste the command in your GCP SSH terminal, set a 6-digit PIN, and restart the service:
sudo systemctl restart chrome-remote-desktop@your_gcp_username
(Replace your_gcp_username with your actual GCP SSH username).
- Access your remote desktop at remotedesktop.google.com/access.

Access Hermes Agent with Chrome Remote Desktop
Keyboard Tip: If you use a French keyboard, open the terminal in the remote desktop and type
setxkbmap frto switch from QWERTY to AZERTY.
Step 5: Installing Hermes Agent & WebUI (The Automatic Bootstrap)
The best part about Hermes WebUI is its automatic installer script. You don’t need to manually configure virtual environments or install complex browser automation tools.
In your remote desktop’s terminal, run:
# Install git and python venv
sudo apt install python3-pip python3-venv git curl -y
# Clone Hermes WebUI
cd ~
git clone https://github.com/nesquena/hermes-webui.git
cd hermes-webui
# Launch the bootstrap script
./start.sh
Important, read carefully the different splash screen during setup, I made most of my setup using Gemini but check all step and select what is the preferred tool.
What Happens Behind the Scenes:
The ./start.sh script detects that the Hermes Agent is missing and downloads the installer. It will:
- Install Astral’s
**uv** package manager. - Install an isolated version of Python 3.11.15 via
uv. - Install Node.js 22 LTS for browser tools.
- Clone the
nousresearch/hermes-agentcodebase to~/.hermes/hermes-agent. - Create a dedicated virtual environment, install all Python dependencies, and sync 74 bundled skills (such as codebase inspection, web search, etc.).
- Detect Google Chrome at
/usr/bin/google-chromeand configure the agent to use the system browser directly.
Step 6: Wizard Configuration and Launching
During the installation, an interactive CLI Setup Wizard will start:
Inference Provider: Paste your Google AI Studio API Key (GOOGLE_API_KEY).
- Model Selection: The wizard will automatically query the registry and set the default model to
**gemini-3.5-flashor `gemini-3.1-flash-lite` **for lower cost. - Terminal Backend: Keep the recommended default:
local. - Tools Configuration: Select the tools you want to activate (e.g., Browser Automation, Web Search, Text-to-Speech). The browser automation will automatically hook into your local Google Chrome installation.
- Reload Shell: Once finished, reload your shell:
source ~/.bashrc
The WebUI server will then launch automatically on port **8787**:
[bootstrap] Starting Hermes Web UI on http://127.0.0.1:8787
Hermes Web UI listening on http://127.0.0.1:8787
Step 7: Watching the Agent Work
Open Google Chrome inside your remote desktop session, and navigate to:
http://localhost:8787
You will see the three-panel Hermes dashboard. Start a new chat session in the center panel and give the agent a task, such as: “Open Google, search for ‘Devoteam G Cloud’ and list the main tabs.”

Hermes Agent running on Google Cloud Platform through Chrome Remote DEesktop
Because we set up Chrome Remote Desktop, you will see a new Google Chrome window automatically spawn on your virtual desktop. You can watch the agent control the browser, fill out inputs, click links, and navigate the page while returning the results dynamically to your WebUI chat interface!
Bonus: Maintenance & Relaunch Cheat Sheet
After a VM reboot or connection drop, you might need to restart your services. Here is a quick reference guide:
1. Relaunching the WebUI Server
The WebUI server does not start automatically on boot. To relaunch it, open your terminal (via SSH or within the desktop) and run:
cd ~/hermes-webui
source venv/bin/activate
./start.sh
If you prefer to run it in the background so it continues running even if you close the terminal, use the control script:
cd ~/hermes-webui
source venv/bin/activate
./ctl.sh start
2. Restarting Chrome Remote Desktop
If the desktop interface becomes unresponsive or goes offline after a configuration change, restart the user-specific service:
sudo systemctl restart chrome-remote-desktop@your_gcp_username
(Be sure to replace your_gcp_username with your actual GCP SSH username).
Conclusion
The goal of this article was to provide a step-by-step guide to get started with Hermes, an agent that can run autonomously in the background and achieve tasks. Setting it up on GCP alongside Chrome Remote Desktop gives you a highly visible, cloud-based workspace that keeps your local machine free.
Exploring autonomous agents in the cloud is the first step towards a new era of productivity. If you are looking to integrate agentic workflows, automate workspaces, or want to discuss how this technology fits into the future of Google Workspace development, feel free to connect with me on LinkedIn. Let’s build the future of work together!
메타데이터
- post_id
- ee32303c4bfb
- slug
- deploying-hermes-ai-agent-and-webui-on-gcp-a-step-by-step-hands-on-guide-ee32303c4bfb
- url
- https://medium.com/google-cloud/deploying-hermes-ai-agent-and-webui-on-gcp-a-step-by-step-hands-on-guide-ee32303c4bfb
- canonical_url
- https://medium.com/google-cloud/deploying-hermes-ai-agent-and-webui-on-gcp-a-step-by-step-hands-on-guide-ee32303c4bfb
- author_url
- https://medium.com/@stephane.giron
- status
- ok
- fetched_at
- 2026-07-13 06:23:13