Overview
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.
LangGraph docs
Official LangGraph documentation
scrapegraph-py on PyPI
The official Python SDK for ScrapeGraph v2
Installation
Get your ScrapeGraph API key from the dashboard.
Build the toolkit
Save assgai_tools.py — every example below imports from it.
sgai_tools.py
Endpoint → tool reference
Option A — prebuilt agent via create_agent
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.
langgraph.prebuilt.create_react_agent still exists but is deprecated in LangGraph v1.0 — use create_agent from langchain.agents.Option B — custom StateGraph with ToolNode
Use this when you need custom routing, streaming, interrupts, or checkpointing.Option C — deterministic pipeline
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.Crawl as a background node
Crawls are async. Wrap start + poll in a single node so the graph advances only when the job completes.Choosing a pattern
Support
Python SDK
Source and issues for scrapegraph-py
Discord
Get help from our community