AI agent instructions
AI agent instructions
use() callback starts the session and stops it when the callback finishes, including when it throws.
Usage
See more operations on sessions:Scrape
Scrape the current page.With
response_format or instructions, the extracted data is returned
directly and a failed extraction throws ScrapeFailedError. Pass
raiseOnFailure: false to receive the StructuredData wrapper instead.Observe
Observe the current page: the list of actions that can be taken, a
screenshot and page metadata.The
perception_type defaults to the session option (fast). A bare
string argument is accepted as the perception type.Deprecated: perception_type: 'deep' and instructions are removed on
December 1, 2026, and each warns once per session. Use perception_type: 'fast' (the default) instead of 'deep'. For instructions:
the Python SDK’s local sessions replace it with session.act(); here, call
observe() without it and pick from the returned actions. See
https://docs.notte.cc/features/sessions/observe-migrationExecute
Execute an action on the current page.When the action fails and
raiseOnFailure is true (the default, see the
session option), the structured exception_detail returned by the API is
rehydrated into an ActionExecutionError whose errorType names the
server-side error class. captcha_solve actions get a 100 s request
timeout and are retried up to 3 times on HTTP 408.Parameters
Use the defaults or pass these options toclient.Session(options):
Wait in the SDK for managed authentication on start(). Defaults to true; use() always waits.
deprecated:Remote sessions always use the supported browser launch mode.
Retained as a boolean so existing typed configuration still compiles.
true is discarded; false raises a migration error when starting.Open the live viewer in the local default browser after the session starts.
This is a local SDK option and is not sent to the API.
Default for
execute(): throw ActionExecutionError when an action fails.
The counterpart of raise_on_failure on RemoteSession. Defaults to true.Default perception type for
observe(). Defaults to fast. 'deep' is
deprecated and removed on December 1, 2026; use 'fast'.JSON cookie file: loaded into the session on
start() when it exists and
appended with the session cookies on stop().Idle timeout in minutes. Session closes after this period of inactivity (resets on each operation).
List of custom proxies to use for the session. If True, the default proxies will be used. At most one
secret entry routes its hosts through the caller’s secret proxy; the other entry, if any, is the session’s exit.The browser type to use. Supported values are chromium, chrome and chrome-nitro. chrome-nitro creates a managed Chrome Nitro session. chrome-nightly and chrome-turbo are legacy aliases for chrome.
Viewport shape preset. When set, the backend fits the largest rectangle of this aspect ratio inside the sampled available screen area. Cannot be combined with explicit viewport_width/viewport_height.
Managed Auth connection IDs to verify and, when necessary, authenticate inside this session. Initial verification runs before returning; when login is needed, the session returns as authenticating. Poll /sessions/{id}/auth for readiness.
Save session replay. False permanently disables saved replay; Live View remains available.
Save browser session logs. False permanently disables saved logs, without disabling metering.
Block ads and trackers in managed browsers using Basic filtering. Set false to disable. Does not configure externally supplied CDP browsers.
Who answers JavaScript dialogs (alert, confirm, prompt, beforeunload).
auto (default): Notte answers them, dismissing alert, confirm and prompt and accepting beforeunload. client: Notte leaves them for your CDP client to accept or dismiss, and dismisses one nobody answers within 10 seconds.Enable Notte’s highest-fidelity browser environment for sites with sophisticated bot detection. Available to approved workspaces.
The operating system the session’s browser presents: windows or macos. When unset, each session gets one at random among those the environment offers.
Ignored since notte 1.10: screenshots are returned without highlighting.deprecated:
Reusable launch preset revision from POST /launch-presets/recommend. Explicit request and saved profile settings take precedence. Does not navigate or restrict the session. During the pilot, starting with a preset returns 403 in production.
Whether to enable the Notte recorder extension for this session. The extension is installed but remains inactive when this is false.
Direct constructor reference
Direct constructor reference