{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/eidolon-resource/_shared/latest--BrowserV2.json",
  "title": "BrowserV2",
  "description": "A tool for interacting with a browser instance.\n\nRequires a running browser service.\n\nExposes two tools to an Agent, one for navigating to a url and another for evaluating javascript on the current page.\nBrowser sessions are durable throughout a process, but each process has its own browser, isolating browsers between agents.",
  "x-lintel": {
    "source": "https://www.eidolonai.com/json_schema/v1/schemas/LogicUnit/BrowserV2.json",
    "sourceSha256": "21b884aeb143fc2ea775d6d715c68e52a7bafe441d4130629b71935d2d1ee573"
  },
  "type": "object",
  "properties": {
    "implementation": {
      "const": "BrowserV2",
      "title": "Implementation"
    },
    "starting_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Starting Url"
    },
    "browser_service_loc": {
      "default": "http://localhost:7468",
      "description": "The location of the playwright installation.",
      "examples": [
        "http://localhost:7468"
      ],
      "title": "Browser Service Loc",
      "type": "string"
    },
    "operation_description": {
      "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}\"",
      "title": "Operation Description",
      "type": "string"
    },
    "content_summarizer": {
      "anyOf": [
        {
          "$ref": "#/$defs/Summarizer"
        },
        {
          "type": "null"
        }
      ],
      "default": {
        "tool_description": "Summarize the current page (Current url: {url})",
        "mode": "BeautifulSoup",
        "encoding": "o200k_base",
        "token_limit": 8000
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Summarizer": {
      "properties": {
        "tool_description": {
          "default": "Summarize the current page (Current url: {url})",
          "title": "Tool Description",
          "type": "string"
        },
        "mode": {
          "enum": [
            "BeautifulSoup",
            "noop"
          ],
          "title": "Mode",
          "type": "string"
        },
        "encoding": {
          "default": "o200k_base",
          "description": "tiktoken encoding to use when counting tokens",
          "title": "Encoding",
          "type": "string"
        },
        "token_limit": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": 8000,
          "description": "The maximum number of message tokens to sent respond with",
          "title": "Token Limit"
        }
      },
      "required": [
        "mode"
      ],
      "title": "Summarizer",
      "type": "object"
    }
  },
  "required": [
    "implementation"
  ],
  "reference_details": {
    "clz": "eidolon_ai_sdk.builtins.logic_units.browser.BrowserV2",
    "groups": [
      "LogicUnit"
    ],
    "name": "BrowserV2",
    "overrides": {}
  }
}
