mindX.sh is a production-focused deployment script for the MindX Augmentic Intelligence System. It provides automated setup, configuration, and service management for the entire MindX ecosystem.
Version: 2.0.0 Purpose: Complete MindX system deployment and management Target: Production environments, development setups, and hackathon deployments
.env files and JSON configuration./mindX.sh <target_install_directory>
./mindX.sh [options] <target_install_directory>
--config-file <path>mindx_config.json--dotenv-file <path>.env file--runfalse--interactivefalse--venv-name <name>.mindx_env--frontend-port <port>3000--backend-port <port>8000--log-level <level>INFO-h, --help./mindX.sh --run /opt/mindx
./mindX.sh --interactive --run /opt/mindx
Will prompt for Gemini and Mistral AI API keys
./mindX.sh --config-file /path/to/prod-config.json \
--dotenv-file /path/to/prod.env \
--log-level WARNING \
/opt/mindx-production
./mindX.sh --venv-name mindx-prod \
--frontend-port 8080 \
--backend-port 9000 \
--run \
/var/www/mindx
<target_install_directory>/
├── .mindx_env/ # Python virtual environment
├── data/ # Data directory
│ ├── logs/ # Application logs
│ ├── pids/ # Process ID files
│ └── config/ # Configuration files
├── mindx_backend_service/ # Backend API service
│ └── main_service.py # FastAPI application
├── mindx_frontend_ui/ # Frontend UI service
│ ├── index.html # Main UI page
│ ├── styles.css # Styling
│ ├── app.js # Frontend logic
│ ├── server.js # Express server
│ └── package.json # Node.js dependencies
├── .env # Environment configuration
└── [mindx source code] # Core MindX modules
data/logs/mindx_coordinator_service.logdata/logs/mindx_frontend_service.logThe script supports interactive collection of API keys during setup using the --interactive flag:
./mindX.sh --interactive /opt/mindx
When interactive mode is enabled, the script will prompt for:
Features:
Example Interactive Session:
=== API Key Configuration ===
Enter your API keys (press Enter to skip and use defaults):
Gemini API Key (from https://aistudio.google.com/app/apikey): your-gemini-key-here
Mistral AI API Key (from https://console.mistral.ai/): your-mistral-key-here
[INFO] Gemini API key provided.
[INFO] Mistral AI API key provided.
[INFO] API key collection complete.
The script generates a comprehensive .env file with the following sections:
# Logging Level
MINDX_LOG_LEVEL="INFO"
Default LLM Provider
MINDX_LLM__DEFAULT_PROVIDER="ollama"
# Ollama Configuration
MINDX_LLM__OLLAMA__DEFAULT_MODEL="nous-hermes2:latest"
MINDX_LLM__OLLAMA__DEFAULT_MODEL_FOR_CODING="deepseek-coder:6.7b-instruct"
Gemini Configuration
GEMINI_API_KEY="YOUR_GEMINI_API_KEY_HERE"
MINDX_LLM__GEMINI__DEFAULT_MODEL="gemini-1.5-flash-latest"
Mistral AI Configuration
MISTRAL_API_KEY="YOUR_MISTRAL_API_KEY_HERE"
MINDX_LLM__MISTRAL__DEFAULT_MODEL="mistral-large-latest"
MINDX_LLM__MISTRAL__DEFAULT_MODEL_FOR_CODING="codestral-latest"
# Self-Improvement Agent
MINDX_SELF_IMPROVEMENT_AGENT__LLM__PROVIDER="ollama"
MINDX_SELF_IMPROVEMENT_AGENT__LLM__MODEL="deepseek-coder:6.7b-instruct"
Coordinator Agent
MINDX_COORDINATOR__LLM__PROVIDER="ollama"
MINDX_COORDINATOR__LLM__MODEL="nous-hermes2:latest"
# Resource Monitoring
MINDX_MONITORING__RESOURCE__ENABLED="true"
MINDX_MONITORING__RESOURCE__INTERVAL="15.0"
Performance Monitoring
MINDX_MONITORING__PERFORMANCE__ENABLE_PERIODIC_SAVE="true"
MINDX_MONITORING__PERFORMANCE__PERIODIC_SAVE_INTERVAL_SECONDS="300"
The script generates a comprehensive JSON configuration file:
{
"system": {
"version": "0.4.0",
"name": "MindX Self-Improving System (Augmentic)"
},
"logging": {
"uvicorn_level": "info"
},
"llm": {
"providers": {
"ollama": {"enabled": true},
"gemini": {"enabled": true}
}
},
"self_improvement_agent": {
"analysis": {
"max_code_chars": 70000,
"max_description_tokens": 350
}
},
"coordinator": {
"autonomous_improvement": {
"critical_components": [
"mindx.learning.self_improve_agent",
"mindx.orchestration.coordinator_agent",
"mindx.utils.config"
]
}
},
"tools": {
"note_taking": {"enabled": true},
"summarization": {"enabled": true},
"web_search": {"enabled": true}
}
}
./mindX.sh --run /opt/mindx
# Backend Service
cd /opt/mindx/mindx_backend_service
/opt/mindx/.mindx_env/bin/python main_service.py
Frontend Service
cd /opt/mindx/mindx_frontend_ui
node server.js
# Check if services are running
ps aux | grep -E "(uvicorn|node server.js)"
Check PID files
cat /opt/mindx/data/pids/mindx_backend.pid
cat /opt/mindx/data/pids/mindx_frontend.pid
# Backend logs
tail -f /opt/mindx/data/logs/mindx_coordinator_service.log
Frontend logs
tail -f /opt/mindx/data/logs/mindx_frontend_service.log
Deployment logs
tail -f /opt/mindx/data/logs/mindx_deployment_setup.log
# Stop backend
kill $(cat /opt/mindx/data/pids/mindx_backend.pid)
Stop frontend
kill $(cat /opt/mindx/data/pids/mindx_frontend.pid)
The script generates a comprehensive FastAPI backend with the following endpoints:
POST /commands/evolve - Evolve mindX codebasePOST /commands/deploy - Deploy a new agentPOST /commands/introspect - Generate a new personaPOST /commands/analyze_codebase - Analyze a codebasePOST /commands/basegen - Generate Markdown documentationGET /status/mastermind - Get Mastermind statusGET /registry/agents - Show agent registryGET /registry/tools - Show tool registryGET /logs/runtime - Get runtime logsGET /identities - List all identitiesPOST /identities - Create a new identityDELETE /identities - Deprecate an identityPOST /coordinator/query - Query the CoordinatorPOST /coordinator/analyze - Trigger system analysisPOST /coordinator/improve - Request component improvementGET /coordinator/backlog - Get improvement backlogGET /agents - List all registered agentsPOST /agents - Create a new agentDELETE /agents/{agent_id} - Delete an agentPOST /agents/{agent_id}/evolve - Evolve a specific agentPOST /agents/{agent_id}/sign - Sign a message with agent's identityThe script generates a modern web interface with:
# Check logs
tail -f /opt/mindx/data/logs/mindx_coordinator_service.log
Check Python environment
/opt/mindx/.mindx_env/bin/python --version
Check dependencies
/opt/mindx/.mindx_env/bin/pip list
# Check port usage
netstat -tlnp | grep :8000
netstat -tlnp | grep :3000
Use different ports
./mindX.sh --backend-port 9000 --frontend-port 4000 /opt/mindx
# Fix permissions
chmod +x mindX.sh
chmod 600 /opt/mindx/.env
chmod 644 /opt/mindx/data/config/mindx_config.json
# Enable debug logging
./mindX.sh --log-level DEBUG --run /opt/mindx
Check deployment logs
tail -f /opt/mindx/data/logs/mindx_deployment_setup.log
--run flag for immediate start# Backup current deployment
cp -r /opt/mindx /opt/mindx-backup-$(date +%Y%m%d)
Update script
wget https://raw.githubusercontent.com/your-repo/mindX.sh
chmod +x mindX.sh
Re-deploy
./mindX.sh --run /opt/mindx
# Edit configuration
nano /opt/mindx/.env
nano /opt/mindx/data/config/mindx_config.json
Restart services
pkill -f "uvicorn\|node server.js"
./mindX.sh --run /opt/mindx
mindX.sh is a comprehensive deployment script that provides:
The script enables rapid deployment of the MindX system for development, testing, production, and hackathon environments while maintaining security, reliability, and maintainability.