What You’ll Build
A ReAct agent that conducts comprehensive research on any company by combining website crawling with targeted web search. Give it a company name, website URL, and optional research focus — it autonomously crawls the site, extracts key pages, searches for external coverage, and produces a cited research report.View Source on GitHub
Architecture
The agent autonomously decides which tools to use and in what order. A typical research flow:- Crawl the company website to discover and summarize pages
- Extract detailed content from specific URLs found during crawling
- Search the web for external information (news, funding, reviews, competitors)
- Synthesize everything into a structured report with citations
Tools Used
| Tool | Purpose | Tavily Toolkit Function |
|---|---|---|
crawl_company_website | Crawl and summarize company website pages | crawl_and_summarize |
extract_from_urls | Extract detailed content from specific URLs | extract_and_summarize |
tavily_search | Search the web for external information | search_dedup |
Quick Start
- Anthropic SDK
- LangGraph
Source File
How It Works
Tool Wiring
Tool Wiring
Each tool wraps a Tavily Agent Toolkit function with agent-friendly parameters:
crawl_company_websitecallscrawl_and_summarizewith the company URL, optional extraction instructions, and depth/breadth controls. Returns a summarized overview of the crawled pages.extract_from_urlscallsextract_and_summarizewith specific URLs and an optional query focus. Usesextract_depth="advanced"for full content extraction.tavily_searchcallssearch_dedupwith multiple queries in parallel, returning deduplicated and formatted results withsearch_depth="advanced".
System Prompt
System Prompt
The agent is prompted as a business intelligence analyst:
Streaming Progress
Streaming Progress
Both implementations stream tool calls as they happen, so you can see the agent’s progress in real time:
Summarizer Model
Summarizer Model
The
crawl_and_summarize and extract_and_summarize tools use a dedicated summarizer model (configured via ModelConfig). In the examples, a smaller model is used for summarization to keep costs low while the main agent model handles reasoning.Example Interaction
Example Research Topics
- Company overview and products
- Leadership team and organizational structure
- Recent funding rounds and investors
- Competitive landscape
- Customer reviews and reputation
- Technology stack and engineering culture
Key Parameters to Tune
| Parameter | Where | Effect |
|---|---|---|
max_depth | crawl_company_website | How deep to crawl from the homepage (default: 2) |
max_breadth | crawl_company_website | Pages per crawl level (default: 10) |
limit | crawl_company_website | Total page cap (default: 20) |
extract_depth | extract_from_urls | "basic" or "advanced" for full content |
max_results | tavily_search | Results per search query (default: 5) |
topic | tavily_search | "general", "news", or "finance" |
Next Steps
Social Media Research
Add social media intelligence to your agent with platform-specific search.
Hybrid Research
Combine internal company data with web research for deeper analysis.