Agent
Interactive chat with the Browserless hosted agent. The LLM runs server-side and drives a browser for you.
Command: browserless agent [prompt]
The agent supports multi-turn conversations: type follow-up prompts at the > prompt. Previous prompts are recalled with the up arrow (history stored in ~/.browserless/agent_history, capped at 200 entries).
If the first prompt has login intent, the CLI prompts for username and password (masked) and prepends a credentials block so the agent can authenticate on your behalf.
When the agent pauses for input (e.g. an MFA code), it prompts you inline. Press Enter on an empty line or Ctrl-C to exit.
- The Browserless CLI installed (
npm install -g @browserless.io/cli) - A Browserless API token from your account dashboard
Flags
--no-historyDisable reading and writing prompt history.--jsonEmit the final structured result as JSON to stdout. Streaming events still render during the turn, but only theendpayload is written to stdout.
Examples
Open the interactive REPL
browserless agent
Pass an initial prompt directly
browserless agent "Log in to GitHub and star browserless/browserless"
FAQ & Troubleshooting
The CLI command isn't recognized
Verify the CLI is installed globally with npm list -g @browserless.io/cli. If missing, run npm install -g @browserless.io/cli to install it.
How do I authenticate the CLI?
Run browserless auth and enter your API token when prompted. The token is stored locally for subsequent commands.