Skip to content

BrowserV2

Description: A tool for interacting with a browser instance.

Requires a running browser service.

Exposes two tools to an Agent, one for navigating to a url and another for evaluating javascript on the current page. Browser sessions are durable throughout a process, but each process has its own browser, isolating browsers between agents.

PropertyPatternTypeDeprecatedDefinitionTitle/Description
+ implementationNoconstNo-Implementation
- starting_urlNostringNo-Starting Url
- browser_service_locNostringNo-Browser Service Loc
- operation_descriptionNostringNo-Operation Description
- content_summarizerNoCombinationNo--

1. Property implementation

Title: Implementation

Typeconst
RequiredYes

Specific value: "BrowserV2"

2. Property starting_url

Title: Starting Url

Typestring
RequiredNo
Defaultnull

3. Property browser_service_loc

Title: Browser Service Loc

Typestring
RequiredNo
Default"http://localhost:7468"

Description: The location of the playwright installation.

Example:

http://localhost:7468

4. Property operation_description

Title: Operation Description

Typestring
RequiredNo
Default"Perform the specified operation on the current page. The operation is executed using a playwright \"Page\" object.\n\nPrefer using fill / click to interact with the page over executing raw javascript when possible.\n\nREMEMBER: A selector can match multiple elements, and that the first element found will be interacted with. Be sure \nto specify an index if you are using a selector that could have multiple matches. For example, to find the second \ndiv with class \"foo\", you could use \"(//div[contains(@class, 'foo')])[2]\".\n\nThe current page url as of {datetime} is \"{url}\""

5. Property content_summarizer

Typecombining
RequiredNo
Additional properties[Any type: allowed]
Default{"tool_description": "Summarize the current page (Current url: {url})", "mode": "BeautifulSoup", "encoding": "o200k_base", "token_limit": 8000}
Any of(Option)
Summarizer
item 1

5.1. Property Summarizer

Typeobject
RequiredNo
Additional properties[Any type: allowed]
Defined in#/$defs/Summarizer
PropertyPatternTypeDeprecatedDefinitionTitle/Description
- tool_descriptionNostringNo-Tool Description
+ modeNoenum (of string)No-Mode
- encodingNostringNo-Encoding
- token_limitNoCombinationNo-Token Limit

5.1.1. Property tool_description

Title: Tool Description

Typestring
RequiredNo
Default"Summarize the current page (Current url: {url})"

5.1.2. Property mode

Title: Mode

Typeenum (of string)
RequiredYes

Must be one of:

  • “BeautifulSoup”
  • “noop”

5.1.3. Property encoding

Title: Encoding

Typestring
RequiredNo
Default"o200k_base"

Description: tiktoken encoding to use when counting tokens

5.1.4. Property token_limit

Title: Token Limit

Typecombining
RequiredNo
Additional properties[Any type: allowed]
Default8000

Description: The maximum number of message tokens to sent respond with

Any of(Option)
item 0
item 1
5.1.4.1. Property item 0
Typeinteger
RequiredNo
5.1.4.2. Property item 1
Typenull
RequiredNo

5.2. Property item 1

Typenull
RequiredNo