An intelligent automation platform that uses AI to generate, validate, and execute Ansible playbooks through a natural language interface.
PlayGenie combines the power of Large Language Models (LLM) with Ansible automation to make infrastructure management as simple as having a conversation. Describe what you want to automate, and PlayGenie will generate, validate, and help you execute Ansible playbooks.
- AI-Powered Playbook Generation: Describe tasks in natural language, get Ansible playbooks
- Intelligent Validation: 5-step validation layer with automatic error fixing (3 retries)
- Code Editor: Professional Monaco editor for YAML editing
- Real-time Validation: Automatic retry with LLM-based error correction
- Chat Interface: Ask Ansible questions and get expert guidance
- Quick Execution: Save playbooks for immediate execution
The system consists of:
- Frontend: React application with Monaco code editor
- Backend: FastAPI server with LLM integration
- LLM: Ollama (local LLM) for AI-powered generation
- Validation: 5-step validation pipeline with retry mechanism
PlayGenie/
├── client/ # React frontend application
├── server/ # FastAPI backend application
├── ARCHITECTURE.md # Detailed system architecture
├── QUICK_START.md # Setup and running instructions
└── README.md # This file
- Node.js 16+
- Python 3.9+
- Ollama installed and running
- Ansible (optional, for execution)
-
Install Ollama and pull a model:
ollama pull llama2
-
Setup Backend:
cd server source ansible/bin/activate pip install -r requirements.txt # Create .env file with MODEL_NAME=llama2 uvicorn main:app --reload --host 127.0.0.1 --port 8000
-
Setup Frontend:
cd client npm install npm run dev -
Access: Open
http://localhost:3000in your browser
For detailed instructions, see QUICK_START.md
- ARCHITECTURE.md: Complete system architecture and design
- QUICK_START.md: Step-by-step setup guide
- server/README.md: Backend documentation
- client/README.md: Frontend documentation
- server/VALIDATION.md: Validation layer details
- server/VALIDATION_EXPLAINED.md: 5-step validation explained
- React 18
- Vite
- Tailwind CSS
- Monaco Editor
- Lucide React
- FastAPI
- Python 3.9+
- Ollama (LLM)
- PyYAML
- Ansible Runner
- User describes task → Frontend sends to
/api/chat - LLM generates playbook → Using system prompts
- Validation layer → 5-step validation with 3-retry mechanism
- Playbook displayed → In Monaco editor for editing
- User executes → Saves to
ansible/current-playbook.yml
- Local LLM processing (no external API calls)
- Environment variables for sensitive data
- Input validation on all endpoints
- CORS protection
Built for Ansible automation enthusiasts
This is a specialized Ansible automation assistant. Contributions welcome!
PlayGenie - Making infrastructure automation as simple as having a conversation!