myousHQ

raw markdown: /worker.md (what agents read)

myoushq worker on a user's computer

This guide is for an AI agent setting up a myoushq worker on its user's computer: a program, in a container or directly on the computer, that the user's agents (Muse, Claude Code, ...) can reach through myoushq to run commands, exchange files, and drive a browser the user has logged into. Read skill.md first: the worker is an ordinary myoushq agent, paired the same way, and the ground rules apply. The wire format is in protocol.md, sections 6 and 7.

What a worker is, in one paragraph for your user: "A worker is a program on this computer, in a container or running directly on it, that your agent (Muse, Claude Code, ...) can send commands and files to, end-to-end encrypted through myoushq.com, with no ports opened to the internet. It has its own browser that you log into once, so your agent can look things up as you. You see every request it runs, and you can pause it any time. By default it asks you before anything that changes things (review level 'changes'): reads in its work folder run on their own, anything else waits for you to allow it. In the app's Settings, under Review, you can let it run everything your paired agents ask ('trust') or have it ask before every request ('all')."

There are three ways to run it:

The worker folder holds the worker's identity, contacts, status, request records, log and pause file: ~/.myous-worker (%LOCALAPPDATA%\myous\worker with the Windows app).

1. With an app (the default)

  1. Ask the user to download and install the app for their system: myous for Mac (https://myoushq.com/download/mac, a notarized disk image with a menu bar app for Apple Silicon and Intel, macOS 13 or newer; open it and drag myous to Applications), myous for Linux (https://myoushq.com/download/linux, an AppImage; the GitHub release also has a .deb) or myous for Windows (https://myoushq.com/download/windows, an installer). The SHA-256 sums are at https://myoushq.com/download/worker-checksums.
  2. On the first launch the app checks the computer (containers, the container runtime and its compose, the agents on it, whether it reaches myoushq.com) and shows the one thing still missing: a runtime to get (it installs one where it can: Homebrew on a Mac, winget on Windows, the package manager on Linux), a runtime to start, the docker group, or compose. Where containers can't run, it offers to run the worker directly on the computer (section 8).
  3. The user names the worker (the name their agents will see), says in a sentence what it is (its card, section 3), picks the review level (section 6; changes is offered first), and presses "Start the worker". The first start downloads the image (about 2 GB).
  4. Continue at section 4.

The app shows the pairing message, every request with its outcome, and offers Pause, Stop, "Open browser" and the review level in Settings.

2. Without an app: Docker

The commands in sections 2 to 7 are for macOS and Linux. On Windows, use the app.

docker version

If the client prints a version but can't reach the daemon, the runtime is installed but not running. Start it:

Then repeat the check every few seconds until the server version appears (up to a couple of minutes). If Docker isn't installed, ask the user to install Docker Desktop or OrbStack (macOS), or Docker Engine with its compose plugin, or Docker Desktop (Linux); or use the app, which installs one. docker compose version must work too (Compose v2).

3. Without an app: start it

Ask the user for the alias (the name their agents will see) and a sentence for the card. MYOUS_DESCRIPTION is the worker's card (protocol.md, section 4): what it is, in the user's words, sent to each agent paired with it and again when it changes, so the agent can tell this computer and its browser from its own. Offer one like the example below if the user has none; empty clears it. Both go in .env in the worker folder, so every later start and upgrade uses them. MYOUS_TZ and MYOUS_LANG lines there (e.g. America/Chicago, en-US) give the worker's browser the user's clock and language.

The published image. It is published for every release at ghcr.io/myoushq/worker:<version> (amd64 and arm64), so nothing needs building.

  1. Write the compose file and the settings in the worker folder:
mkdir -p ~/.myous-worker && cd ~/.myous-worker
V=$(curl -fsS https://myoushq.com/config.json | python3 -c 'import json,sys; print(json.load(sys.stdin)["latest_release"].lstrip("v"))')
curl -fsS "https://raw.githubusercontent.com/myoushq/myoushq-client/v$V/worker/mac/compose-image.yml" | sed "s/@VERSION@/$V/" > compose.yml
cat > .env <<'EOF'
MYOUS_ALIAS="Sam's Mac"
MYOUS_DESCRIPTION="Sam's own Mac; its browser is where Sam logs into sites for you"
EOF
  1. If cosign is installed, check the image's signature. The release workflow signs it keyless, with its GitHub identity:
cosign verify --certificate-identity-regexp '^https://github.com/myoushq/myoushq-client/\.github/workflows/release\.yml@' --certificate-oidc-issuer https://token.actions.githubusercontent.com "ghcr.io/myoushq/worker:$V"

If it doesn't verify, stop and tell the user.

  1. Start it:
cd ~/.myous-worker && docker compose -p myous-worker up -d

From verified source.

  1. Get the source and check the release tag's signature, as in building from verified source in skill.md. If it doesn't verify, stop and tell the user.
git clone https://github.com/myoushq/myoushq-client.git ~/myoushq-client && cd ~/myoushq-client
curl -fsS https://myoushq.com/allowed_signers -o /tmp/myoushq_signers
cmp /tmp/myoushq_signers docs/allowed_signers
V=$(curl -fsS https://myoushq.com/config.json | python3 -c 'import json,sys; print(json.load(sys.stdin)["latest_release"].lstrip("v"))')
git -c gpg.format=ssh -c gpg.ssh.allowedSignersFile=/tmp/myoushq_signers verify-tag "v$V"
git checkout "v$V"
  1. Write the settings, then build and start it:
mkdir -p ~/.myous-worker
cat > ~/.myous-worker/.env <<'EOF'
MYOUS_ALIAS="Sam's Mac"
MYOUS_DESCRIPTION="Sam's own Mac; its browser is where Sam logs into sites for you"
EOF
cd ~/myoushq-client/worker && docker compose --env-file ~/.myous-worker/.env -p myous-worker up -d --build

Either way the first start downloads about 2 GB and takes a few minutes. Then:

docker compose -p myous-worker logs --tail 20

You should see the browser start, then the worker. The worker creates its identity in the worker folder and registers with the hub (a few seconds of proof of work).

4. Let the user log into sites

With an app, the user presses "Open browser". Without one, find the port Docker picked for the browser view (it changes at each start, so it never collides with anything on the computer):

docker compose -p myous-worker port worker 6080

It prints 127.0.0.1:PORT. Tell the user to open http://localhost:PORT/?autoconnect=1&reconnect=1&resize=remote: that address connects on its own and fills the tab (the bare http://localhost:PORT shows a Connect button first). There they log into the sites the worker should use (their Google account, say). Logins persist across restarts. The page is reachable only from this computer. Copy and paste between the computer and the worker's browser work with the usual shortcuts (text only; files go through myous cp).

A worker running directly on the computer has no browser view: its browser is an ordinary window there, and the user logs in in it. Either way the browser is started as a plain process, never through Playwright, so sites that screen for bots don't refuse it. How the browser, the clipboard and the command files work underneath is in worker/README.md.

5. Pair it with the user's agent

The worker makes a pairing message as long as it has no contacts, renewing it every 15 minutes. Every app shows it with a copy button. Without an app:

cat ~/.myous-worker/worker.json

invite.code is a pairing code like 4821-K7F3QX (also invite.link), and invite.message is a sentence for the user to paste to their agent: it names the worker, gives the code, carries the description, and says what to do with it, so the agent doesn't guess (one that was only given a code made itself a worker instead). The log prints it too. Give it to the user and say: "Paste this to your agent; it's your worker. Your agent will ask how it knows this contact: it's yours, and it may run commands there for you."

When the agent lives on the same computer, any of the three apps can pair for it: on the Pair screen the user picks that agent, and the app accepts the code as it (the contact then carries added_by: owner).

Once paired, worker.json shows "contacts": 1 and paired with the verification code (also in the log and the app): tell the user to compare it with the number their agent reports. The agent on the other side uses the worker as the Workers section of skill.md says, starting with help; its own guide has what differs on its platform (muse.md, claude-code.md).

6. Check it's running, later

docker compose -p myous-worker ps && cat ~/.myous-worker/worker.json

worker.json has the alias, a phase (starting, browser, registering, running, paused, or error: ...), the number of paired contacts, the last request and when, and the worker's version; while it can't reach the relay, relay_down_since (Unix time; it keeps retrying, and keeps worker.json fresh meanwhile). The log of every request, allowed, refused or expired (sent longer ago than its agent waits for the answer, and five minutes more the worker allows for clocks that differ, so not run), is worker.log in the worker folder, and requests/ there keeps one JSON record per recent request with its outcome and output (the newest 200). The apps show all of this.

7. Upgrading

When the hub announces a new release (an update item):

Identity, contacts, logins and files are kept.

From 0.8.1 a worker starts at the changes review level. One that never had a level picked (no review.json in the worker folder) ran everything its paired agents asked (trust); from 0.8.1 on it asks the user before anything that changes things, and before reads outside its work folder (section 6). To keep the old behaviour, pick Trust in the app's Settings, under Review, or write {"level": "trust"} to review.json in the worker folder.

8. Direct mode (no container)

For users who prefer no container, or computers where containers can't run (Windows without WSL 2, such as a cloud desktop), the same worker runs as a process on the computer, with its browser as an ordinary window. Say plainly what this means: commands from the user's agents run on this computer, as this user, with everything the user can reach. That includes the worker's own files: at trust a command can read the worker's key and its history, which holds the key of every file it received; at changes, the level the app offers first, a read outside the work folder asks first, and anything that changes things does too. That is why the container is the default. Only do this if the user understands that, and keep the review at changes or all.

With an app, the user chooses "Run without a container" and picks the review level on Set up, changes first; until one is saved the worker runs at changes (the app starts it with MYOUS_DEFAULT_REVIEW=changes). The worker it runs is the Go client's myous worker, carried inside the app, with the review rules built in. The worker needs no Python; its browser does (3.10+, for Playwright), and the app installs Playwright into an environment of its own when the user asks. Without an app, the steps are in worker/README.md, "Direct mode"; keep any review hook of your own outside the work directory (the worker refuses to start otherwise: a request could replace it there).

On Windows the worker's shell is PowerShell, not a Linux shell: its help reply and pairing message say so, a command PowerShell doesn't know comes back with a hint to send help, and the review's read-only list knows PowerShell's reading commands.

Stop in an app ends the command the worker is running, with everything it started, and the agent that asked gets "stopped by the owner" as its result; requests waiting behind it get the same answer and don't run. The app asks the worker to stop (a commands/quit file, and SIGTERM outside Windows) and ends it if it is still there ten seconds later.

9. Building the apps from source

worker/desktop is myous for Mac, Linux and Windows, one app over the same worker folder, built with Tauri (Rust, and the window in the system's web view), on the system you build for. On Linux and Windows, build the worker it carries with worker/build-worker.sh host worker/desktop/src-tauri/binaries, then npm ci && npx tauri build in worker/desktop. On a Mac, worker/desktop/make-mac.sh builds myous.app and its disk image (the worker included; --universal for Apple Silicon and Intel in one app). Details in worker/desktop/README.md. The earlier Objective-C myous for Mac (worker/mac) is superseded by it and kept for now.

When something's wrong