Integrations / AI agent clients / LangGraph

A browser for LangGraph agents.

LangGraph runs tool calls as graph steps. With the Browz SDK, one MCP session stays open for the whole run, so a profile opened in one step is still there in the next, and the run ends with the profile cleaned up.

Terminalpip install langgraph langchain-mcp-adapters langchain-anthropic # plus the Browz Python SDK: pip install browz-mcp

Setup

Set it up.

  1. Install Browz and open it

    Download Browz on the computer that runs your graph.

  2. Install the packages

    LangGraph, the MCP adapters, a model provider and the Browz Python SDK.

    Terminalpip install langgraph langchain-mcp-adapters langchain-anthropic # plus the Browz Python SDK: pip install browz-mcp
  3. Build and run the agent

    langchain_tool_session() starts the local server and yields its tools; langgraph_agent() builds a prebuilt agent with the Browz instructions. Set ANTHROPIC_API_KEY first.

    graph.pyimport asyncio from langchain_anthropic import ChatAnthropic from browz.agents import langchain_tool_session, langgraph_agent async def main(): async with langchain_tool_session() as tools: agent = langgraph_agent(ChatAnthropic(model="claude-haiku-5-5"), tools) out = await agent.ainvoke({"messages": [("user", "Using Browz: create a new profile called agent-check, start it, open https://example.com, tell me the page title, take a screenshot, then stop the session and delete the profile.")]}) print(out["messages"][-1].content) asyncio.run(main())
  4. Through the hosted server (beta)

    Pass remote=True; the token comes from BROWZ_AGENT_TOKEN.

    Pythonfrom browz.agents import langchain_tool_session, langgraph_agent async with langchain_tool_session(remote=True) as tools: # inside an async function agent = langgraph_agent(model, tools)

Client API from LangChain MCP docs.

Example

Use the tools in your own graph.

The helpers return ordinary LangChain tools, so they also fit a graph you build yourself with a ToolNode.

graph.py (your own graph)import asyncio from langchain_anthropic import ChatAnthropic from langgraph.graph import StateGraph, MessagesState, START from langgraph.prebuilt import ToolNode, tools_condition from browz.agents import langchain_tool_session async def main(): async with langchain_tool_session() as tools: model = ChatAnthropic(model="claude-haiku-5-5").bind_tools(tools) async def call_model(state: MessagesState): return {"messages": [await model.ainvoke(state["messages"])]} graph = StateGraph(MessagesState) graph.add_node("model", call_model) graph.add_node("tools", ToolNode(tools)) graph.add_edge(START, "model") graph.add_conditional_edges("model", tools_condition) graph.add_edge("tools", "model") app = graph.compile() out = await app.ainvoke({"messages": [("user", "Using Browz, open a throwaway session, go to https://example.com, tell me the page title and close the session.")]}) print(out["messages"][-1].content) asyncio.run(main())

Good to know

Notes and tips.

  • Keep the graph inside the async with block: the MCP session, and the profiles it opened, end when the block ends.
  • The remote server at https://mcp.gobrowz.com/mcp is in free public beta: it needs the Browz app open with Remote control on, on a computer with a hardware security chip, and offers the profile, tab and page tools. See what it needs and what it offers.
  • Browz has to be installed and open on the same computer: the local MCP server drives the app’s own profiles through its local API, and reads the app’s credentials itself, so no token goes in the config.
  • A person completes sign-ins, 2FA codes and CAPTCHAs. The agent can pause with browz_request_human and hand you the profile’s window, then carry on in the same session. Browz never solves or bypasses CAPTCHAs.
  • Use agents only where each site’s terms allow automated use, on accounts you are entitled to use. Our acceptable use policy applies to agents the same as to people.
  • The MCP server is on every plan, Free included (5 profiles). How many agent sessions can be open at once depends on the plan: see pricing.

FAQ

LangGraph and Browz.

Why one MCP session for the whole run?

Each MCP session is one connection to the server. Keeping it open means a profile the agent opened in one step is still running for the next, instead of a new connection per tool call.

Which models work?

Any chat model LangGraph supports with tool calling. The example uses Claude; swap in any provider.

Can several graphs run at once?

Yes. Each session the agent opens gets its own profile, so parallel runs never share cookies or a fingerprint.

Get started

Download Browz. Every task, its own browser.

Then, on macOS or Linux, put the MCP server on your PATHcurl -fsSL https://gobrowz.com/agents/install.sh | sh

For Mac, Windows and Linux. Free for 5 profiles. Paid plans from $4.99 a month, with a 14-day refund on your first payment.