setumodi/devops-logs-analysis
๐ ๏ธ AI-Powered Multi-Agent DevOps Incident Analysis Platform
Upload ops logs and let a team of collaborating AI agents parse them, classify the incident, retrieve the right runbooks (RAG), synthesize a fix, generate a recovery checklist, file a Jira ticket for critical issues, and notify Slack โ all orchestrated with LangGraph.
Stack: LangGraph ยท Hugging Face Inference ยท ChromaDB ยท Slack SDK ยท Jira REST ยท Streamlit
Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Streamlit UI (HF Space) โ
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ LangGraph Orchestrator โ
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โผ
1. Log Reader โ 2. Classifier โ 3. Remediation (RAG)
โ 4. Cookbook โ (critical?) โ 5. Jira โ 6. Slack โ END
LLM: OpenRouter (gpt-4o-mini) โ or Hugging Face (Qwen2.5 / Llama 3)
RAG: ChromaDB over data/runbooks/
Out: Slack notification + Jira ticketThe six agents
Graceful degradation: every external integration is optional. With no credentials the app still runs end-to-end using deterministic fallbacks and dry-run notifications โ ideal for demos, CI, and the free HF tier.
Quick start
# 1. Install dependencies
pip install -r requirements.txt
# 2. (Optional) configure integrations
cp .env.example .env # then fill in HF_TOKEN, SLACK_*, JIRA_*
# 3. (Optional) build the runbook vector index
python -m vectorstore.ingest
# 4. Run the UI
streamlit run app.pyOpen the app, pick a sample log (or paste your own), and click Analyze Incident.
Run the workflow headless
python -m graph.workflowConfiguration
All settings live in environment variables (see .env.example):
LLM provider priority: OPENROUTER_API_KEY โ HF_TOKEN โ rule-based fallback.
Embeddings note: OpenRouter does not expose an embeddings endpoint, so the runbook RAG embeddings run locally via sentence-transformers (free, offline). Only the chat/reasoning agents use OpenRouter.On Hugging Face Spaces, set these as Secrets in the Space settings.
Project structure
.
โโโ app.py # Streamlit UI
โโโ config.py # Env-driven settings + feature flags
โโโ llm.py # Hugging Face LLM wrapper (graceful fallback)
โโโ agents/
โ โโโ log_reader.py # Agent 1 โ regex parser
โ โโโ classifier.py # Agent 2 โ incident classifier
โ โโโ remediation.py # Agent 3 โ RAG remediation
โ โโโ cookbook.py # Agent 4 โ recovery checklist
โ โโโ jira_agent.py # Agent 5 โ Jira ticket
โ โโโ slack_agent.py # Agent 6 โ Slack notification
โโโ graph/
โ โโโ state.py # Shared IncidentState
โ โโโ workflow.py # LangGraph orchestrator
โโโ vectorstore/
โ โโโ ingest.py # Build + query the Chroma runbook index
โโโ data/
โ โโโ runbooks/ # Knowledge base for RAG
โ โโโ sample_logs/ # Demo logs
โโโ requirements.txtHow remediation RAG works
- The query is built from the classified root cause + parsed fields.
- ChromaDB returns the top-5 runbook chunks (embedded with a sentence-transformer). If ChromaDB isn't built/installed, a keyword overlap fallback is used instead.
- The LLM synthesizes a grounded fix citing the retrieved runbooks.
Add your own runbooks as markdown files in data/runbooks/ and rerun python -m vectorstore.ingest.
License
MIT โ for educational / portfolio use.
