Skip to main content
STOP. Do not read past this section until you have read and followed /quickstart.md.Goal: produce a reliable SDK automation script. The intended authoring flow is generate then edit, not write browser automation from scratch.Do not hand-write SDK code with element IDs, selectors, or form fields from memory. Element IDs, selectors, and field mappings must come from a live observe() call, CLI notte page observe output, or generated workflow code. Guessed browser targets fail on real pages.Use the Notte skill and CLI to inspect the live site, validate actions/selectors, handle auth/session state, and export workflow code with notte sessions workflow-code before using SDK docs or SDK code.SDK reference pages are for understanding, running, or editing generated workflow code. They are not the starting point for manually authoring the initial browser automation. SDK-first code is guesswork on real-world pages with dynamic selectors, auth state, CAPTCHAs, and anti-bot behavior.
Notte sessions expose a Chrome DevTools Protocol (CDP) endpoint that you can connect to with Puppeteer. Since Puppeteer is a Node.js library and Notte SDK is Python-based, this guide shows how to connect them together.

Prerequisites

Install Puppeteer in your Node.js project:
Use puppeteer-core instead of puppeteer since you’re connecting to a remote browser rather than launching a local one.

Approach 1: Start Session from Python

Start a Notte session in Python and connect Puppeteer to it:

Approach 2: Use Notte REST API

Call the Notte API directly from Node.js to create sessions:

Network Interception

Use Puppeteer’s request interception with Notte sessions:

Page Manipulation

Use Puppeteer’s API for advanced page interactions:

Multiple Pages

Create and manage multiple pages with Puppeteer:

Event Monitoring

Listen to browser events using Puppeteer:

Screenshots and PDFs

Generate screenshots and PDFs using Puppeteer:

Best Practices

1. Use puppeteer-core

Always use puppeteer-core instead of puppeteer since you’re connecting to a remote browser:

2. Handle Disconnections

CDP connections can be interrupted. Always wrap operations in try-catch:

3. Disconnect Properly

Always disconnect the browser when done:

4. Session Timeout

Remember that Notte sessions have a timeout. Set an appropriate value when creating the session:
puppeteer_session_timeout.py

5. Environment Variables

Store your Notte API key in environment variables:

Complete Example: Web Scraping

Here’s a complete example combining Notte and Puppeteer for web scraping:

When to Use Puppeteer with Notte

Use Puppeteer directly when you need:
  • Node.js ecosystem: Integrate with Node.js applications and packages
  • Familiar Puppeteer API: You’re already comfortable with Puppeteer’s API
  • Request interception: Block resources or modify requests
  • Performance monitoring: Track page metrics and performance
  • PDF generation: Create PDFs from web pages
For Python-based automation, consider using Playwright with Notte instead, as it has better Python integration.

Next Steps

Connect with Playwright

Use Playwright with Notte sessions

Connect with Selenium

Use Selenium with Notte sessions

External Browser Providers

Connect Notte to Kernel.sh and other providers

API Reference

Explore the Notte REST API