Setup and configuration
Initialize
SimularBrowser(
path: str,
anthropic_key: str = '',
planner_model: str = 'claude-3-5-sonnet',
planner_mode: str = 'system_1_2',
allow_subtasks: bool = False,
max_parallelism: int = 5,
enable_vision: bool = False,
max_steps: int = 200,
timeout: float = 600.0
)
Absolute path to the Simular Browser
Planner Configuration: anthropic_key, planner_model, planner_mode
planner_model
string
default:"claude-3-5-sonnet"
Model for the planner.Choices: claude-3-5-sonnet
planner_mode
string
default:"system_1_2"
Planner mode.Choices: [system_1_2, system_1, system_2,agent_s1]
Execution Configuration: allow_subtasks, max_parallelism, enable_vision, max_steps, timeout
Number of tabs allowed to open via subtasks
allow_subtasks, max_parallelism, and enable_vision are only used when planner_mode is set to ‘agent_s1’, ‘system_1_2’, or ‘system_2’.
max_steps is only used when planner_mode is set to ‘agent_s1’
Browser Functions
is_app_running
#Check if Simular Browser is running on the system
def is_app_running()-> bool:
launch_app
# Launch Simular Browser Application
def launch_app() -> None:
run
# Run a Query in SimularBrowser's frontmost tab
def run(query, timeout=None, reset: bool = False) -> dict:
Query sent to the browser
Timeout for the operation
Reset the tab chat history before running the query
Browser Tab
Initialize
Tab(
browser: 'SimularBrowser',
id: str = None,
verbose: bool = False
)
Reference to parent browser
Configuration: id, responses, images, info, verboseShow Configuration settings
Unique identifier for the tab
List of responses from the browser
List of images captured in the tab
Dictionary containing tab information
Verbose logging flag, set to True to print debug logs
reset_storage
# reset tab's response history, images, and info
def reset_storage(self) -> None:
open
open and connect the tab in SimularBrowser
async def open(self: 'Tab') -> str: # Returns the tab id
close
close and disconnect the tab from SimularBrowser
async def close(self: 'Tab') -> str: # Returns the tab id
After closing, you can still retain the tab reference to access its storage
query
query the tab using browser’s api key, returns tab.responses
async def query(
query,
model: str = 'claude-3-5-sonnet',
planner_mode: str = 'system_1_2',
allow_subtasks: bool = False,
max_parallelism: int = 3,
enable_vision: bool = False,
max_steps: int = 100,
timeout=600.0) -> dict:
Query send to the browser tab
Planner Configuration: model, planner_mode
model
string
default:"claude-3-5-sonnet"
Model for the planner.Choices: claude-3-5-sonnet
planner_mode
string
default:"system_1_2"
Planner mode.Choices: [system_1_2, system_1, system_2,agent_s1]
Execution Configuration: allow_subtasks, max_parallelism, enable_vision, max_steps, timeout
Number of tabs allowed to open via subtasks
allow_subtasks, max_parallelism, and enable_vision are only used when planner_mode is set to ‘agent_s1’, ‘system_1_2’, or ‘system_2’.
max_steps is only used when planner_mode is set to ‘agent_s1’