AI agent instructions
AI agent instructions
session.execute().
Navigation Actions
Goto
Navigate to a URL.url(str): The URL to navigate towait_until(str, optional): Navigation event to wait for:load(default),domcontentloaded,commitornetworkidle.commitanddomcontentloadedskip the post-load settle wait, which makes them the cheap choice when the page is only needed as an origin forsession.fetch()
GotoNewTab
Open a URL in a new browser tab.goto_new_tab.py
url(str): The URL to open in a new tab
SwitchTab
Switch to a different browser tab.switch_tab.py
tab_index(int): Zero-based index of the tab to switch to
GoBack
Navigate back to the previous page.go_back.py
GoForward
Navigate forward in browser history.go_forward.py
Reload
Reload the current page.Interaction Actions
Click
Click on an element.click.py
selector(str): Selector for the element (CSS, XPath, or Playwright selector such asbutton:has-text('Submit'))id(str): Element ID from the latestobserve()output (for exampleB1)timeout(int, optional): Action timeout in milliseconds
Fill
Fill a text input or textarea.fill.py
selector(str): Selector for the inputid(str): Element ID from the latestobserve()output (for exampleI1)value(str): The text to fillclear_before_fill(bool, optional): Clear the field first (default: True)press_enter(bool, optional): Press Enter after filling
Check
Check or uncheck a checkbox.check.py
selector(str): Selector for the checkboxid(str): Element ID from the latestobserve()outputvalue(bool): True to check, False to uncheck
SelectDropdownOption
Select an option from a dropdown.select_dropdown_option.py
selector(str): Selector for the select elementid(str): Element ID from the latestobserve()outputvalue(str): Visible text or value attribute of the option to select
PressKey
Press a keyboard key.key(str): Key name (e.g., “Enter”, “Escape”, “Tab”, “ArrowDown”)
EvaluateJs
Evaluate JavaScript code on the current page and return the result.session.evaluate_js(code) returns the evaluated string directly (objects and arrays as JSON); a failing script raises with the actual JavaScript error.
code(str): The JavaScript code to evaluate on the page
Fetch
Issue an HTTP request from the page the session is on.session.fetch(url) runs the browser’s own fetch() inside the current page, so the request carries the page’s cookies, the session’s proxy and the browser’s network fingerprint. A relative URL resolves against the current page, which also keeps it same-origin; a cross-origin URL is subject to CORS as in any browser tab, so goto the target origin first. The result is a standard requests.Response: status_code, ok, headers, text, url, json() and raise_for_status() work as usual.
fetch.py
url(str): The URL to request, absolute or relative to the current pagemethod(str): HTTP method,GETby defaultheaders(dict): Extra request headersparams(dict): Query parameters appended to the URLjson(Any): Body serialised as JSON with anapplication/jsoncontent typedata(str | dict): Body sent verbatim, or form-encoded when a dicttimeout(float): Seconds before the request is aborted
Scrolling Actions
Both scroll actions accept an optionalselector for a scroll container, including iframe selectors.
For example, pass selector="#results" to scroll a results panel. The action calls scrollBy
on that container directly, emitting scroll events without sending a wheel event or moving the
pointer. If amount is omitted, the action scrolls by 70% of the container’s height. Reaching the requested boundary succeeds without moving or scrolling the parent page.
A missing target or a blocked scroll before the boundary still fails.
Without a selector, the action sends a wheel event at the current pointer position and fails
if neither the page nor a container moves.
ScrollUp
Scroll up on the page.ScrollDown
Scroll down on the page.File Actions
UploadFile
Upload a file to a file input.upload_file.py
selector(str): Selector for the file inputid(str): Element ID from the latestobserve()outputfile_path(str): In cloud sessions, a stored filename or a public HTTP(S) file URL, including signed URLs.
DownloadFile
Download a file from a link.download_file.py
selector(str): Selector for the download linkid(str): Element ID from the latestobserve()output
Wait Action
Wait
Pause execution for a specified duration.time_ms(int): Time to wait in milliseconds
Tip: Use sparingly. Notte automatically waits for page loads and element visibility. Only use Wait for specific timing requirements.
Data Extraction
Scrape
Extract data from the current page.scrape.py
instructions(str): Natural language extraction instructionsresponse_format(type[BaseModel]): Pydantic model for structured outputonly_main_content(bool): Extract only main content, ignore headers/footers
Communication Actions
SmsRead
Read SMS messages from a persona’s phone number. In scripts, callpersona.sms() as shown below. The sms_read action takes the same parameters.
sms_read.py
limit(int, optional): Maximum number of messages to returntimedelta(optional): Only return messages received within this windowonly_unread(bool, optional): Only return unread messages
EmailRead
Read emails from a persona’s email address. In scripts, callpersona.emails() as shown below. The email_read action takes the same parameters.
email_read.py
limit(int, optional): Maximum number of emails to returntimedelta(optional): Only return emails received within this windowonly_unread(bool, optional): Only return unread emails
Action Patterns
Chaining Actions
Execute multiple actions in sequence:action_chaining.py
Error Handling
Handle action failures:error_handling.py
Conditional Actions
Execute actions based on conditions:Selector Strategies
CSS Selectors
Most flexible and commonly used:css_selectors.py
Direct Attributes
Use direct attribute parameters when available:direct_attributes.py
Best Practices
Prefer stable selectors:stable_selectors.py
specific_selectors.py
Common Workflows
Form Submission
form_submission.py
Search and Extract
search_extract.py
Multi-Tab Workflow
multi_tab.py
File Upload and Download
file_upload_download.py
Next Steps
Session Configuration
Configure session behavior
Session Lifecycle
Manage session states
SDK Actions Reference
Detailed API documentation
File Storage
Upload and download files in sessions