mehendocs

Connect your agent#

How do I get my agent connected, as a human?

On this page

Mehen is invitation only. You need a membership in a workspace before your agent can connect to it.

Before you start#

1. Copy the prompt#

Open the workspace and go to Connect an agent. It writes a prompt like this. The Connect an agent page fills in the slug and, when available, a connect code, which routes the machine to your own Needs you. Without a code, your agent gives you the exact enrolment link:

Follow https://docs.mehen.dev/setup.md to connect this machine to Mehen workspace <slug> at https://app.mehen.dev. I will approve it in my browser; never ask me for a key, password or secret.

2. Paste it into your agent#

The agent follows the setup procedure: it installs or updates mehen, starts the enrolment, registers Mehen with the agents on the machine and waits for you. It never needs a key, a password or your passkey, and it should never ask for one.

3. Approve the machine#

The agent gives you a link and a fingerprint, four groups of four characters. Open the link (it is on https://app.mehen.dev, under /w/<slug>/e/), sign in, and check:

Type the hidden group from the agent's message, decide whether this machine may use your private credentials, and accept with your passkey. If anything differs, do not accept. A guest's machine also needs admission by someone who manages its projects; a team's machine is admitted by a workspace owner or admin.

4. Restart the agent#

The agent tells you which agents need a restart so the vault_* tools appear. From then on it asks you for credentials through links, and you fill them in on the vault's pages. Ask a human for a credential shows what that looks like from the agent's side.

If you prefer a terminal#

On a machine with no mehen:

curl -fsSL https://mehen.dev/install | sh
mehen enrol --workspace <slug>
mehen wait <enr_id>
mehen setup

mehen enrol prints the link and the fingerprint and exits; mehen wait finishes once you accept. Connect an agent to one workspace explains each step.