Skip to content

Cyber Vision AI is an award-winning, open-source AI assistant for cybersecurity, document analysis, and knowledge management. Built with advanced RAG, MindMap, and multi-agent AI, it empowers security professionals and researchers with unrestricted, ethical, and insightful tools.

Notifications You must be signed in to change notification settings

bx0-0/CyberVisionAI

Repository files navigation

Cyber Vision AI

Award

A First-Place Award-Winning Graduation Project from the Faculty of Science, Zagazig University, Computer Science Department.

X Model Logo

GitHub stars GitHub forks MIT License


Overview

Cyber Vision AI is an advanced, open-source AI-powered assistant designed specifically for the cybersecurity community. This project, which won first place in the university's scientific conference for the Mathematics Division, was developed to overcome the limitations of conventional AI tools that often restrict security-related queries.

Our platform provides an unrestricted yet ethically-safeguarded environment for tasks such as vulnerability analysis, exploit explanation, and proof-of-concept code generation.


Core Features

  • Deep Thinking Mode: Delivers nuanced, analytically rich responses for complex cybersecurity problems.
  • Retrieval-Augmented Generation (RAG): Provides highly personalized answers by searching your private vector database.
  • Deep Search & Multi-Agent Framework: Conducts comprehensive, multi-stage searches and compiles in-depth, structured reports.
  • Voice Interaction: Features high-accuracy speech-to-text and text-to-speech capabilities.
  • MindMap Generation: Dynamically visualizes complex topics and plans as interactive mind maps using Markmap-CLI.
  • Live Web Search & Multi-AI Support: Augments answers with real-time web data and insights from multiple top-tier AI models.

Prerequisites

Before you begin, ensure you have the following installed and configured:

  • Python 3.12+ and pip.
  • Ollama: Install from ollama.com.
  • Markmap-CLI: Required for MindMap generation. Install it globally:
    npm install -g markmap-cli

Step-by-Step Installation and Setup Guide

Step 1: Set Up the AI Model with Ollama

  • Create the Model in Ollama: The project expects a model named X.
  • A ready-to-use Modelfile is available on the model's Hugging Face page.
  • Run the following command in a new terminal to create the model. Ollama will automatically download it.
    ollama create X -f /path/to/your/Modelfile
    Note: Replace the path with the actual location of your Modelfile.
  • Verify: Confirm the model is installed by running:
    ollama list
    You should see X in the list.

Step 2: Set Up the Project and Environment

  • Clone the Repository:
    git clone https://github.com/bx0-0/CyberVisionAI.git
    cd CyberVisionAI
  • Create and Activate a Virtual Environment:
    python -m venv venv
    # On Windows
    .\venv\Scripts\activate
    Important: Ensure the virtual environment (venv) is activated in every new terminal you use for running project commands.
  • Install Dependencies:
    pip install -r requirements.txt

Step 3: Configure the Frontend Environment

  • Create a .env file: Inside the chat/streamlit_stricture directory, create a new file named .env.
  • Add a Secret Key: Open the .env file and add the following line. This key is used to encrypt and secure the initial communication between the Django and Streamlit servers. You can use the provided key or generate your own secure key.
    SECRET_KEY=121f9d63c642ddd73325274068f4196aacd110b5f9ff3f882ff537046e81698b

Step 4: Set Up the Django Database

  • Database Migrations:
    # (Ensure venv is activated)
    python manage.py makemigrations
    python manage.py migrate
  • Create a Superuser:
    python manage.py createsuperuser
    Follow the prompts to set up your admin credentials.

How to Run the Application

To run Cyber Vision AI, you need to start several services in separate terminals.

Core Services (Always Required)

  • Terminal 1: Start Ollama Server
    ollama serve
  • Terminal 2: Start Django Backend Server
    # (Ensure venv is activated)
    python manage.py runserver 8080
    The backend will now be running at http://localhost:8080.
  • Terminal 3: Start Streamlit Frontend
    # (Ensure venv is activated)
    cd chat/streamlit_stricture
    streamlit run streamlit_chat.py --server.enableXsrfProtection false
    The frontend will now be running at http://localhost:8501.

Optional Services (for RAG Feature)

If you wish to use the Retrieval-Augmented Generation (RAG) feature, you will need to run the following two servers in two additional terminals.

  • Terminal 4: Start Redis Server (We recommend installing and running it via WSL):
    wsl
    redis-server
  • Terminal 5: Start Celery Worker From the project's root directory:
    # (Ensure venv is activated)
    celery -A project worker --pool=solo --loglevel=info

Accessing and Logging into the Application

  • Start with the Django Interface:
  • Automatic Redirect:
    • Upon successful login, the Django interface will automatically redirect you to the Streamlit application (http://localhost:8501).
    • Your authentication token will be passed securely in the background, ensuring you are logged in and ready to use the app without any manual steps.

Configuration and Customization


A Note on the Audio (TTS) Feature

  • The Text-to-Speech (TTS) feature in the current code was designed for an older version of the Kokoro model.
  • The application will run perfectly without the TTS feature.
  • If you wish to enable it, you will need to adapt the code in tts.py to work with the new version of the model.

License

This project is licensed under the MIT License.

About

Cyber Vision AI is an award-winning, open-source AI assistant for cybersecurity, document analysis, and knowledge management. Built with advanced RAG, MindMap, and multi-agent AI, it empowers security professionals and researchers with unrestricted, ethical, and insightful tools.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published