@kentcdodds: Use a browser through Kody: https://kody.codes/@kody/browser-run… Most modern agents support browsers and that's fine m…

X AI KOLs Following Tools

Summary

This article introduces the browser-run package from Kody, which provides a thin, isolated way to use Cloudflare Browser Run for browser automation, including quick actions and shared sessions for repeatable scripting without AI in the loop.

Use a browser through Kody: https://kody.codes/@kody/browser-run… Most modern agents support browsers and that's fine most of the time. This package would be useful for repeatable things you need done with a browser that you can script and therefore don't need a model in the loop.
Original Article
View Cached Full Text

Cached at: 09/29/26, 07:55 PM

Use a browser through Kody: https://kody.codes/@kody/browser-run… Most modern agents support browsers and that’s fine most of the time. This package would be useful for repeatable things you need done with a browser that you can script and therefore don’t need a model in the loop.


@kody/browser-run — Kody public package

Source: https://kody.codes/@kody/browser-run

  • Integrations
  • cloudflare
  • browser-run
  • browser-rendering
  • puppeteer
  • screenshot
  • cdp
  • sessions

Version1.0.0LicensePublishedSeptember 29, 2026Pinned commitee5297cRatingNo ratings yetForks0Adaptation effort—

Intent

Give agents and humans a thin, isolate-safe way to callCloudflare Browser Run(formerly Browser Rendering): one-shotQuick Actions(screenshot, PDF, scrape, …) plusshared-sessionhelpers that bake in session reuse and per-requestcreateBrowserContext\(\)isolation. Success means reliable browser automation without cold-starting a new browser for every request, and without recommendingbrowser\.close\(\)on a shared session.

What this package does

  • Quick Actions— REST POST to/accounts/\{accountId\}/browser\-rendering/\{action\}forcontent,screenshot,pdf,markdown,scrape,links,json,snapshot, andaccessibilityTree.
  • Sessions— list, get, acquire, connect metadata, and guarded close.
  • open\-isolated(default for automation)— list → reuse (random start) → acquire; returns WS endpoint + instructions to isolate withcreateBrowserContext, thencontext\.close\(\)+browser\.disconnect\(\).
  • worker\-recipe— copy-paste Worker + wrangler guidance using@cloudflare/puppeteer≥ 1.1.0 (not runnable inside Kody).

This package doesnotdepend on Puppeteer or Playwright (those graphs blow up Worker isolates). Heavy CDP control runs in your Cloudflare Worker or Node process; Kody only orchestrates the REST/CDP metadata.

Setup

  1. API token— Create a Cloudflare API token withBrowser Rendering - Edit. Save it as the Kody user secretcloudflareApiTokenwith allowed hostapi\.cloudflare\.com: https://kody.codes/account/secrets/new?name=cloudflareApiToken&description=Cloudflare%20API%20token%20with%20Browser%20Rendering%20-%20Edit&allowedHosts=api.cloudflare.com&scope=user
  2. Account id— PassaccountIdon live calls. Find it in the dashboard URL (dash\.cloudflare\.com/<accountId\>/…) orWorkers & Pages → Overview → Account ID. Forkers bring their own account — this package does not hardcode any Cloudflare account.
  3. Optional: passapiTokenSecretwith an alternate secretnameonly (never a raw token value).

When to use what

NeedUseOne screenshot / PDF / scrape / markdown\./quick\-actionor\./screenshot,\./pdf, …Multi-step automation / shared browser\./open\-isolated(default)Deploy Puppeteer on Workers\./worker\-recipeVerify secrets / wiring\./smoke\-test Docs:Cloudflare Browser Run·Reuse sessions

Pit of success

Multiple clients can share one Browser Run session (puppeteer\.connectper Worker, separate browser contexts). After connect:

  1. const context = await browser\.createBrowserContext\(\)
  2. Do work in that context
  3. await context\.close\(\)
  4. await browser\.disconnect\(\)

Nevercallbrowser\.close\(\)while the session may be shared — that kills every concurrent client.

Done when

  • smoke\-testreturns setup guidance without opaque errors whenaccountId/secret are missing
  • With a configured token +accountId,sessions/listorsmoke\-testlists sessions (or a clear auth error)
  • Agents pickopen\-isolatedfor shared automation and Quick Actions for one-shots

Report this listingLog into report this listing.

Similar Articles

Cloudflare launches Kitesurf, a browser built for AI agents

TechCrunch AI

Cloudflare launches Kitesurf, a cloud-hosted browser built specifically for AI agents, enabling developers to automate web navigation and tasks without building browser software—available free in beta on its Browser Run platform.