-
Notifications
You must be signed in to change notification settings - Fork 168
docs: add Kernel guide + improved doc/intro content #607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sam-notte
wants to merge
3
commits into
main
Choose a base branch
from
docs-improvements-clean
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| --- | ||
| title: Kernel | ||
| description: Run Notte with Kernel cloud browsers (CDP) | ||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| Point Notte at Kernel's CDP endpoint to run your agents against Kernel's hosted browsers. Notte controls the browser through Chrome DevTools Protocol while your code stays unchanged - simply pass Kernel's `cdp_ws_url` into your Notte Session. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - **Notte SDK** installed with API key configured ([Get an API key](https://console.notte.cc)) | ||
| - **Kernel account** and API key ([Kernel documentation](https://www.onkernel.com/docs)) | ||
| - (Optional) Review Kernel's [viewport configuration](https://www.onkernel.com/docs) if you need specific browser dimensions | ||
|
|
||
| ## Quick Start | ||
|
|
||
| Use the Kernel SDK to create a browser, extract the CDP WebSocket URL, and pass it to Notte. | ||
|
|
||
| <Note>The exact API and attribute names may vary. Please refer to [Kernel's documentation](https://www.onkernel.com/docs) for the most up-to-date information.</Note> | ||
|
|
||
| ```python | ||
| # Install: uv add notte-sdk kernel | ||
| from notte_sdk import NotteClient | ||
| from kernel import Kernel | ||
|
|
||
| # Create Kernel browser and get CDP URL | ||
| kernel_client = Kernel(api_key="YOUR_KERNEL_API_KEY") | ||
| kernel_browser = kernel_client.browsers.create() | ||
|
|
||
| # Use Kernel's CDP URL with Notte | ||
| notte = NotteClient() | ||
| cdp_url = kernel_browser.cdp_ws_url # Verify attribute name in Kernel docs | ||
|
|
||
| with notte.Session(cdp_url=cdp_url) as session: | ||
| agent = notte.Agent(session=session, max_steps=5) | ||
| agent.run(task="extract pricing plans from https://www.notte.cc/") | ||
|
|
||
| # Optional: Cleanup Kernel session when done | ||
| # kernel_client.browsers.delete_by_id(kernel_browser.session_id) | ||
| ``` | ||
|
|
||
| ## Using an Existing Kernel CDP URL | ||
|
|
||
| If you already have a `cdp_ws_url` from Kernel, connect directly: | ||
|
|
||
| ```python | ||
| from notte_sdk import NotteClient | ||
|
|
||
| cdp_url = "wss://<kernel-cdp-endpoint>?token=<...>" | ||
| notte = NotteClient() | ||
|
|
||
| with notte.Session(cdp_url=cdp_url) as session: | ||
| agent = notte.Agent(session=session, max_steps=5) | ||
| agent.run(task="open the homepage and screenshot it") | ||
| ``` | ||
|
|
||
| ## Authentication & Configuration | ||
|
|
||
| - **API Key**: Kernel requires an API key to create browsers via SDK. If using a raw CDP URL, include any required token/query parameters in the WebSocket URL. | ||
| - **Viewport & Headless**: Browser settings like viewport dimensions and headless mode are controlled on the Kernel side when creating the browser. Configure these parameters during browser creation if they matter for your use case. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| - **403 / 401 errors**: Invalid or expired Kernel token. Reissue your API key or regenerate the CDP URL | ||
| - **WebSocket closed**: Kernel browser terminated or timed out. Create a new browser; ensure cleanup isn't premature | ||
| - **No pages available**: Ensure the Kernel session actually launched a page; let Notte navigate first with the Agent | ||
| - **Connectivity/firewall**: Allow outbound WSS connections to Kernel's CDP host | ||
|
|
||
| ## See Also | ||
|
|
||
| - [CDP Documentation](/features/sessions/cdp) - Local and external CDP patterns | ||
| - [Session Replay](/features/sessions/session-replay) - Record and replay browser sessions | ||
| - [Proxies](/features/sessions/proxies) - Configure proxy settings for sessions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| --- | ||
| title: Steel | ||
| description: Run Notte with Steel cloud browsers (CDP) | ||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| Point Notte at Steel's CDP endpoint to run your agents against Steel's hosted browsers. Notte controls the browser through Chrome DevTools Protocol while your code stays unchanged - simply pass Steel's WebSocket URL into your Notte Session. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - **Notte SDK** installed with API key configured ([Get an API key](https://console.notte.cc)) | ||
| - **Steel account** and API key ([Get Steel API key](https://app.steel.dev/settings/api-keys)) | ||
| - (Optional) Note that some Steel endpoints require the API key as a query parameter on the WebSocket URL | ||
|
|
||
| ## Quick Start | ||
|
|
||
| Use the Steel SDK to create a browser session, extract the WebSocket URL, and pass it to Notte. | ||
|
|
||
| <Note>The exact API and attribute names may vary. Please refer to [Steel's documentation](https://docs.steel.dev/) for the most up-to-date information.</Note> | ||
|
|
||
| ```python | ||
| # Install: uv add notte-sdk steel | ||
| import os | ||
| from notte_sdk import NotteClient | ||
| from steel import Steel | ||
|
|
||
| STEEL_API_KEY = os.getenv("STEEL_API_KEY") | ||
|
|
||
| # 1) Create Steel browser session | ||
| client = Steel(api_key=STEEL_API_KEY) # Note: verify parameter name with Steel docs | ||
| session = client.sessions.create() | ||
|
|
||
| # Steel returns a websocket URL for CDP control | ||
| # Check Steel docs for the exact attribute name and query param format | ||
| cdp_url = session.websocket_url # May need: f"{session.websocket_url}?apiKey={STEEL_API_KEY}" | ||
|
|
||
| # 2) Run Notte agent against Steel's CDP browser | ||
| notte = NotteClient() | ||
| with notte.Session(cdp_url=cdp_url) as s: | ||
| agent = notte.Agent(session=s, max_steps=6) | ||
| agent.run(task="extract pricing plans from https://www.notte.cc/") | ||
| ``` | ||
|
|
||
| ## Using an Existing Steel CDP URL | ||
|
|
||
| If you already have a WebSocket URL from Steel, connect directly: | ||
|
|
||
| ```python | ||
| from notte_sdk import NotteClient | ||
|
|
||
| cdp_url = "wss://<steel-cdp-endpoint>" # Add auth params as required by Steel | ||
| notte = NotteClient() | ||
|
|
||
| with notte.Session(cdp_url=cdp_url) as s: | ||
| agent = notte.Agent(session=s, max_steps=5) | ||
| agent.run(task="open the homepage and take a full-page screenshot") | ||
| ``` | ||
|
|
||
| ## Authentication & Configuration | ||
|
|
||
| - **API Key**: Steel requires an API key to create browser sessions via SDK. If using a raw WebSocket/CDP URL, include any required query parameters (like `apiKey`) in the URL. | ||
| - **Browser Settings**: Viewport dimensions, headless mode, regions, and timeouts are configured when creating the Steel session ([see Steel Sessions docs](https://docs.steel.dev/)). | ||
| - **Network Configuration**: If your organization enforces IP allowlists or proxies, configure those on Steel's side during session creation. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| - **401 / 403 errors**: Invalid or expired Steel token. Regenerate your API key or re-create the session URL | ||
| - **WebSocket closed**: Steel session terminated or timed out. Create a new Steel session | ||
| - **No targets/pages available**: Ensure the Steel session actually launched a page; let Notte navigate first with the Agent | ||
| - **Connectivity/firewall**: Allow outbound WSS connections to Steel's host | ||
|
|
||
| ## See Also | ||
|
|
||
| - [CDP Documentation](https://docs.notte.cc/features/sessions/external-providers) - Local and external CDP patterns | ||
| - [Session Replay](https://docs.notte.cc/features/sessions/recordings) - Record and replay browser sessions | ||
| - [Proxies](https://docs.notte.cc/features/sessions/proxies) - Configure proxy settings for sessions | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.