_get_str
_get_number
_get_bool
BaseBrowser
init
- headless (bool): Whether to run the browser in headless mode.
- cache_dir (Union[str, None]): The directory to store cache files.
- channel (
Literal["chrome", "msedge", "chromium"]
): The browser channel to use. Must be one of “chrome”, “msedge”, or “chromium”. - cookie_json_path (Optional[str]): Path to a JSON file containing authentication cookies and browser storage state. If provided and the file exists, the browser will load this state to maintain authenticated sessions. This is primarily used when
user_data_dir
is not set. - user_data_dir (Optional[str]): The directory to store user data for persistent context. If None, a fresh browser instance is used without saving data. (default: :obj:
None
)
init
clean_cache
_wait_for_load
click_blank_area
visit_page
ask_question_about_video
- question (str): The question to ask.
get_screenshot
- save_image (bool): Whether to save the image to the cache directory.
None
.
capture_full_page_screenshots
- scroll_ratio (float): The ratio of viewport height to scroll each step. (default: :obj:
0.8
)
get_visual_viewport
get_interactive_elements
get_som_screenshot
- save_image (bool): Whether to save the image to the cache directory.
None
.
scroll_up
scroll_down
get_url
click_id
extract_url_content
download_file_id
- identifier (str): The identifier of the file to download.
fill_input_id
- identifier (str): The identifier of the input field.
- text (str): The text to fill.
scroll_to_bottom
scroll_to_top
hover_id
- identifier (str): The identifier of the element to hover over.
find_text_on_page
back
close
show_interactive_elements
get_webpage_content
_ensure_browser_installed
BrowserToolkit
init
- headless (bool): Whether to run the browser in headless mode.
- cache_dir (Union[str, None]): The directory to store cache files.
- channel (
Literal["chrome", "msedge", "chromium"]
): The browser channel to use. Must be one of “chrome”, “msedge”, or “chromium”. - history_window (int): The window size for storing the history of actions.
- web_agent_model (Optional[BaseModelBackend]): The model backend for the web agent.
- planning_agent_model (Optional[BaseModelBackend]): The model backend for the planning agent.
- output_language (str): The language to use for output. (default: :obj:
"en
”) - cookie_json_path (Optional[str]): Path to a JSON file containing authentication cookies and browser storage state. If provided and the file exists, the browser will load this state to maintain authenticated sessions without requiring manual login. (default: :obj:
None
) - user_data_dir (Optional[str]): The directory to store user data for persistent context. If None, a fresh browser instance is used without saving data. (default: :obj:
None
)
_reset
_initialize_agent
_observe
_act
- action_code (str): The action code to act.
_get_final_answer
_task_planning
_task_replanning
- task_prompt (str): The original task prompt.
- detailed_plan (str): The detailed plan to replan.
browse_url
- task_prompt (str): The task prompt to solve.
- start_url (str): The start URL to visit.
- round_limit (int): The round limit to solve the task. (default: :obj:
12
).