vitro DocsPricing

Handing a page to a person.

For logins, 2FA, captchas and payments: the agent asks, you finish the step, and it never sees what you type.

Why hand a page over

Some steps belong to a person: a login, a 2FA code, a captcha, a payment, or confirming something that cannot be undone. With a handoff, the agent says what it needs, a person does that one step on the wall, and the agent carries on from wherever the page ended up.

The person types into the page through the wall. Nothing they type reaches the agent or the journal, and vitro keeps no frame of the page while they hold it.

From the agent's side

request_handoff(session_id, lease, page_id,
                reason: "Log in to GitHub as the staging user",
                kind: "login")
  -> {ticket: "...", status: "waiting"}

wait_for(session_id, lease, handoff: ticket)
  -> {status: "done", note: "...", url: "...", title: "...", next: "..."}

request_handoff returns a ticket at once and does not hold the call open: a person is slower than most clients' tool-call timeouts. Wait for the person with wait_for(handoff:), which needs no page_id.

  • reason is required and is shown to the person word for word, up to 280 characters. Ask for one step and say exactly what it is. Never put a secret in it.
  • kind is one of login, 2fa, captcha, payment, confirm or other (the default).
  • timeout_ms is how long the request stays open before the page goes back to the agent: 10 minutes by default, anywhere from 10 seconds to 1 hour.
  • wait_for(handoff:) waits 60 seconds by default and at most 10 minutes. If it times out, the person still has the page, so call it again.

A handoff's status ends as one of these:

done
The person finished the step. Their note, if they left one, comes back with it.
declined
The person will not do it. Do not ask again for the same step.
released
A person took the page without being asked, and has handed it back.
timed_out
Nobody took it before timeout_ms. The page is the agent's again.
closed
The session went away while the handoff was open.

The answer also carries the page's current URL and title, and a next line saying what to do. The page has probably changed: snapshot before acting, and check the step worked (for example with expect).

What the agent can do while it waits

While a handoff is open, the page belongs to the person. The agent can call get_page_state, list_pages and session_info to watch the URL and title. vitro refuses every call that reads or acts on the page's content, including snapshot, screenshot, get_html, find, click and fill.

Some tools can reach the login in progress, so vitro refuses them on every page of the session: evaluate, wait_for on text or an expression, get_storage_state, set_storage_state, get_network_request and get_console_logs.

A page can have one open handoff at a time. Asking for a second returns the first ticket.

From the person's side

The session's pane on the wall shows the agent's reason and the site, read from the page itself, so an agent steered to a lookalike login cannot hide where it is.

  1. Press Take control. Your mouse and keyboard now reach the page.
  2. Do the step. Paste and input methods work as they would in a text field.
  3. Press Done, with an optional note for the agent, or Decline.

If you close the window while you hold the page, the request stays open and goes back to waiting for somebody to take it.

You can also take a page nobody asked for: press Take over on any live session. The agent is paused on that page until you press Hand back or close the window.

An open handoff keeps its page awake and its session from stalling.

How you are told

On the desktop, the app shows a native notification with the reason and the site. On hosted, the member whose key opened the session gets an email. When no member owns the key, the team's admins get it. vitro sends at most one email per session every 10 minutes, so an agent asking in a loop cannot fill an inbox. The email quotes the agent's words with links removed, and never contains a frame, a URL path or anything typed.

The reason is the agent's own text, and a page can steer an agent. vitro's emails only ask you to sign in at vitro.run and only link there. Check the site shown beside the reason before you type a password.

What is recorded

The session's timeline records the handoff's kind, reason, who started it, and how it ended. Your input never passes through the tool layer, so what you type is never recorded.

While you hold the page, its frames go live to your window only. vitro does not keep them as the session's latest picture, add them to the scrubber or write them to disk, so a replay of the run has a gap where the handoff was.

After the handoff

A handoff keeps the secret from the agent, but the agent can use the signed-in session it creates. When the handoff ends, every tool works again on the new sign-in. get_storage_state returns the session's cookies, including the one the login set, and evaluate, get_network_request and the page reads can return them too. A stalled session saves its cookies and resumes signed in.

Hand over a login only in a session you would let the agent use signed in. When the work is done, close the session or sign out of the site in it.

Where it is offered

request_handoff and wait_for(handoff:) are offered only where a person can take the page: the desktop app and the vitro.run wall. A client that does not list the tool is connected to an instance with no wall.