Skip to main content

Overview

Chrome DevTools Protocol (CDP) is the raw browser debugging protocol built into Chrome and Chromium-based browsers. BAP sits above CDP, using Playwright as an intermediary, and adds agent-oriented abstractions.

Comparison

When to Use CDP

Use CDP when you need

  • Direct access to CDP domains (Performance, Profiler, Memory, Network conditions) - Custom debugging and profiling instrumentation - Low-level network interception with full headers - Service Worker and Cache API inspection - Chrome-specific features not exposed by Playwright

Use BAP when you need

  • AI agent browser automation - Semantic element targeting that survives redesigns - Multi-step workflows with error recovery - Structured data extraction without writing JS - Cross-browser support (Chromium + Firefox + WebKit) - Token-efficient agent communication

BAP + CDP Together

BAP supports connecting to a browser via CDP for hybrid workflows:
You can also use Chrome DevTools alongside BAP for debugging:
  1. Launch Chrome with --remote-debugging-port=9222
  2. Open chrome://inspect for live DevTools access
  3. Connect BAP with --connect=ws://localhost:9222
  4. Debug with DevTools while BAP automates
See the CDP Attach guide for detailed setup instructions.

CDP Complexity BAP Handles For You

What you would need to implement yourself with raw CDP: