Go-To-Market
Enrich and qualify leads with LangChain
A demonstration of Nimble Web Search Agents as LangChain tools inside a LangGraph ReAct agent. The agent receives a search query, calls Nimble's Google Maps agent to find matching businesses, then visits every business website via Nimble Extract to pull contact emails, opening hours, and a short description. A scoring chain ranks every lead 1–10 on outreach potential. The full dataset is queryable via natural language chat.
Quick Start
Inputs
- Search query A location-based business search phrase entered at run time (e.g., “Italian restaurants in Brooklyn, NY” or “yoga studios in Austin”).
Outputs
- Enriched lead list with contact details per business
- Score 1–10 with reason per lead
- Full Google Maps attributes per business
- Natural language chat over the dataset
- CSV export
How it works
A 6-phase pipeline. Read the blog here for a deeper explanation.
- Search The Google Maps agent returns up to 20 structured business records for the user's query — including website URLs, categories, and ratings.
- Filter Results are filtered to businesses with a website URL and sorted by rating — businesses without a site are dropped since there's nothing to extract.
- Extract For each qualifying business, Nimble Extract renders the website and returns clean markdown — handling JavaScript, redirects, and bot detection automatically.
- Enrich The agent pulls contact email, opening hours, and a short description from each page — fields not found on the page are returned as null.
- Score A LangChain chain scores all enriched leads in a single Claude call — each lead gets a score from 1 to 10 and a one-sentence reason based on completeness, ratings, and engagement signals.
- Chat The full enriched dataset is available as chat context — ask any natural language question about the results directly from the dashboard.
Stack
Nimble primitives plus the full runtime stack.
Nimble APIs
What it does
- Google Maps Agent Returns structured business listings from Google Maps for any search query — name, address, rating, phone, website URL, and rich attribute arrays.
- Extract API Renders any URL with a full browser and returns clean markdown — handles JavaScript, redirects, and anti-bot measures automatically.
3rd Party Tools
Role
- langgraph-create_react_agent ReAct orchestration loop — the agent decides which tools to call, in what order, and when it has enough data to produce the final output.
- claude-sonnet-4-6 Anthropic Claude API — drives the ReAct loop, extracts structured fields from raw markdown, scores all leads in a single chain call, and answers chat questions over the full dataset.
- langchain-anthropic LangChain integration layer for Claude — ChatAnthropic model binding and ChatPromptTemplate for the scoring chain.
- langchain-core tool decorator — wraps Nimble API calls as LangChain-compatible tools the agent can discover and invoke.
- streamlit Live UI — card grid updates in real time as each extraction completes, followed by a results table, CSV export, and chat tab.
- python 3.9+ Agent logic, tool definitions, scoring chain, and streaming handler.

Reach out if you have any questions.
Talk to an Expert