@kentcdodds: Use a browser through Kody: https://kody.codes/@kody/browser-run… Most modern agents support browsers and that's fine m…
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.
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
- API token— Create a Cloudflare API token withBrowser Rendering - Edit. Save it as the Kody user secret
cloudflareApiTokenwith 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 - Account id— Pass
accountIdon 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. - Optional: pass
apiTokenSecretwith 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:
const context = await browser\.createBrowserContext\(\)- Do work in that context
await context\.close\(\)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 pick
open\-isolatedfor shared automation and Quick Actions for one-shots
Report this listingLog into report this listing.
Similar Articles
@kentcdodds: If you agree, try https://kody.codes
Kody is a software platform that enables AI agents to share memory, secrets, and packages for durable automation and triggering without repeated inference.
@kentcdodds: This is now built into Kody to make setting up new integrations a lot more straightforward for your agents https://gith…
Kody is an experimental personal assistant platform built on Cloudflare Workers and MCP; a recent update simplifies integration setup for agents.
@kentcdodds: Man this is so clutch. I don't know how I ever would have figured out this friction agents are experiencing without the…
Kent C. Dodds highlights a debugging feature in Kody, an open-source AI agent platform built on Cloudflare Workers and the Model Context Protocol (MCP), designed to manage memory and automations for agents across hosts.
Cloudflare launches Kitesurf, a browser built for AI agents
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.
@kentcdodds: Kody: Turn your skills into code you can run from any agent on any device... Or even a custom app.
Kody is a tool that converts skills into runnable code for any agent, device, or custom application.