Skip to content

A multi-agent AI system that delivers comprehensive business analysis by combining market research, technical evaluation, and financial insights. Uses OpenAI's GPT models with AutoGen to generate actionable business recommendations through a simple web interface.

Notifications You must be signed in to change notification settings

backyMacky/Autogen-Swarm-b

Repository files navigation

Autogen Swarm Business Analyzer

License: MIT Python 3.9+ OpenAI Flask Bootstrap GitHub issues GitHub stars GitHub forks Maintenance PRs Welcome

A "sophisticated" business analysis tool that leverages multiple AI agents to provide comprehensive business insights. The system uses OpenAI's GPT models and AutoGen framework to simulate a team of business experts analyzing your project or business idea.

Live Demo: [Demo link]

Buy Me A Coffee

Features

  • 🤖 Multi-Agent Analysis System

    • Market Analysis Expert
    • Technical Expert
    • Financial Advisor
    • Coordination Agent
  • 🧠 Comprehensive Analysis Coverage

    • Market size and potential
    • Technical feasibility
    • Financial projections
    • Risk assessment
  • 🌐 Web Interface

    • Clean, responsive design
    • Easy project brief submission
    • Formatted analysis results
    • Bootstrap-based UI

Prerequisites

  • Python 3.9+
  • OpenAI API key
  • OpenAI Assistant ID

Architecture

classDiagram
    class Config {
        +OPENAI_API_KEY: str
        +MODEL: str
        +TEMPERATURE: float
        +MAX_ROUND: int
        +SECRET_KEY: str
        +ASSISTANT_ID: str
        +llm_config(): Dict
    }

    class WebScraper {
        -session: Session
        +scrape_url(url: str): str
    }

    class OpenAIAssistant {
        -client: OpenAI
        -assistant_id: str
        +get_response(query: str): str
    }

    class BusinessAnalyzer {
        -config: Config
        -openai_assistant: OpenAIAssistant
        -web_scraper: WebScraper
        -coordinator: AssistantAgent
        -market_analyst: AssistantAgent
        -tech_expert: AssistantAgent
        -financial_advisor: AssistantAgent
        -user_proxy: UserProxyAgent
        +setup_agents()
        +run_analysis(project_brief: str): str
    }

    class FlaskApp {
        +config: Config
        +HTML_TEMPLATE: str
        +index(): str
    }

    class AssistantAgent {
        +name: str
        +llm_config: Dict
        +system_message: str
    }

    class UserProxyAgent {
        +name: str
        +human_input_mode: str
        +max_consecutive_auto_reply: int
        +llm_config: Dict
        +code_execution_config: Dict
    }

    BusinessAnalyzer --> Config
    BusinessAnalyzer --> OpenAIAssistant
    BusinessAnalyzer --> WebScraper
    BusinessAnalyzer --> AssistantAgent
    BusinessAnalyzer --> UserProxyAgent
    FlaskApp --> BusinessAnalyzer
    FlaskApp --> Config
    OpenAIAssistant --> Config
Loading

Quick Start

  1. Clone the repository:
git clone https://github.com/backyMacky/Autogen-Swarm-b.git
cd Autogen-Swarm-b
  1. Create and activate a virtual environment:
python -m venv env
source env/bin/activate  # On Windows: env\Scripts\activate
  1. Install required packages:
pip install flask openai autogen beautifulsoup4 requests markdown bleach
  1. Set up your OpenAI API key and Assistant ID in Config class

  2. Run the application:

python SwarmOnline.py
  1. Open your browser and navigate to:
http://localhost:5000

Configuration

Update the Config class in SwarmOnline.py:

@dataclass
class Config:
    OPENAI_API_KEY: str = os.getenv('OPENAI_API_KEY', 'your-api-key-here')
    MODEL: str = "gpt-4o-mini"  # Your preferred model
    TEMPERATURE: float = 0.7    
    MAX_ROUND: int = 10        
    SECRET_KEY: str = field(default_factory=lambda: os.getenv('SECRET_KEY', 'secret-key'))
    ASSISTANT_ID: str = field(default_factory=lambda: os.getenv('ASSISTANT_ID', ''))

How It Works

  1. Input: Submit your project brief through the web interface
  2. Analysis: Multiple AI agents analyze different aspects:
    • Market Analysis
    • Technical Assessment
    • Financial Analysis
    • Coordinated Insights
  3. Output: Receive a comprehensive analysis in formatted Markdown

Process Flow

graph TB
    subgraph "Web Layer"
        A[Flask Web Interface]
    end

    subgraph "Business Logic Layer"
        B[Business Analyzer]
        C[OpenAI Assistant]
        D[Web Scraper]
    end

    subgraph "Agent Layer"
        E[Coordinator Agent]
        F[Market Analyst Agent]
        G[Technical Expert Agent]
        H[Financial Advisor Agent]
        I[User Proxy Agent]
    end

    subgraph "External Services"
        J[OpenAI API]
        K[Web Resources]
    end

    A --> B
    B --> C
    B --> D
    B --> E
    E --> F
    E --> G
    E --> H
    E --> I
    C --> J
    D --> K

    style A fill:#f9f,stroke:#333,stroke-width:2px
    style B fill:#bbf,stroke:#333,stroke-width:2px
    style C fill:#ddf,stroke:#333,stroke-width:2px
    style D fill:#ddf,stroke:#333,stroke-width:2px
    style E fill:#dfd,stroke:#333,stroke-width:2px
    style F fill:#dfd,stroke:#333,stroke-width:2px
    style G fill:#dfd,stroke:#333,stroke-width:2px
    style H fill:#dfd,stroke:#333,stroke-width:2px
    style I fill:#dfd,stroke:#333,stroke-width:2px
    style J fill:#fdd,stroke:#333,stroke-width:2px
    style K fill:#fdd,stroke:#333,stroke-width:2px
Loading

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin feature/YourFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Documentation and Tutorials

Related Projects

Community and Support

Acknowledgments

Support

For issues and feature requests, please use the GitHub Issues


Made with ❤️ by Martin Bacigal

About

A multi-agent AI system that delivers comprehensive business analysis by combining market research, technical evaluation, and financial insights. Uses OpenAI's GPT models with AutoGen to generate actionable business recommendations through a simple web interface.

Resources

Stars

Watchers

Forks