AI stacks
Stateful agent graphs with Piloterr tools
Build LangGraph workflows that call Piloterr REST APIs as tools. Orchestrate multi-step scrape → analyze → act loops with checkpoints, branching, and human-in-the-loop.
- ReAct and custom StateGraph patterns
- Wrap any Piloterr endpoint as a LangChain tool
- Structured JSON for reliable graph transitions
- Production anti-bot bypass on every scrape step
At a glance
Graph
stateful agents
Tools
Piloterr APIs
400+
data sources
REST
HTTP API
Why connect LangGraph
Multi-step research graphs
Chain scrape, filter, and summarize nodes, LangGraph persists state between Piloterr tool calls.
Branching on live data
Route graph edges based on JSON fields returned from Piloterr endpoints.
Human-in-the-loop
Pause graphs for review after scrapes return sensitive or high-impact data.
LangChain compatible
Reuse the same @tool wrappers you built for LangChain, drop them into LangGraph agents.
LangGraph + Piloterr patterns
Graph-based workflows for research, ops, and enrichment.
Research loops
Agent iterates SERP and news scrapes until enough sources are gathered.
Enrichment pipelines
Sequential graph: domain → company → LinkedIn → scored output.
Monitoring graphs
Scheduled invocations compare scrape hashes and trigger alerts.
Tool-routing agents
Supervisor node picks the right Piloterr API for each subtask.
LangGraph + Piloterr vs linear chains
| Approach | DIY | Piloterr |
|---|---|---|
| Linear LangChain chain | Fixed scrape order | Dynamic tool routing |
| Raw fetch nodes | Blocked on WAF sites | Managed bypass |
| Stateless scripts | No retry / checkpoint | Graph checkpoints |
| HTML parsing nodes | Fragile selectors | Stable JSON schemas |
Connect LangGraph in four steps
Step 1
Install LangGraph
pip install langgraph langchain-openai requests
Step 2
Get your API key
Set PILOTERR_API_KEY in your environment.
Get your API keyStep 3
Define Piloterr tools
Create @tool functions that call REST endpoints, same pattern as LangChain.
Step 4
Build the graph
Use create_react_agent or StateGraph with your tools and compile with a checkpointer.
Workflow recipes
Iterative SERP research
Graph loops news + web search tools until the agent has enough citations.
Lead enrichment graph
Branch on company size after domain scrape, route to different CRM fields.
Price monitor with HITL
Scrape product pages, pause for human approval before sending Slack alerts.
Supervisor + worker scrapes
Supervisor node assigns Amazon vs Walmart tools to worker sub-agents.
When to pick LangGraph vs LangChain
Scenario
Multi-step loops and branching
Recommendation: LangGraph
Scenario
Simple single agent
Recommendation: LangChain create_agent
Scenario
Role-based multi-agent crews
Recommendation: CrewAI
Scenario
RAG indexing
Recommendation: LlamaIndex
LangGraph ReAct agent example
A graph agent with a Google News tool backed by Piloterr.
import os
import requests
from langchain.tools import tool
PILOTERR_KEY = os.environ["PILOTERR_API_KEY"]
BASE = "https://api.piloterr.com/v2"
@tool
def search_google_news(query: str, location: str = "Paris, FR") -> dict:
"""Search Google News for recent articles matching a query."""
response = requests.post(
f"{BASE}/google/news",
headers={"x-api-key": PILOTERR_KEY, "Content-Type": "application/json"},
json={"query": query, "location": location, "page": 1},
timeout=60,
)
response.raise_for_status()
return response.json()See also
Transparent credit pricing
Pay only for successful requests. Start with +500 credits, then scale with plans from $49/mo.
Premium
$49/mo
18,000 credits
Premium+
$99/mo
40,000 credits
Startup
$249/mo
110,000 credits