Skip to content

manusmriti31/Eightfold-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Multi-Agent Company Research System

An intelligent multi-agent system that researches companies using 5 specialized AI agents working in parallel. Built with LangGraph and Google Gemini, it generates comprehensive research reports with visualizations and interactive UI.

✨ Features

  • 5 Specialized AI Agents - Profile, Leadership, Financial, Market, and Signals agents working in parallel
  • Interactive Web UI - Streamlit-based interface with real-time agent monitoring
  • Comprehensive Reports - HTML reports with charts, tables, and visualizations
  • Multiple Report Types - Executive summary, detailed analysis, or investor reports
  • High Confidence - Average 85%+ confidence scores with source tracking
  • Flexible Architecture - Run all agents or select specific ones based on your needs

πŸ—οΈ Architecture

The system uses 5 specialized AI agents that work in parallel:

Research Agents

  1. 🏒 Profile Agent - Business model, products, revenue streams
  2. πŸ‘₯ Leadership Agent - Founders, executives, management team
  3. πŸ’° Financial Agent - Revenue, profitability, funding, financial ratios
  4. πŸ“Š Market Agent - Market size, competitors, SWOT analysis
  5. 🚨 Signals Agent - News, sentiment, risks, hiring trends

Processing Pipeline

START β†’ [5 Agents in Parallel] β†’ Aggregate β†’ Synthesize β†’ Generate Report

Benefits:

  • ⚑ 2.5x faster than sequential execution
  • 🎯 85%+ average confidence scores
  • πŸ“Š 45+ sources per company
  • πŸ“ Comprehensive reports with visualizations

πŸš€ Installation

Prerequisites

  • Python 3.9 or higher
  • Google Gemini API key
  • Tavily API key (for web search)

Step 1: Clone the Repository

git clone https://github.com/yourusername/company-researcher.git
cd company-researcher

Step 2: Create Virtual Environment

Windows:

python -m venv venv
venv\Scripts\activate

macOS/Linux:

python -m venv venv
source venv/bin/activate

Step 3: Install Dependencies

pip install -r requirements.txt

Or install as a package:

pip install -e .

Step 4: Configure API Keys

  1. Copy the example environment file:
copy .env.example .env  # Windows
cp .env.example .env    # macOS/Linux
  1. Edit .env and add your API keys:
# Required
GOOGLE_API_KEY=your_google_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here

# Optional (for enhanced data)
ALPHA_VANTAGE_API_KEY=your_key_here
FMP_API_KEY=your_key_here
NEWS_API_KEY=your_key_here

Get API Keys:

🎯 Usage

Option 1: Web UI (Recommended)

Launch the interactive Streamlit interface:

streamlit run ui.py

Then open your browser to http://localhost:8501

Features:

  • Select which agents to run
  • Choose report type (executive, detailed, investor)
  • Real-time agent monitoring
  • Interactive HTML reports with charts
  • Export reports

Option 2: Python API

Use the system programmatically:

import asyncio
from src.graph.multi_agent_graph import research_company

async def main():
    # Research a company
    result = await research_company("Tesla")
    
    # Access results
    print(result['final_report'])
    print(f"Confidence: {result['report_metadata']['average_confidence']:.2%}")
    print(f"Sources: {len(result['all_sources'])}")

asyncio.run(main())

Option 3: Selective Agents

Run only specific agents:

from src.graph.selective_graph import research_selective

# Run only financial and market agents
result = await research_selective(
    company="Apple",
    selected_agents=["financial", "market"],
    report_type="executive"
)

Option 4: Command Line Testing

Test individual agents:

python test_intelligent_graph.py

Quick test:

python test_intelligent_graph_quick.py

πŸ“Š Report Types

Executive Summary

  • High-level overview
  • Key metrics and insights
  • 1-2 page format
  • Perfect for quick briefings

Detailed Analysis

  • Comprehensive research
  • All agent findings
  • Charts and visualizations
  • 5-10 page format

Investor Report

  • Financial focus
  • Market analysis
  • Risk assessment
  • Investment recommendations

πŸ“ Project Structure

company-researcher/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ agent/          # LangGraph agent configuration
β”‚   β”œβ”€β”€ agents/         # Individual research agents
β”‚   β”‚   β”œβ”€β”€ intelligence/  # Intelligent routing
β”‚   β”‚   └── research/      # Research agents
β”‚   β”œβ”€β”€ graph/          # Multi-agent orchestration
β”‚   β”œβ”€β”€ llm/            # LLM configuration
β”‚   β”œβ”€β”€ tools/          # Search and data tools
β”‚   β”‚   β”œβ”€β”€ analysis/   # Data analysis tools
β”‚   β”‚   β”œβ”€β”€ data/       # Financial data APIs
β”‚   β”‚   β”œβ”€β”€ search/     # Web search tools
β”‚   β”‚   └── visualization/  # Charts and tables
β”‚   β”œβ”€β”€ ui/             # Streamlit web interface
β”‚   └── voice/          # Voice interface (future)
β”œβ”€β”€ docs/               # Documentation
β”œβ”€β”€ eval/               # Evaluation scripts
β”œβ”€β”€ test_reports/       # Generated reports
β”œβ”€β”€ .env.example        # Environment template
β”œβ”€β”€ requirements.txt    # Python dependencies
β”œβ”€β”€ pyproject.toml      # Package configuration
└── ui.py              # Main UI entry point

πŸ”§ Configuration

Adjust Research Depth

Edit src/graph/multi_agent_graph.py:

# More queries = more depth
max_queries=5,

# More results = more sources
max_results_per_query=3

Adjust Rate Limiting

rate_limiter = InMemoryRateLimiter(
    requests_per_second=0.15,  # Adjust for your API limits
    check_every_n_seconds=60,
    max_bucket_size=10
)

Change LLM Model

Edit src/llm/llm_config.py:

model = ChatGoogleGenerativeAI(
    model="gemini-2.0-flash",  # or "gemini-2.5-pro"
    temperature=0.7
)

πŸ“š Documentation

πŸ§ͺ Testing

Run the test suite:

# Test intelligent graph
python test_intelligent_graph.py

# Quick test
python test_intelligent_graph_quick.py

# Test report formatter
python test_report_formatter.py

πŸ“ˆ Performance

  • Speed: 2.5x faster than sequential execution
  • Confidence: 85%+ average across all agents
  • Sources: 45+ unique sources per company
  • Time: ~3-4 minutes per company (rate limited)

πŸ› οΈ Troubleshooting

Rate Limit Errors

If you see 429 You exceeded your current quota:

  1. Wait 1 minute for rate limit to reset
  2. Reduce requests_per_second in configuration
  3. Consider upgrading your API plan

Low Quality Results

Increase research depth:

  • Increase max_queries (more search queries)
  • Increase max_results_per_query (more sources per query)
  • Add optional API keys for better data

Import Errors

Make sure all dependencies are installed:

pip install -r requirements.txt

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

MIT License - see LICENSE file for details

πŸ™ Acknowledgments

πŸ“§ Support

For issues and questions:

  • Open an issue on GitHub
  • Check the documentation
  • Review existing issues for solutions

Made with ❀️ using LangGraph and Google Gemini

About

The Company reserch agent

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages