added readme and requirements.txt

This commit is contained in:
Madhu 2025-01-13 20:18:46 +05:30
parent 2243b6d54c
commit 9cfa8b5888
3 changed files with 85 additions and 8 deletions

View file

@ -0,0 +1,77 @@
# AI Competitor Intelligence Agent 🔍
The AI Competitor Intelligence Agent is a powerful competitor analysis tool powered by Firecrawl and Phidata's AI Agent framework. This app helps businesses analyze their competitors by extracting structured data from competitor websites and generating actionable insights using AI.
## Features
- **Multi-Agent System**
- **Firecrawl Agent**: Specializes in crawling and summarizing competitor websites
- **Analysis Agent**: Generates detailed competitive analysis reports
- **Comparison Agent**: Creates structured comparisons between competitors
- **Competitor Discovery**:
- Finds similar companies using URL matching with Exa AI
- Discovers competitors based on business descriptions
- Automatically extracts relevant competitor URLs
- **Comprehensive Analysis**:
- Provides structured analysis reports with:
- Market gaps and opportunities
- Competitor weaknesses
- Recommended features
- Pricing strategies
- Growth opportunities
- Actionable recommendations
- **Interactive Analysis**: Users can input either their company URL or description for analysis
## Requirements
The application requires the following Python libraries:
- `phidata`
- `exa-py`
- `streamlit`
- `pandas`
- `firecrawl-py`
You'll also need API keys for:
- OpenAI
- Firecrawl
- Exa
## How to Run
Follow these steps to set up and run the application:
1. **Clone the Repository**:
```bash
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
cd ai_agent_tutorials/ai_competitors_analysis_team
```
2. **Install the dependencies**:
```bash
pip install -r requirements.txt
```
3. **Set up your API keys**:
- Get an OpenAI API key from: https://platform.openai.com/api-keys
- Get a Firecrawl API key from: [Firecrawl website](https://www.firecrawl.dev/app/api-keys)
- Get an Exa API key from: [Exa website](https://dashboard.exa.ai/api-keys)
4. **Run the Streamlit app**:
```bash
streamlit run ai_competitor_analyser.py
```
## Usage
1. Enter your API keys in the sidebar
2. Input either:
- Your company's website URL
- A description of your company
3. Click "Analyze Competitors" to generate:
- Competitor comparison table
- Detailed analysis report
- Strategic recommendations

View file

@ -34,7 +34,7 @@ st.info(
)
# Input fields for URL and description
url = st.text_input("Enter your company URL (optional):")
url = st.text_input("Enter your company URL :")
description = st.text_area("Enter a description of your company (if URL is not available):")
# Initialize API keys and tools
@ -144,8 +144,8 @@ if "openai_api_key" in st.session_state and "firecrawl_api_key" in st.session_st
)
# Display the raw markdown table first
# st.subheader("Competitor Comparison (Markdown)")
# st.markdown(comparison_response.content)
st.subheader("Competitor Comparison")
st.markdown(comparison_response.content)
try:
# Split the markdown table into lines and clean them
@ -180,9 +180,9 @@ if "openai_api_key" in st.session_state and "firecrawl_api_key" in st.session_st
index=range(len(data_rows))
)
# Display the DataFrame
st.subheader("Competitor Comparison (Table)")
st.table(df)
# # Display the DataFrame
# st.subheader("Competitor Comparison Table")
# st.table(df)
except Exception as e:
st.error(f"Error converting table to DataFrame: {str(e)}")

View file

@ -1,5 +1,5 @@
exa-py==1.0.6
exa-py==1.7.1
firecrawl-py==1.9.0
duckduckgo-search==7.2.1
phidata==2.7.3
streamlit
streamlit==1.41.1