Llama 3 for advanced text generation • Tavily for web intelligence
This Python tool leverages the power of large language models LLaMA-3-8B and Tavily web search API to generate comprehensive company research reports. The agent automatically gathers information from multiple sources, synthesizes the data, and produces a professional Markdown report covering key business aspects of any company.
- Comprehensive Research: Covers 7 critical business dimensions
- Source Verification: Includes all sources with confidence scoring
- Efficient Processing: Parallel search execution
- Professional Output: Ready-to-use Markdown report
- Optimized Performance: 4-bit quantization for GPU efficiency
- Python 3.8+
- Tavily API key (free at app.tavily.com)
- NVIDIA GPU with CUDA support (recommended)
- Minimum 8 GB GPU RAM, 12 GB for optimal performance
- Clone the repository:
git clone https://github.com/darkangrycoder/company-research-agent.git
cd company-research-agent- Install required dependencies:
pip install -r requirements.txt- Get your Tavily API key from app.tavily.com
- Open
comp_research_agent.pyin a text editor - Locate the API key section and insert your key:
# Get Tavily API key securely
TAVILY_API_KEY = "your_api_key_here" # ← Replace with your actual key
tavily = TavilyClient(api_key=TAVILY_API_KEY)Run the research agent with the company name as an argument:
python comp_research_agent.py --company "Company Name"Example:
python comp_research_agent.py --company "Tesla"- GPU Requirement: For optimal performance, run on GPU-enabled environment
- Google Colab: Use "Runtime > Change runtime type > GPU"
- Local: Ensure CUDA drivers are installed
- Processing Time: Typically 3-6 minutes per report
- Output:
- Report printed in console
- Markdown file saved as
{Company_Name}_report.md
Each comprehensive report includes:
- Overview: Founding, leadership, milestones
- Financials: Revenue, funding, reports
- Operations: Employees, locations
- Market: Competitors, market share
- Digital: Social media presence
- Recent News: Latest developments
- Employer: Company culture, ratings
- All Sources: Complete reference list
graph TD
A[User Input] --> B(Tavily Web Search)
B --> C[Parallel Data Collection]
C --> D[LLM Processing]
D --> E[Report Generation]
E --> F[Markdown Output]
- 4-bit Quantization: Reduces model memory requirements by 4x
- Async I/O: Parallel web searches for faster data collection
- Content Truncation: Focuses on most relevant information
- HTML Sanitization: Clean text processing for better LLM comprehension
Common Issues:
- Slow Performance: Ensure you're using GPU acceleration
- API Errors: Verify Tavily API key is valid and has sufficient credits
- Incomplete Reports: Check network connection and API limits
Error Messages:
TavilyAPIError: Invalid or expired API keyCUDA Out of Memory: Reduce model size or use larger GPUConnectionError: Check internet connection
- Requires stable internet connection
- Tavily API has daily request limits
- Accuracy depends on web source reliability
- Complex company structures may require manual verification
- Multi-company comparison reports
- PDF export option
- Historical trend analysis
- Automated source credibility scoring
- Custom report templates
Get your Tavily API key: app.tavily.com
Llama 3.8 Web Modelhttps://huggingface.co/McGill-NLP/Llama-3-8B-Web
Report Issues: GitHub Issues
Contribute: Fork and submit pull requests

