Skip to main content

LangGraph Browser Agent

This project is a web browser agent built with LangGraph. It can navigate websites, fill out forms, and interact with web elements.

This library is built on top of LangGraph, a powerful framework for building agent applications, and leverages deepagents and langchain-mcp-adapters. It also supports two browser manipulation backends: playwright-mcp and BrowserMCP.

Demo

Demo

Getting Started

  1. Prerequisites:

    This agent requires Node.js to be installed and the npx command to be available in your path.

    If you are using the browsermcp backend (the default), please read the documentation at https://docs.browsermcp.io/setup-extension to set up the browser extension.

  2. Clone the repository:

    git clone https://github.com/your-username/langgraph-browser-agent.git
    cd langgraph-browser-agent
    
  3. Install dependencies:

    uv pip install -e .
    
  4. Set up your environment:

    This agent uses Ollama by default. Make sure you have Ollama installed and running. You can pull the default model with:

    ollama pull gpt-oss:20b
    

    You can also use other models by specifying them when creating the agent.

Usage

To use the browser agent in your own project, you can import the create_browser_agent function and use it in an async context:

import asyncio
from langgraph_browser_agent import create_browser_agent

OBJECTIVE = "Go to google.com and search for 'what is langgraph?'"

async def main() -> None:
    """Run the github example."""
    async with create_browser_agent(model="openai:gpt-5") as agent:
        final_result = await agent.ainvoke({"messages": [("human", OBJECTIVE)]})
        final_result["messages"][-1].pretty_print()

if __name__ == "__main__":
    asyncio.run(main())

You can also specify a different model when creating the agent:

async with create_browser_agent(model="ollama:qwen3:8b") as agent:
    # ...

Contributing

Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.

License

This project is licensed under the MIT License.

Metadata

Release files for langgraph-browser-agent 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langgraph-browser-agent 0.1.0
File Size Uploaded
langgraph_browser_agent-0.1.0.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langgraph-browser-agent 0.1.0
File Interpreter ABI Platform
langgraph_browser_agent-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / langgraph_browser_agent-0.1.0.tar.gz

Download URL langgraph_browser_agent-0.1.0.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2e790fcd4e9451486aa45ac1ee6cd1d539d3d404a6e93383dca9ea5d56501a12
BLAKE2b-256 checksum
How to use checksums
0769d445adfb72a204587c58dfab34fc19ccc5e47e4ed0e0bea66196f7fccc91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / langgraph_browser_agent-0.1.0-py3-none-any.whl

Download URL langgraph_browser_agent-0.1.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2bffd414a9fe82350407d2234832ca98f1ce2521cb29864388ed303dd47f6904
BLAKE2b-256 checksum
How to use checksums
70229b416c985db51c1406c18da5ebf4f723669f787153531987abb9fc9c0cb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page