browser-use/cdp-use

🩹Pure CDP but type-safe in Python

What it solves

CDP Use provides a type-safe way for Python developers to interact with the Chrome DevTools Protocol (CDP). It eliminates the guesswork and manual type-checking when sending commands or handling events from Chrome, replacing manual JSON-RPC calls with a structured, auto-generated client library.

How it works

The project is a code generator that downloads the official Chrome DevTools Protocol specifications and automatically transforms them into Python bindings. It uses TypedDict classes to ensure that every command parameter and return value is strictly typed, providing full IDE IntelliSense and autocomplete support. The library is split into domain-specific modules (e.g., Page, Network, DOM) to keep the organization clean.

Who it’s for

Python developers building browser automation tools, web scrapers, or browser-based AI agents that need deep, type-safe control over the Chrome browser via CDP.

Highlights

  • Auto-Generated Bindings: Code is generated directly from official specifications, ensuring the library stays up-to-date with Chrome updates.
  • Full Type Safety: Provides TypedDict hints for all commands and event handlers, catching errors during development rather than at runtime.
  • Typesafe Event Registration: Includes a structured system for registering callbacks for specific browser events with validated signatures.
  • Domain Separation: Organizes the 50+ CDP domains into separate modules for better maintainability and readability.

Related

  • Project
  • Project
  • Project
  • Project
  • Project