Loading repository data…
Loading repository data…
qicesun / repository
An Autonomous AI SRE Agent for Kubernetes, built with Java Spring Boot & LangChain4j. Implements OODA loop for self-healing.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
The Autonomous Site Reliability Engineer for your Kubernetes Cluster.
SRE-Agent is an enterprise-grade AIOps framework for Kubernetes, built in Java, to replace human firefighting with AI reasoning. It implements the OODA Loop (Observe -> Orient -> Decide -> Act) to autonomously detect, diagnose, and resolve production incidents, combining Kubernetes (Fabric8), GitLab, Jira, and web browsing into a unified cognitive architecture.
graph TD
U[User / SRE] --> UI[SRE Cockpit]
UI --> API[Spring Boot API]
API --> AGENT[DevOpsAssistant - LangChain4j AiServices]
AGENT --> OBS[Observe]
OBS --> ORI[Orient]
ORI --> DEC[Decide]
DEC --> ACT[Act]
ACT --> OBS
AGENT --> SYS[DevOpsSystemMessageProvider]
SYS --> CFG[SessionConfigStore]
AGENT --> MEM[SessionMemoryStore]
AGENT --> K8S[KubernetesTool - Fabric8]
AGENT --> GL[GitLabTool - HttpClient]
AGENT --> JIRA[JiraTool - REST API v3]
AGENT --> WEB[WebScraperTool - Jsoup]
K8S --> CLUSTER[Kubernetes Cluster]
GL --> GITLAB[GitLab API]
JIRA --> JIRAC[Jira Cloud API]
WEB --> WWW[Docs and Runbooks]
AGENT --> EVT[AgentEventStore - SSE]
EVT --> UI
This is not a chatbot. It is an agentic workflow built on Spring Boot 3 and LangChain4j, designed to run the OODA loop on live production signals.
Key building blocks:
DevOpsSystemMessageProvider defines the agent persona as an "Elite SRE" and injects the latest session-scoped external config before every model invocation.SessionMemoryStore maintains a per-session message window, enabling multi-turn reasoning keyed by X-Session-Id.KubernetesTool): Uses the Fabric8 Kubernetes Client for native cluster operations (list pods, fetch logs, rolling restarts for Deployments/StatefulSets).GitLabTool): A lightweight integration built on JDK HttpClient to fetch recent commits without heavy SDK dependencies (and can be extended to diffs).JiraTool): Incident lifecycle workflows (search, create, comment) using the Atlassian Jira Cloud REST API v3 (ADF descriptions for rich context).WebScraperTool): A lightweight Jsoup-based fetcher to "Google" error strings and pull troubleshooting hints from docs/posts.| Layer | Technology | Purpose |
|---|---|---|
| ☕ Runtime | Java 17 | Modern JVM baseline |
| 🌱 Framework | Spring Boot 3.2.x | API + wiring for tools, sessions, and streaming responses |
| 🧠 Agent Backbone | LangChain4j 0.35.0 | System prompt, tool calling, and memory orchestration |
| ☸️ Kubernetes | Fabric8 Kubernetes Client | Native cluster inspection and remediation |
| 🔌 Integrations | JDK HttpClient | GitLab/Jira REST calls without heavy dependencies |
| 🎛️ Frontend | Tailwind CSS | SRE Cockpit UI |
kubectlOPENAI_API_KEY)git clone https://github.com/qicesun/SRE-Agent-App.git
cd SRE-Agent-App
src/main/resources/application.properties is already wired to read these at runtime:OPENAI_API_KEYGITLAB_URL, GITLAB_TOKENJIRA_URL, JIRA_EMAIL, JIRA_TOKENminikube start
mvn spring-boot:run
This repo includes bad-deployment.yaml, which deploys a deliberately crashing payment-service (an nginx container that prints a simulated java.lang.NullPointerException, then exits to trigger CrashLoopBackOff).
kubectl apply -f bad-deployment.yaml
mvn spring-boot:run
http://localhost:8080/index.htmldefaultDeployment / payment-service"The payment-service in the system is down. Please check the logs for me. If it's a simple issue like a CrashLoopBackOff, try restarting it. If it cannot be fixed, please submit a JIRA ticket for me."
CrashLoopBackOff / repeated restarts.java.lang.NullPointerException ... RetryService.java:42.feat: risky change by a junior dev).SessionConfigStore keyed by X-Session-Id.v0.1.0 establishes the first maintained baseline for the project.Track active maintenance in GitHub via the v0.1.0 release and the v0.2.0 Evaluation Hardening milestone issues.