An end-to-end AIOps platform that monitors Airflow-driven infrastructure deployments, performs autonomous failure analysis, and executes automated remediation β all from a single dashboard.
| Layer | Tech |
|---|---|
| Orchestration | Apache Airflow (Docker Compose) |
| Agent Pipeline | LangGraph multi-agent graph |
| Knowledge Retrieval | ChromaDB-backed RAG with HPE knowledge base |
| Backend API | FastAPI (deployment control, log streaming, agent proxy) |
| Frontend | React + Vite |
| Task Queue | Redis + RQ (passive HPC telemetry) |
| LLM | Groq (cloud) - Llama 3.3 70B |
The platform operates in two phases:
Airflow orchestrates infrastructure deployment across worker nodes. On task failure, the log collection layer kicks in:
- Monitor Workflow Agent β polls the Airflow REST API for task states, detects failures, computes timeout thresholds, and hands off to the Log Analyser. A Redis queue (consumed by an RQ worker) receives raw syslog/error logs from worker nodes and queues task failure events.
- Log Analyser Agent (LLM-based) β receives the task failure, identifies errors using RAG (ChromaDB with HPE docs, MinIO/NFS/iLO manuals, past error logs, and known error patterns). Produces a structured error report.
- Root Cause Agent (LLM-based) β reasons over the error report, classifies the cause as transient/config/hardware, and outputs root cause explanation + severity.
- Alerting Agent (LLM-based) β evaluates risk, sends Slack alerts, and produces a human-readable report.
LLM Inference is powered by Groq API (Llama 3.3 70B, free developer tier at 500 tok/s).
Phase 2 uses a two-attempt strategy:
Attempt 1 β DAG-level fix:
- DAG Analysis Agent (LLM-based) β takes the DAG source code + RAG context + Phase 1 analysis, scans for logic flaws, and identifies correct syntax using RAG.
- If issues are found in the DAG β DAG Patch Agent (Non-LLM) β patches the DAG source via AST rewriting, triggers a remediation DAG run via Airflow, and polls for task status.
- If Attempt 1 succeeds β Autofix complete β DAG fixed.
- If Attempt 1 fails β fetches actual failed logs from the remediation run and proceeds to Attempt 2.
Attempt 2 β Infrastructure-level fix (SSH):
- Log Analyser Agent re-analyzes the new failure logs from Attempt 1.
- Root Cause Agent re-classifies the updated failure.
- Fix Generator Agent (LLM-based) β produces OS-level SSH fix commands.
- Fix Executor Agent (Non-LLM) β connects via SSH to worker nodes and executes the fix commands.
- Validation Agent (Non-LLM) β runs post-fix health checks and verifies the Redis queue.
- If validation passes β Autofix complete. If not β Escalated to manual intervention.
| Service | Port | Description |
|---|---|---|
| Airflow UI | 8080 | DAG management and task logs (admin: airflow / airflow) |
| RAG Service | 8002 | ChromaDB retrieval + HPE knowledge base |
| Agent API | 8001 | LangGraph agent pipeline endpoints |
| Backend API | 8000 | Deployment control, log streaming, agent ops proxy |
| Frontend | 5173 | React dashboard |
| Redis | 6379 | Task queue broker |
hpe-pcai-ai-workflow/
βββ agents/ # LangGraph agents (workflow_graph.py is the main graph)
βββ airflow/ # Docker Compose stack, DAGs, and Airflow config
βββ api/ # Agent Ops API (FastAPI, port 8001)
βββ backend/ # Deployment backend API (FastAPI, port 8000)
βββ common/ # Shared config (config.py) and Pydantic models
βββ frontend/ # React + Vite UI
βββ rag/ # RAG engine, knowledge base, ChromaDB retrieval
βββ sample_logs/ # Sample failure logs for testing the agent pipeline
βββ docs/ # Technical documentation
βββ start.sh # Unified launcher (start/stop all services)
βββ main.py # CLI entry point for running the LangGraph pipeline
βββ .env.example # Environment variable template
βββ requirements.txt # Python dependencies
βββ architecture.png # System architecture diagram
βββ HPE_CPP-3_Final_Presentation_Slides.pdf
βββ HPE_CPP_Demo_Video.mp4
- Linux development environment (Ubuntu 20.04+ recommended)
- Python 3.10+ with
venv - Node.js 18+ and npm
- Docker Engine with Docker Compose v2
- At least one reachable Linux VM or host with SSH enabled (for deployment targets)
Copy the template and fill in your keys:
cp .env.example .envRequired keys:
| Variable | Purpose |
|---|---|
GROQ_API_KEY |
LLM inference via Groq (or use Ollama locally) |
AIRFLOW_FERNET_KEY |
Airflow encryption key |
AIRFLOW_SECRET_KEY |
Airflow webserver secret |
git clone <your-repo-url>
cd hpe-pcai-ai-workflowpython3 -m venv .venv
source .venv/bin/activatepip install -r requirements.txtcd frontend && npm install && cd .../start.shThis single command starts all 7 services in the correct order:
- Airflow stack (Docker Compose β scheduler, webserver, worker, Redis, Postgres)
- RAG Service (port 8002)
- Agent API (port 8001)
- Backend API (port 8000)
- RQ Worker (HPC error log queue)
- React Frontend (port 5173)
The script waits for Airflow to be healthy, unpauses the deployment DAG, and prints a summary with all URLs.
Service logs are written to .service_logs/.
./start.sh --stopThis cleanly stops all Python services, the frontend, and tears down Airflow Docker containers.
If you need to start completely fresh (wipe Airflow database, volumes, and all state):
cd airflow
docker compose down -v
cd ..
./start.shNote:
docker compose down -vremoves all Airflow volumes including the metadata database, DAG history, and logs. Use this when you want a completely clean environment.
If Airflow is already running or you're working on non-Airflow components:
./start.sh --no-airflowOnce all services are up, verify from a separate terminal:
# RAG Service
curl http://127.0.0.1:8002/health
# Agent API
curl http://127.0.0.1:8001/health
# Backend API
curl http://127.0.0.1:8000/
# Airflow API
curl -u airflow:airflow http://127.0.0.1:8080/api/v1/dags/deployment_workflow/detailsOpen the frontend at http://localhost:5173 and navigate to Worker Nodes.
For each target VM, enter:
- IP address
- SSH username
- SSH password
Go to SSH Validation and click Run SSH Health Check.
| Status | Meaning |
|---|---|
PASS |
Node is reachable and SSH is open |
REFUSED |
Host is reachable but SSH is not listening on port 22 |
TIMEOUT |
Routing, firewall, or network path issue |
Go to Deployment and click Start Infrastructure Deployment.
The platform will:
- Trigger the Airflow DAG with your worker node credentials
- Stream live combined logs from all tasks
- Display task progress in the Workflow Monitor
- Automatically trigger Agent Ops on failure
On a failed run, open Agent Ops to inspect:
- Log analysis output and error classification
- Root cause reasoning and severity
- Alerting output and remediation guidance
- RAG-retrieved similar patterns from the HPE knowledge base
Click Apply Autofix to trigger the hybrid remediation pipeline:
- Attempt 1 (DAG Patch): Analyzes the DAG source code, detects logic errors, and patches via AST rewriting
- Attempt 2 (SSH Fix): Generates OS-level fix commands, connects via SSH to worker nodes, executes fixes, and runs validation
The autofix status and results are displayed in real time on the dashboard.
You can test the full LangGraph pipeline against sample logs without the UI:
# Phase 1 only (analysis + alerting)
python main.py
# Phase 1 + Phase 2 (analysis + autofix)
python main.py --autofixThe RAG service builds structured queries combining:
- Airflow
task_idand domain hints (minio,nfs,postcheck) - Parsed
error_typeanderror_message - Raw log evidence (command text, keywords like
curl,exportfs,connection refused,timed out)
This ensures retrieval is specific to the failing task and aligned with the HPE knowledge base contents.
cd airflow
docker compose ps
docker compose exec airflow-webserver airflow dags list | grep deployment_workflowIf the DAG is paused, unpause it:
docker compose exec airflow-webserver airflow dags unpause deployment_workflowWorker nodes are stored in-memory. If the backend restarts, re-add nodes from the UI.
curl http://127.0.0.1:8000/nodesSSH is not listening on port 22 on the target VM:
# On the target VM:
sudo systemctl start ssh
sudo systemctl enable ssh
ss -tuln | grep :22Check Airflow task logs exist:
cd airflow
find logs -maxdepth 6 -type f | tail
docker compose logs --tail=100 airflow-schedulerRestart with forced local embeddings:
source .venv/bin/activate
RAG_FORCE_LOCAL_EMBEDDINGS=1 python -m uvicorn rag.main:app --host 0.0.0.0 --port 8002- Verify the RAG service is running:
curl http://127.0.0.1:8002/health - Verify the Agent API is running:
curl http://127.0.0.1:8001/health - The failure may not match any knowledge base entry
π Final Presentation Slides (PDF)
- Airflow runs locally through Docker Compose and is not production hardened
- Worker node persistence is in-memory only (resets on backend restart)
- Local RAG fallback mode is supported for offline development via
RAG_FORCE_LOCAL_EMBEDDINGS=1
