# Let an agent drive an authorized browser

Use mao portal commands to inspect and interact with a browser connected to an agent.

A connected agent can inspect and interact with a live browser portal through the MAO bridge. The terminal must be connected to that portal.

## Drive a connected portal

1. Connect the agent terminal to the browser portal.
2. Run `mao portal navigate <portal> <url>` to open a page.
3. Use `mao portal info`, `screenshot`, or `snapshot` to inspect it.
4. Use `click`, `fill`, `type`, `key`, `scroll`, `text`, or `evaluate` for the interaction you need.
5. Run `mao portal close <portal>` when you are done.

> **Limit:** Each operation checks the connection. These commands control an existing live portal; they do not launch a browser by themselves.

Source: https://trymao.dev/docs/portals-browser-android-ios/browser-portal-cli
