AI agents can leverage browser sessions to complete tasks on the web using LangChain, a framework that provides easy integration for AI-driven workflows. Anchor provides LangChain tools that allows you to use Anchor Browser as a tool in your LangChain workflows. The package contains the following tools:
  • AnchorContentTool: Get the content of a web page in markdown format.
  • AnchorScreenshotTool: Take a screenshot of a web page.
  • AnchorWebTaskTools: Perform intelligent web tasks using AI:
    • Simple - SimpleAnchorWebTaskTool
    • Advanced - AdvancedAnchorWebTaskTool
See Anchor Browser package for LangChain on PyPi for more information.

Quickstart

Installation

Install the langchain-anchorbrowser package:
pip install langchain-anchorbrowser

Usage

Import and utilize your intended tool. The full list of Anchor Browser available tools see Tool Features table in Anchor Browser tool page
from langchain_anchorbrowser import AnchorContentTool

# Get Markdown Content for https://www.anchorbrowser.io
AnchorContentTool().invoke(
    {"url": "https://www.anchorbrowser.io", "format": "markdown"}
)

Additional Resources