Go-To-Market
Run company research tasks with LangChain
In this example, we built an agent that combines Nimble Search and Nimble Web Search Agents inside a LangChain agent to search the web and enrich a company list, using fast search for simple fields and cited research runs for anything needing multiple sources.
Quick Start
Inputs
- A CSV with gaps A header row, one column holding the company name, and empty cells wherever values are needed. A CRM export works without changes.
- Governed columns Which fields must come from a cited Web Search Agent run rather than a fast search. Defaults to employee count, funding stage and total raised.
Outputs
- The original file returned filled, with column names unchanged
- A source URL for every filled cell
- A confidence grade per cell, taken from the Web Search Agent run's trust data
- Which Nimble tool answered each cell: supplied in the input, fast search, or a research run
- Empty cells where nothing could be confirmed, rather than a guess
How it works
A 6-phase pipeline.
- Wire the toolkit Construct NimbleToolkit with include_web_search_agents set to true, then hand get_tools() to create_agent. Nimble Search and the Web Search Agent tools are now available to the model.
- Skip what is known Cells that already hold a value are never re-fetched, so nothing is spent on data the file already has.
- Let the model choose For each remaining gap the agent either calls nimble_search for a fact confirmable in one lookup, such as a website or a head office, or starts a Web Search Agent run for anything needing multi-source research.
- Collect the runs A run takes minutes, so runs are started and collected asynchronously. The CSV header becomes the run's output schema, so column names pass through unchanged.
- Map trust to cells Each run returns per-claim citations and confidence keyed to a JSON path, which the app maps back to the exact cell the claim fills.
- Refuse rather than guess Any value that cannot be confirmed from a retrieved source is left empty and flagged for review.
Stack
Nimble primitives plus the full runtime stack.
Nimble APIs
What it does
- Web Search Agent Exposed to the LangChain agent as three tools: start a run, poll its status, fetch the result. Each run returns a schema-conforming answer with per-claim citations and a confidence grade.
- search Exposed as nimble_search for facts confirmable in a single lookup. The model decides which of the two a given gap deserves.
3rd Party Tools
Role
- langchain-nimble NimbleToolkit, the single entry point. Setting include_web_search_agents to true adds the Web Search Agent tools to the toolset.
- langchain create_agent handles the tool-calling loop and records which tool the model picked.
- langchain-anthropic The routing model.
- python 3.10+ Required by langchain-nimble 4.x.

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