A powerful AI-driven system for managing Proxmox Virtual Environment (PVE) infrastructure, leveraging LLMs for intelligent automation and management assistance.
- Natural language processing for Proxmox management
- Command history with vector embeddings
- Intelligent automation with LLM assistance
- Context-aware command suggestions
- Script template management
- VM, container, and cluster operations
- Backup and restore management
- Automated configuration management
- Resource monitoring and analysis
- PostgreSQL database with vector search
- Docker containerization for easy deployment
- Ansible integration for configuration management
- Python 3.9+
- Docker and Docker Compose (for containerized deployment)
- PostgreSQL with pgvector extension
- Proxmox VE environment
- Ansible (for configuration management)
-
Clone the repository:
git clone https://github.com/ai-Ev1lC0rP/proxmox-nlp.git cd proxmox-nlp -
Create and configure the environment variables:
cp .env.example .env # Edit .env with your configurations -
Run with Docker Compose:
docker-compose up -d
-
Or install manually:
pip install -r requirements.txt python proxmox_ai.py
The system integrates with Ansible for automated configuration management of Proxmox environments:
- proxmox_vm_manager.yml: Create, start, stop, and manage VMs
- proxmox_container_manager.yml: Manage LXC containers
- proxmox_cluster_manager.yml: Configure and manage Proxmox clusters
- proxmox_backup_manager.yml: Create, restore, and schedule backups
# List available playbooks
python proxmox_helpers/ansible_cli.py list
# Run VM operations
python proxmox_helpers/ansible_cli.py vm --operation create --vm-name test-vm --memory 2048 --cores 2
# Run container operations
python proxmox_helpers/ansible_cli.py ct --operation create --hostname test-ct --memory 1024
# Manage backups
python proxmox_helpers/ansible_cli.py backup --operation create --vm-id 100 --storage localInteract with the AI assistant using natural language commands:
# Start the assistant
python proxmox_ai.py
> Create a new VM with 2GB RAM and 2 CPU cores
> List all running containers
> Backup VM 100 to local storage
> Create a weekly backup schedule for all VMs
- Proxmox API client
- Command handler
- Script manager
- Database manager
- Ansible manager
- LLM integration
The system uses PostgreSQL with the pgvector extension for storing:
- Command history with vector embeddings
- Script templates and metadata
- Session context
The following tests are currently passing:
- ✅ Test connection to database
- ✅ Test create tables
- ✅ Test create command
- ✅ Test get command by ID
- ✅ Test list commands
- ✅ Test update command
- ✅ Test delete command
- ✅ Test vector search
- ✅ Test parse command
- ✅ Test execute command
- ✅ Test command history
- ✅ Test command suggestions
- ✅ Test vector similarity search
- ✅ Test create script
- ✅ Test get script by ID
- ✅ Test list scripts
- ✅ Test update script
- ✅ Test delete script
- ✅ Test execute script
- ✅ Test script parameters
- ✅ Test script suggestions
- Natural language understanding for Proxmox operations
- Automated VM and container management
- Intelligent error handling and suggestions
- Context-aware command history
- Script template creation and management
- Vector-based semantic search for commands and scripts
- Docker and Docker Compose support for containerized deployment
- CLI interface for executing commands against Proxmox VE
- Ansible integration for configuration management
- Terraform module integration for infrastructure as code
- Web dashboard for visualizing Proxmox resources
- Notification system for alerts and events
- Enhanced security features for credential management
- Performance analytics dashboard
- Advanced agent specializations for different management tasks
MIT License
This project was inspired by and builds upon several excellent open-source projects:
- Proxmoxer - Python client for Proxmox API
- Ansible - IT automation platform
- Ollama - Run LLMs locally
- Sentence Transformers - For vector embeddings
- SQLAlchemy - Python SQL toolkit and ORM
- pgvector - Vector similarity search for PostgreSQL
Special thanks to all the contributors and maintainers of these projects for making this work possible!