MASCOT is a sophisticated multi-agent system that leverages OpenAI's GPT models to process user queries through a series of specialized agents. Each agent performs a specific role in understanding, analyzing, researching, and generating comprehensive responses to user inputs. The system is designed to provide detailed, accurate, and well-structured answers by simulating a collaborative workflow among virtual agents.
- Multi-Agent Architecture: Utilizes a team of agents, each with a unique role, using the OpenAI api.
- Integration with OpenAI GPT Models: Utilizes both GPT-4 and GPT-3.5-turbo models for different agents.
- Knowledge Retrieval: Incorporates Google Search API for real-time data retrieval.
- User-Friendly Interface: Provides a graphical user interface (GUI) built with Tkinter for ease of use.
- Progress Tracking: Displays real-time progress and detailed outputs from each agent.
- Customizable Settings: Allows users to input their API keys and configure settings within the application.
- Customizable Agent profiles: Allows easy editing and saving of custom profiles and GPT models to use.
MASCOT-3-smaller.mp4
Before running MASCOT, ensure you have the following:
- Python 3.7 or higher installed on your system.
- OpenAI API Key: Sign up at OpenAI to obtain your API key.
- Google API Key and Search Engine ID (optional but recommended for full functionality):
- Obtain a Google API Key from the Google Cloud Console.
- Create a Custom Search Engine ID via the Programmable Search Engine.
Download the latest release from the Releases page, which includes a pre-built executable for Windows users.
- Download the Installer: Navigate to the Releases page and download the
mascot.exe
file. - Run the Installer: Double-click the downloaded
mascot.exe
file and follow the on-screen instructions to install MASCOT on your system.
If you prefer to build the executable yourself, follow these steps:
-
Install Python 3.7 or Higher
Download and install Python from the official website. Ensure that you check the option "Add Python to PATH" during installation.
-
Clone the Repository
Open Command Prompt and execute:
git clone https://github.com/yourusername/mascot.git cd mascot
-
Install Required Dependencies
Install the necessary Python packages:
pip install -r requirements.txt
-
Create a
config.env
File-
In the
mascot
directory, create a new file namedconfig.env
. -
Open
config.env
with a text editor (e.g., Notepad). -
Add the following lines, replacing
your_openai_api_key
,your_google_api_key
, andyour_search_engine_id
with your actual keys:OPENAI_API_KEY=your_openai_api_key GOOGLE_API_KEY=your_google_api_key SEARCH_ENGINE_ID=your_search_engine_id
-
Save and close the file.
Note: The
GOOGLE_API_KEY
andSEARCH_ENGINE_ID
are optional but recommended for full functionality. If you prefer, you can skip this step and enter your API keys through the application's settings interface after launching. -
-
Install PyInstaller
Install PyInstaller to build the executable:
pip install pyinstaller
-
Create the Executable
Run the following command to build the executable without a console window:
pyinstaller --noconsole --onefile mascot.py
- PyInstaller will generate an executable file in the
dist
folder namedmascot.exe
.
- PyInstaller will generate an executable file in the
-
Run the Application
-
Navigate to the
dist
folder:cd dist
-
Double-click the
mascot.exe
file to launch the application.
-
For users on macOS or Linux, follow these steps to run MASCOT:
-
Ensure Python 3.7 or Higher is Installed
-
macOS: Python 3 can be installed via Homebrew:
brew install python
-
Linux: Use your distribution's package manager. For example, on Ubuntu:
sudo apt-get update sudo apt-get install python3 python3-pip
-
-
Clone the Repository
Open Terminal and execute:
git clone https://github.com/yourusername/mascot.git cd mascot
-
Install Required Dependencies
Install the necessary Python packages:
pip3 install -r requirements.txt
-
Create a
config.env
File-
In the
mascot
directory, create a new file namedconfig.env
:touch config.env
-
Open
config.env
with a text editor (e.g.,nano
,vim
). -
Add the following lines, replacing
your_openai_api_key
,your_google_api_key
, andyour_search_engine_id
with your actual keys:OPENAI_API_KEY=your_openai_api_key GOOGLE_API_KEY=your_google_api_key SEARCH_ENGINE_ID=your_search_engine_id
-
Save and close the file.
Note: The
GOOGLE_API_KEY
andSEARCH_ENGINE_ID
are optional. You can enter your API keys through the application's settings interface after launching. -
-
Run the Application
python3 mascot.py
-
Launch the Application
- Windows:
- If you used Option 1, launch MASCOT from the Start Menu or desktop shortcut.
- If you used Option 2, navigate to the
dist
folder and double-clickmascot.exe
.
- macOS/Linux:
- Run
python3 mascot.py
in the terminal from themascot
directory.
- Run
- Windows:
-
Enter API Keys (If Not Using
config.env
)- Upon first run, go to File > Settings.
- Enter your OpenAI API Key. This is required for MASCOT to function.
- Optionally, enter your Google API Key and Search Engine ID to enable the Scribe agent's web search capabilities.
- Click Save.
-
Enter a Query
- Type your question or prompt into the input field at the bottom of the application window.
-
Submit the Query
- Click the Send button or press Enter to start the multi-agent processing.
-
Monitor Progress
- A progress bar will indicate the processing status.
- Outputs from each agent will be displayed in the conversation area.
-
View Results
- The final, formatted response will be delivered by the Courier agent.
- Previous conversations can be accessed from the Chat History panel on the left.
Example Query:
What are the latest advancements in renewable energy technologies?
MASCOT processes queries through a series of specialized agents:
-
Echo
- Role: Records the user's input verbatim.
- Function: Ensures the original query is captured accurately.
-
Hermes
- Role: Analyzes the intent of the query.
- Function: Breaks down the input to understand the main intent and any sub-intents.
-
Analyst
- Role: Applies reasoning to solve the problem.
- Function: Uses appropriate reasoning approaches to work through the problem.
-
Scribe
- Role: Retrieves relevant information using the Google Search API.
- Function: Gathers up-to-date information to support the analysis.
-
Architect
- Role: Plans the structure of the final response.
- Function: Develops a structured plan based on the outputs of previous agents.
-
Composer
- Role: Generates detailed content.
- Function: Creates the comprehensive response content.
-
Critic
- Role: Reviews and refines the content.
- Function: Ensures accuracy, clarity, and coherence in the response.
-
Courier
- Role: Delivers the final, formatted response.
- Function: Presents the response to the user in a clear and user-friendly format.
Each agent builds upon the outputs of the previous agents to provide a comprehensive and accurate response.
- Required for the application to function.
- Sign Up: Create an account at OpenAI.
- Navigate to API Keys: Go to the API Keys section.
- Create a New Secret Key: Click Create new secret key.
- Copy Your API Key: Save this key securely; you won't be able to view it again.
- Optional, but necessary for the Scribe agent to perform web searches.
- Go to Google Cloud Console: Google Cloud Console.
- Create a New Project (if necessary):
- Click on the project dropdown and select New Project.
- Enter a project name and click Create.
- Enable Custom Search API:
- Navigate to APIs & Services > Library.
- Search for Custom Search API and click Enable.
- Create Credentials:
- Go to APIs & Services > Credentials.
- Click Create credentials > API key.
- Copy the generated API key.
- Visit Programmable Search Engine: Programmable Search Engine.
- Create a New Search Engine:
- Click Add.
- In Sites to search, enter
www.google.com
to search the entire web. - Click Create.
- Retrieve the Search Engine ID:
- Under your new search engine, click Control Panel.
- Your Search Engine ID is displayed at the top.
You can provide your API keys in two ways:
- As described in the Installation section, add your API keys to the
config.env
file in the application directory.
- Open MASCOT.
- Go to: File > Settings.
- Enter Your API Keys:
- OpenAI API Key: Paste your key into the corresponding field.
- Google API Key and Search Engine ID: Enter these if you wish to enable web search functionality.
- Save: Click Save to store your configuration.
Contributions are welcome! Please follow these steps:
-
Fork the Repository
- Navigate to the MASCOT repository on GitHub.
- Click on the Fork button to create a copy of the repository under your GitHub account.
-
Clone Your Fork
git clone https://github.com/yourusername/mascot.git cd mascot
-
Create a New Branch
git checkout -b your-feature-branch
-
Make Your Changes
- Implement your feature or fix.
- Ensure your code follows the existing style and conventions.
-
Commit Your Changes
git add . git commit -m "Add your commit message here"
-
Push Changes to Your Fork
git push origin your-feature-branch
-
Submit a Pull Request
- Go to the original repository on GitHub.
- Click on Pull Requests.
- Click New Pull Request.
- Select your branch and submit the pull request with a detailed description.
This project is licensed under the MIT License.
Disclaimer: This software is provided "as is", without warranty of any kind.
Note: If you encounter any issues or have questions, please open an issue on GitHub.