@browserless/agent weekly downloads statistics
By browserless · npm · AI SDKs
Drive a Puppeteer page toward a natural-language goal using finite decisions.
@browserless/agent has 5,385 recorded weekly downloads on npm, an increase of 365% over the past 30 days, ranking #1498 of 3,247 tracked listings.
About @browserless/agent
@browserless/agent
Drive an existing Puppeteer page toward a natural-language goal. The caller owns
navigation, browser setup, screenshots and closing the browser. This package does
not change @browserless/ai, which uses Chrome's built-in AI APIs.
Experimental. It has completed a live Wallapop search (see below), but done
is the model's own judgment and runs are not fully reliable.
Usage
Requires Node.js >=24. After the package is published:
npm install @browserless/agent puppeteer
export AI_GATEWAY_API_KEY=...
import puppeteer from 'puppeteer'
import agent from '@browserless/agent'
const browser = await puppeteer.launch()
const page = agent(await browser.newPage())
await page.goto('https://wallapop.com', { waitUntil: 'networkidle2' })
const { status, profiling } = await page.goal('busca el bmw x3 más barato')
if (status === 'success') {
const { data } = await page.extract('get the search results', {
products: {
attr: { name: { type: 'string' }, price: { type: 'number' }, url: { type: 'url' } }
}
})
console.log(data.products)
}
const { accuracy, cost, timing } = await profiling() // optional: one extra request, for accuracy
await browser.close()
agent(page, defaults?) adds two methods to the Puppeteer page it is given
and returns the same page:
page.goal(goal, options?)drives the page, over as many steps as it takes, until the model reports the goal is met.page.extract(...)returns data from the current page. It does not navigate.
defaults apply to both; options passed to a call override them, and an option
passed as undefined or null keeps the default. The same
functions are exported for use without touching the page: agent.goal(page, …)
and agent.extract(page, …).
Import compatibility is CommonJS plus the Node ESM default import, with TypeScript declarations.
From the browserless CLI
browserless exec <file> from @browserless/cli opens a page and passes it to
the function the file exports, so the script does not manage the browser:
const agent = require('@browserless/agent')
module.exports = async ({ page: browserPage, browserless }) => {
const page = agent(browserPage)
await browserless.goto(page, { url: 'https://wallapop.com' })
return page.goal('busca el bmw x3 más barato')
}
browserless exec agent-example.js
A goal or an extraction that fails does not throw: the script gets
status: 'error' with error and decides what to do. The CLI exits with code 1
only when the script itself throws, so a script that should fail the command
throws that error.
Examples
Every file in examples/ is an exec script: it navigates, gives
the page one or more goals, and returns the extracted data, which the CLI
prints. A goal or an extraction that fails makes the script throw its error. Jev is used through the gateway, so AI_GATEWAY_API_KEY is the only
key needed. With DEBUG=browserless:agent, each goal also logs one line with
its status, accuracy, cost and timing. The examples call profiling() for every goal
whether or not the line is printed, so each goal makes the one evaluation
request.
| Script | Steps |
|---|---|
examples/wallapop.js | Search bmw x3; sort by lowest price; extract the products |
examples/wikipedia.js | Search for an article and open it; extract title and first paragraph |
examples/google-flights.js | Reject cookies if asked; find one-way Zurich to London flights 30 days from today; extract the flights |
examples/hacker-news.js | Open the comments of the first story; extract title, points and comments |
examples/github.js | Open the open issues of this repository; extract them |
examples/run.js | Any page: --url=<url> --goal=<goal> --extract=<what to get> |
browserless exec examples/wallapop.js --no-headless
DEBUG=browserless:agent browserless exec examples/hacker-news.js --no-headless
browserless exec examples/run.js --no-headless --url=https://en.wikipedia.org/wiki/Main_Page --goal='Find and open the Wikipedia article about Alan Turing.' --extract='get the article title'
--no-headless opens a visible browser window, so every step the agent takes
can be watched. Without it the browser runs headless.
const agent = require('@browserless/agent')
const debug = require('debug-logfmt')('browserless:agent')
const { flat, succeeded } = require('./util')
module.exports = async ({ page, browserless }) => {
agent(page)
await browserless.goto(page, { url: 'https://wallapop.com' })
const searched = await page.goal('busca "bmw x3"')
debug('search', { status: searched.status, ...flat(await searched.profiling()) })
succeeded(searched)
const sorted = await page.goal('ordena los resultados de más barato a más caro')
debug('sort', { status: sorted.status, ...flat(await sorted.profiling()) })
succeeded(sorted)
const { data } = succeeded(
await page.extract('get the search results', {
products: {
attr: { name: { type: 'string' }, price: { type: 'number' }, url: { type: 'url' } }
}
})
)
return data
}
npm start runs the Wallapop one. All six were run as shipped on a paid gateway
account and returned data matching their goal: 32 Wallapop products sorted by
lowest price, the Wikipedia title, 48 flights with prices, a Hacker News story
with its points and comments, 4 GitHub issues, and Alan Turing. That is a
check that they can work, not a reliability figure. What went wrong along the
way:…
Description from the npm listing.
- agent
- ai-sdk
- browserless
- jev
- puppeteer
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm AI SDKs plugins
All 20 @browserless/agent alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@browserless/agent. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.