hyagency

Isolated hyprland desktop for agents.
git clone https://unitehenry.com/git/hyagency.git
Log | Files | Refs | README

README.md (3268B)


      1 
      2 https://github.com/user-attachments/assets/5f8bdfee-420f-454f-a2aa-aac1a73af5b8
      3 
      4 ## Summary
      5 
      6 This setup includes the following:
      7 
      8 - Isolated hyprland desktop environment with a VNC server for remote usage
      9 - Chromium instance with CDP support
     10 - [Opencode Web UI](https://opencode.ai/docs/web) to interact with browser using `agent-browser`
     11 - [Apache Guacamole](https://guacamole.apache.org) to visually see what the agent is doing, or to interact with the browser directly
     12 - Nginx reverse proxy that exposes services over SSH tunnel
     13 
     14 The idea is to have a browser with personal profiles saved, so an agent can interact with a browser just as a person could. It's also nice to have a remote desktop environment usable through the web to see what the agent is doing, and to pitch in if it needs help getting unstuck.
     15 
     16 ## Architecture
     17 
     18 ```mermaid
     19 flowchart TD
     20     client
     21     nginx
     22     guacamole
     23     guacd
     24     wayvnc
     25     opencode
     26     agent-browser
     27     chromium
     28 
     29     subgraph host
     30         guacamole-->guacd
     31         guacd-->wayvnc
     32 
     33         opencode-- agents/browser.md -->agent-browser
     34         agent-browser-- CDP -->chromium
     35     end
     36 
     37     subgraph proxy
     38         guacamole-- tunnel -->nginx
     39         opencode-- tunnel -->nginx
     40     end
     41 
     42     client-- HTTP Basic Auth -->nginx
     43 ```
     44 
     45 ## Dependencies
     46 
     47 This repository mostly serves as a reference configuration, but here is a list of the dependencies needed to recreate this setup:
     48 
     49 - `docker`
     50 - `chromium`
     51 - `nohup`
     52 - [`hyprland`](https://hypr.land)
     53 - [`agent-browser`](https://github.com/vercel-labs/agent-browser)
     54 - [`wayvnc`](https://github.com/any1/wayvnc)
     55 - [`opencode`](https://opencode.ai)
     56 
     57 ## Usage
     58 
     59 ```bash
     60 # TUNNEL_HOST is optional
     61 TUNNEL_HOST="root@127.0.0.1" scripts/serve
     62 ```
     63 
     64 ### Port Mapping
     65 
     66 | Service | Port | Notes |
     67 |---------|------|-------|
     68 | Guacamole | 8080 | tunnel support |
     69 | Opencode UI | 4090 | tunnel support |
     70 | Guacd | 4222 | |
     71 | Chromium CDP | 9222 | |
     72 | Wayvnc | 5900 | |
     73 
     74 ### Guacamole Login
     75 
     76 Update the login in `guacamole/user-mapping.xml` - the default login:
     77 
     78 ```
     79 Username: admin
     80 Password: password
     81 ```
     82 
     83 ## Security
     84 
     85 The nginx reference uses HTTP basic authentication with the intent to host the Opencode UI and Apache Guacamole instance on the internet. If your intent is to adopt the same configuration, be sure to enable SSL on the public server used to serve as your reverse proxy. Otherwise, the basic auth credentials will be unencrypted in traffic and anyone will have remote access to your machine.
     86 
     87 The nginx reference configuration also includes unauthenticated rate limiting so attackers can't brute force the password.
     88 
     89 ## Hyprland Workspaces
     90 
     91 When creating a virtual monitor with hyprland, all unused workspaces get moved to the new monitor by default. Consider pinning the workspaces you want to keep in your primary environment:
     92 
     93 ```
     94 workspace = 1, monitor:HDMI-A-1, persistent:true
     95 workspace = 2, monitor:HDMI-A-1, persistent:true
     96 workspace = 3, monitor:HDMI-A-1, persistent:true
     97 workspace = 4, monitor:HDMI-A-1, persistent:true
     98 workspace = 5, monitor:HDMI-A-1, persistent:true
     99 workspace = 6, monitor:HDMI-A-1, persistent:true
    100 workspace = 7, monitor:HDMI-A-1, persistent:true
    101 workspace = 8, monitor:HDMI-A-1, persistent:true
    102 workspace = 9, monitor:HDMI-A-1, persistent:true
    103 ```