> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anchorbrowser.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Anchor Browser is cloud browser infrastructure for AI agents and automation: browser sessions you control over CDP or REST, natural-language web tasks, versioned automation tasks, managed authentication into third-party web apps (identities with MFA), persistent volumes and profiles, recordings, live view, batch sessions, webhooks, and network options including residential proxies, extra stealth, and captcha solving for sites that block standard browsers. AI agents should start at https://docs.anchorbrowser.io/for-agents, then get an API key with Agent Access at https://docs.anchorbrowser.io/quickstart/agent-access — no dashboard account required. Read those two pages before authentication or API calls.

# LangChain

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](https://python.langchain.com/docs/integrations/tools/anchor_browser/) 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](https://pypi.org/project/langchain-anchorbrowser/) for more information.

## Quickstart

### Installation

Install the `langchain-anchorbrowser` package:

```bash theme={null}
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](/docs/integrations/tools/anchor_browser)

```python theme={null}
from langchain_anchorbrowser import AnchorContentTool

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

## Additional Resources

* [PyPi](https://pypi.org/project/langchain-anchorbrowser)
* [Github](https://github.com/anchorbrowser/langchain-anchorbrowser)
* [Anchor Browser Docs on LangChain](https://python.langchain.com/docs/integrations/tools/anchor_browser/)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.