LangGraph runs on top of LangChain, so vanilla @tool-decorated wrappers around the scrapegraph-py SDK plug straight into create_react_agent, ToolNode, or any custom StateGraph node — no third-party integration package needed.
Fastest path: LangChain v1’s create_agent returns a compiled LangGraph with the standard ReAct loop baked in — one call wires up every tool behind an LLM router.
from langchain.agents import create_agentfrom langchain_openai import ChatOpenAIfrom sgai_tools import ALL_TOOLSllm = ChatOpenAI(model="gpt-4o", temperature=0)agent = create_agent( model=llm, tools=ALL_TOOLS, system_prompt="You are a web research agent. Use ScrapeGraph tools to gather and extract web data.",)final_state = agent.invoke({ "messages": [("user", "Search for 'best AI scraping tools 2026' and extract the top 3 names into JSON.")],})print(final_state["messages"][-1].content)
langgraph.prebuilt.create_react_agent still exists but is deprecated in LangGraph v1.0 — use create_agent from langchain.agents.
When the sequence is known in advance — e.g. search → pick URL → extract — skip the agent loop and call tools directly from nodes. No LLM routing, fully reproducible.