# Browser use

Fl0w's browser use drives the Google Chrome browser on your local computer and [remote computer](/docs/how-it-works). Install the CLI from the [Quickstart](/docs/quickstart) to try it locally first.

*Note: If you do not have Chrome on your computer, you will need to [install it](https://www.google.com/chrome/) to use browser use. Remote computers comes with Chrome installed.*

<Image src="/docs/browser-use.png" width={1888} height={1219}
 alt="Generating a workflow from a session with /generate"
 sizes="(max-width: 800px) 100vw, 640px"
 className="mt-4 h-auto w-full max-w-2xl rounded-lg border border-line/80" />

## Logging in to accounts

Fl0w can use the chrome browser to login to your accounts. This generally works best for accounts with the following:

1. Username and Password Auth
2. If 2FA is enabled, instruct fl0w to use email tools to get the code (often via an [MCP connector](/docs/guides/mcp-connectors))
3. Does not work as well with OTP

### Use Secrets to add username and passwords

You add **usernames and passwords as secrets** for fl0w to fill in login forms as it uses the browser. Full CLI flags and `secrets.json` format are in the [CLI reference](/docs/cli#secrets).

<Image src="/docs/login.png" width={2070} height={1550}
 alt="Generating a workflow from a session with /generate"
 sizes="(max-width: 800px) 100vw, 640px"
 className="mt-4 h-auto w-full max-w-2xl rounded-lg border border-line/80" />

***Note: Secrets are not exposed to the agent. When an agent fills in the form, the secret is substituted and never exposed to the agent and it's context window.

You can add secrets in the CLI:
```bash
fl0w secrets add github --domain github.com          # prompts for username/password
fl0w secrets add openai --field token --env          # token for the bash tool
fl0w secrets remove github
```

Or via the `~/.fl0w/secrets.json` file directly (mode `0600` — each top-level
key is a name, every other string is a field):
```json
{
  "github": {
    "domains": ["github.com"],
    "username": "ada",
    "password": "…"
  }
}
```

`domains` limits where the agent may fill the secret in browser forms
(`https` only; `"*"` = any site). 

## Helping your fl0w agent

**Browser use can actually be interactive!** Some web pages:

* Don't allow AI computer use
* Have iFrames or hard-to-use components that agents have difficulty with

When running fl0w locally, you can use help click on components as the agent is working.

## Browser use remotely

Unlike running fl0w locally, you won't be able to see the Chrome browser in remote mode. 

***Best practice is to create a workflow locally with [`/generate`](/docs/slash-commands), then run it in your remote computer with [Automating sessions](/docs/guides/automating-sessions).***

The good news is, like your MCP auth and Skills, your secrets and the cookies in your Chrome session are [synced](/docs/how-it-works#zero-configs) to your remote computer. This means most authenticated sessions should work remotely after it works on your local Chrome session.
