cookbook / chrome
Headless Chrome
A headless Chromium with a WebSocket endpoint for Playwright or Puppeteer.
- browser
- testing
Run it
briq_run({
recipe: "chrome",
params: {
"size": "small"
},
wait: true
})briq run chrome
briq ls
briq logs -f <id>
briq rm <id>import { Briq } from '@briq/sdk';
const briq = new Briq(process.env.BRIQ_API_KEY);
const chrome = await briq.run({
recipe: 'chrome',
params: {
"size": "small"
},
});
console.log(chrome.outputs.BROWSER_WS_ENDPOINT);
// ... when done
await briq.destroy(chrome.id);Parameters
| Name | Type | Options | Default |
|---|---|---|---|
| size | enum | small, medium, large | "small" |
Outputs
Returned by briq_run once the stack is healthy. Hosts resolve inside your team network; secrets are generated per run.
- BROWSER_WS_ENDPOINT
- ws://chrome.<stack>.internal:3000?token=<BROWSERLESS_TOKEN>
- BROWSERLESS_URL
- http://chrome.<stack>.internal:3000
- BROWSERLESS_TOKEN
- <BROWSERLESS_TOKEN>
What it runs
| Briq | Image | Ports | Size | Volume |
|---|---|---|---|---|
| chrome | ghcr.io/browserless/chromium:latest | 3000 | small | — |
When to use it
- Your tests or your agent need a real browser: Playwright, Puppeteer, PDF rendering, screenshots.
- You do not want to install Chromium where the agent runs.
The briq runs Browserless Chromium and outputs a WebSocket endpoint with the generated token. Connect with chromium.connect(BROWSER_WS_ENDPOINT) in Playwright or puppeteer.connect({ browserWSEndpoint }).
Tips
- It is CPU hungry.
smallhandles a few pages; pickmediumorlargefor parallel tests.CONCURRENTis set to 4. - Reach it from another briq in the stack, or from your agent's own machine after
briq_exposeon port 3000 withmode: "token". The endpoint'stokenquery string is required either way. - Use the REST helpers. Browserless also serves
/screenshot,/pdfand/contentover HTTP on the same port. - A recipe, not a browser platform. briq does not do sessions, proxies or stealth; for that use a dedicated browser service.