Sunday, November 29, 2026

From Monolithic Prompts to Microservice Agents: Cutting Enterprise AI Token Bloat with Local Caching and Deterministic Guardrails

From Monolithic Prompts to Microservice Agents: Cutting Enterprise AI Token Bloat

From Monolithic Prompts to Microservice Agents: Cutting Enterprise AI Token Bloat with Local Caching and Deterministic Guardrails

Lessons learned from decomposing a Java/Spring refactoring pipeline into a local-first, contract-driven multi-agent system.

As AI coding assistants become standard tools on engineering teams, two quiet anxieties are growing across organizations:

  1. The "I Don't Know, the AI Wrote It" Trap: When models generate thousands of lines of code behind opaque prompts, teams risk creating an unmaintainable black box where developers lose architectural ownership.
  2. Runaway Token Bloat: Sending entire repositories, error logs, and architectural rules to paid frontier cloud APIs on every iteration quickly costs enterprises an arm and a leg.

Recently, while packaging an autonomous Java/Spring Boot refactoring pipeline into a standalone Model Context Protocol (MCP) server, I realized we have already solved this exact class of problems before—when the industry moved from monoliths to microservices.

1. Opening the Black Box: Declarative Rules Over Blind Trust

The fear of "magic AI" comes from letting an LLM act without explicit, human-readable boundaries. When prompts hold hidden business rules and model outputs go straight into source control, nobody knows why decisions were made.

The solution is separating reasoning from policy. Instead of burying architectural standards inside prompt prose, we externalized every Java and Spring Boot standard into a declarative YAML policy file (java_rules.yaml) paired with a deterministic verification facade:

  • Human-Auditable Rules: Senior engineers define and version-control rules in plain YAML—requiring constructor injection, enforcing @Retryable exception ordering, banning JpaRepository when using JDBC, and validating Mockito test structure.
  • Deterministic Build Gates: The agent is never allowed to declare victory on its own. Every phased step must pass static policy guardrails, mvn test-compile, JUnit 5 tests, ArchUnit architecture guardrails, and PMD static analysis before moving forward.
  • Zero-Token Auto-Healers: When small local models make repeatable mechanical mistakes (like missing intra-project imports or adding redundant MockitoAnnotations.openMocks(this) calls), deterministic post-processors fix them in milliseconds using zero LLM tokens.
"Never spend LLM tokens to solve a problem that a regex rule, AST check, or compiler gate can enforce deterministically."

2. Monoliths vs. Microservices Applied to AI Agents

Early agent prototypes often look like software monoliths: one giant prompt or single mega-agent attempting to plan, scan every file, write code, resolve dependencies, and debug failures inside one massive context window. Just like monolithic applications, monolithic agents suffer from tight coupling, quadratic token bloat, and cascading failures.

By modeling agents after microservices, each component stays small, observable, and replaceable:

Dimension Monolithic Agent Anti-Pattern Microservice Agent Architecture
Scope One giant prompt handles planning, coding, and verification Single-purpose agents (refactor-agent, RAG/Memory service, Registry)
Discovery & Contracts Hardcoded function calls and brittle glue code Official MCP Registry (/v0/servers) with explicit toolName and allowedActions
Context Window Bloated full-repo dumps on every call Phased, step-by-step context scoped only to the active build gate
Replaceability Rewriting prompts breaks the entire pipeline Swap the underlying model or agent behind SSE (:8095/sse) with zero orchestrator changes

Just like a microservice, if a better coding model or refactoring engine arrives next year, we can replace refactor-agent behind its MCP contract without touching the Spring AI orchestrator or the memory store.

3. Fighting Token Bloat: Local Caching and Lesson Synchronization

Enterprise AI costs explode when systems treat every prompt as brand new—re-sending the same conventions, re-discovering the same compiler fixes, and defaulting to expensive frontier cloud models for routine tasks.

To prevent token bloat, we structured LLM routing as a tiered cascade backed by a local vector and episodic memory store (Milvus) and an LLM gateway (Bifrost):

Tier 0: Local Semantic & Episodic Cache (Milvus)  --> $0.00 (0 LLM tokens)
   │
   ▼ (Cache miss or code generation needed)
Tier 1: Local Edge Model (3B Coder on Edge Node)  --> $0.00 (Attempt 1 fast pass)
   │
   ▼ (Fails deterministic build/guardrail gate)
Tier 2: Local Heavy Model (7B Coder on GPU Node)  --> $0.00 (Planning & Attempt 2 retry)
   │
   ▼ (Only if both local tiers fail)
Tier 3: Paid Frontier Cloud API via Bifrost       --> Pay-per-use fallback (<5% of steps)
   │
   └──► Verified fix is committed back to Tier 0 local cache!

Why Local Caching & Synchronization Change the Economics

  • Hash-Deduplicated Knowledge Indexing: Workspace conventions, canonical import tables, and ArchUnit rules are indexed into local vector storage once using SHA-256 file hashes—never re-ingested unless a file changes.
  • Episodic Memory Across Runs: Whenever a retry succeeds after a compiler or guardrail error, the failure signature and verified fix are committed to local episodic memory. Future runs retrieve that lesson before hitting an expensive model.
  • Team-Wide Lesson Synchronization: In an enterprise environment, synchronizing verified episodic lessons and YAML policy updates across developer machines means one engineer's retry saves tokens for the entire organization. Paid cloud APIs become a circuit-breaker fallback rather than the default path.

Key Takeaways for Engineering Teams

  1. Keep humans in the driver's seat: Put architectural rules in version-controlled YAML and deterministic test gates, not opaque prompts.
  2. Design agents like microservices: Give each agent a single responsibility, clear MCP contracts, and independent deployability.
  3. Cache locally, escalate sparingly: Pair local 3B/7B models with episodic memory and deterministic auto-healers so paid frontier APIs are only called when genuinely needed—and cache what they teach you.

Built with Python, FastMCP/MCPServer, Spring AI, Bifrost LLM Gateway, Ollama, and Milvus.

A "Hello World" for Autonomous Engineering Agents: Refactoring Legacy Java with Small Local Models, Milvus Memory & ArchUnit Guardrails

Teaching Small Local Models to Refactor Enterprise Java

Teaching Small Local Models to Refactor Enterprise Java: A "Hello World" for Autonomous Engineering Agents

Asking an LLM to write a standalone function in a chat window is easy. Getting small, local open-weights models (3B and 7B parameters) to autonomously decompose a tightly coupled legacy Java service into a clean, multi-layered Spring Boot 3.5 architecture—and pass Maven compilation, JUnit 5 + Mockito tests, ArchUnit architecture rules, and PMD 7 static analysis from scratch—is a completely different engineering problem.

Source Code & Refactored Branch: Explore the full orchestration harness, Milvus RAG/memory integration, deterministic guardrails, and generated Spring Boot slice on GitHub at htotapally/autonomous-java-refactoring-guardrails (refactored) .

Think of this project as the true "Hello World" of agentic software engineering: the LLM is never trusted blindly, but operates inside a deterministic harness of living vector memory, tiered local inference routing, and automated verification gates.

What We Accomplished

1. Multi-Node Tiered Inference Routing (Edge 3B → Heavy 7B)

Instead of sending every prompt to a massive cloud frontier model, the orchestrator (run_batch.py) routes requests through a local Bifrost AI Gateway across two physical Ollama nodes:

  • Planner & Escalation Tier (qwen2.5-coder:7b): Generates the 5-step JSON refactoring plan (refactor_plan.json) and steps in automatically whenever a step fails its first attempt.
  • Fast Edge Worker (qwen2.5-coder3b-8k on NVIDIA Jetson): Handles first-pass file generation at low latency. Once our institutional knowledge base matured, even the 3B edge model generated valid, ArchUnit-compliant Java code and passing JUnit 5 + Mockito unit tests on Attempt 1.
  • Automatic GPU Lifecycle Management: Explicitly unloads models (keep_alive: 0) across nodes after planning and upon exit so VRAM remains clean.

2. Living Institutional Memory with Milvus (codebase_chunks & agent_memories)

Model weights are static, so institutional knowledge lives externally in Milvus behind a Spring Boot MCP/RAG service:

  • Semantic Convention & API Retrieval (codebase_chunks): CONVENTIONS.md, JAVA_IMPORTS.md, and ArchitectureGuardrailTest.java are chunked and SHA-256 hash-tracked so unchanged files skip re-indexing while updated rules sync immediately.
  • Episodic Self-Healing (agent_memories): Whenever a step fails on Attempt 1 and succeeds on Attempt 2 or 3, the agent commits (error_signature → verified_fix) into Milvus. On future runs, semantic search retrieves those exact lessons before retrying.

3. Deterministic Pre-Flight Guardrails & Automated Normalization

Small models frequently trip over predictable Java/Spring quirks—hallucinated JPA imports, field @Autowired injection, MockitoAnnotations.openMocks double-mocking, or instantiating abstract Spring DataAccessException classes. Instead of burning slow compiler cycles on known failure modes:

  • fix_imports.py ([IMPORT-FIX]): Strips hallucinated imports and resolves valid symbols deterministically against the project's classpath.
  • Pre-Flight AST/Regex Gates & Type Normalizers ([TYPE-FIX]): Enforces constructor injection (private final), verifies dual (String) and (String, Throwable) constructors on custom RuntimeException types, enforces @Retryable + TransientDataAccessException catch ordering, and blocks invalid Mockito patterns in milliseconds before mvnw.cmd even launches.

4. End-to-End 5-Step Legacy Decomposition from Scratch

Starting from a single monolithic LegacyOrderReportService wired with @Value JDBC credentials and raw java.sql.* calls, the pipeline autonomously executes and verifies five gated steps:

  1. Extract Domain Model & Errors (compile gate): Immutable Java 21 record (OrderSummary) + custom OrderPersistenceException.
  2. Define Persistence Boundary (compile gate): Plain OrderRepository interface + @Repository JdbcOrderRepository using NamedParameterJdbcTemplate.
  3. Refactor Business Service (compile gate): Constructor-injected OrderService annotated with @Retryable(retryFor = TransientDataAccessException.class) and clean exception translation.
  4. Strangler-Fig Legacy Facade (compile gate): Refactors LegacyOrderReportService into a zero-SQL thin @Service facade delegating to OrderService so existing callers never break.
  5. Isolated Unit Tests (test gate): Generates OrderServiceTest (@ExtendWith(MockitoExtension.class)) and passes Maven Surefire, ArchUnit (ArchitectureGuardrailTest), and PMD 7 cleanly.

System Architecture

CLI Orchestrator run_batch.py (--replan) SHA-256 Workspace Indexer CONVENTIONS / IMPORTS / ArchUnit Milvus: codebase_chunks Semantic Rules & API Signatures Milvus: agent_memories Episodic Error → Fix Lessons Bifrost AI Gateway (:18080) Tiered Router & VRAM Unloader Ollama Node 1 (Jetson) qwen2.5-coder3b-8k (Attempt 1) Ollama Node 2 (Heavy) qwen2.5-coder:7b (Plan & Retry) 5-Step Execution Engine Domain → Repo → Service → Facade → Test Normalizers & Pre-Flight Gates fix_imports.py + [TYPE-FIX] + AST Rules Deterministic Build Gate mvnw test (JUnit 5 + ArchUnit + PMD 7) Green Build & Self-Learning Commits Verified Fixes to Milvus

What's Next: Packaging into a General-Purpose refactor-agent

Now that the core loop is proven end-to-end on Java and Spring Boot, the next evolution is extracting the language-specific checks behind a pluggable VerificationFacade (backed by externalized YAML policy packs) and packaging the runner into an installable CLI (refactor-agent --repo <path> --goal "<task>") capable of refactoring any codebase while sharing a single compounding Milvus knowledge base.

Check out the repository and follow the progress here: https://github.com

Friday, November 27, 2026

Beyond Vibe Coding: Automating Log-Driven Java Defect Remediation with Local LLMs, ArchUnit, and PMD 7

Beyond Vibe Coding: Automating Log-Driven Java Defect Remediation with Local LLMs, ArchUnit, and PMD 7
Enterprise Java & AI Engineering

Beyond Vibe Coding: Automating Log-Driven Java Defect Remediation with Local LLMs, ArchUnit, and PMD 7

How to turn production stack traces into verified Spring Boot pull requests on local hardware without sacrificing architectural integrity.

Production Spring Boot services emit thousands of structured log events and distributed traces every hour. When an unhandled database error or configuration failure surfaces in those logs, the recovery workflow still looks remarkably manual: an engineer hunts down the stack frame, untangles tightly coupled legacy classes, writes a regression test, and opens a pull request.

In theory, large language models should accelerate that loop. In practice, sending proprietary Java repositories and sensitive production logs to external cloud APIs often hits immediate data governance and compliance walls. To find out whether open-weight models running entirely on local hardware can close that gap safely, I built an open-source reference pipeline in Java 21 and Spring Boot 3.5: autonomous-java-refactoring-guardrails.

The Starting Point: Runtime Failures Inside Legacy Code

Real production defects rarely hide inside clean, freshly scaffolded modules. They usually live in older service classes where infrastructure concerns and business logic have grown together over the years. In the legacymess branch of the repository, a single @Service class intentionally combines three common enterprise anti-patterns:

  • Field-injected configuration (@Value): Credentials and connection settings are injected directly into private fields, blocking plain constructor instantiation in fast unit tests.
  • Inline JDBC calls (DriverManager and ResultSet): SQL execution and connection management sit directly inside domain logic.
  • Swallowed exceptions (e.printStackTrace()): Database failures are caught, printed to standard error, and masked behind empty list returns.

When the database becomes unreachable or credentials expire, runtime logs capture raw PSQLException stack traces pointing straight to that service method. The goal of the harness is straightforward: take that captured log context, use a local LLM to extract a clean repository boundary with proper retry and exception-translation semantics, and prove architectural compliance before a human reviewer ever sees a pull request.

Preventing the “Green Build Illusion” with ArchUnit 1.3 and PMD 7

Running local code models across 3B, 7B, and 14B parameter sizes quickly reveals a trap I call the green build illusion. When prompted only to make the compiler and unit tests pass, smaller models routinely take shortcuts that undermine the codebase:

  • Leaving @Value fields untouched while wrapping the method signature to satisfy a prompt.
  • Importing java.sql.* directly inside @Service classes instead of isolating persistence behind a repository interface.
  • Returning hardcoded List.of() stubs or duplicating Mockito setup so assertions pass vacuously.

To prevent subtle architectural drift from slipping past a green Maven build, every automated refactoring pass is gated by an executable fitness function combining three verification layers:

@AnalyzeClasses(packages = "com.aiops.governance", importOptions = ImportOption.DoNotIncludeTests.class)
public class ArchitectureGuardrailTest {

    @ArchTest
    static final ArchRule services_should_not_use_field_injection =
        noFields().that().areDeclaredInClassesThat().areAnnotatedWith(Service.class)
            .should().beAnnotatedWith(Autowired.class)
            .orShould().beAnnotatedWith(Value.class);

    @ArchTest
    static final ArchRule services_should_not_access_jdbc_directly =
        noClasses().that().areAnnotatedWith(Service.class)
            .should().dependOnClassesThat()
            .resideInAnyPackage("java.sql..", "org.springframework.jdbc..");
}

Alongside ArchUnit 1.3 structural assertions, the Maven build enforces PMD 7 static rules to reject swallowed exceptions, unused imports, console print calls, and high cyclomatic complexity, while JUnit 5 and Mockito verify normal delegation, transient timeout propagation, and non-transient exception wrapping without booting a Spring context.

What Happened Across 3B, 7B, and 14B Local Models

Benchmarking identical log-driven refactoring tasks across three local model tiers highlighted clear operational trade-offs:

Model Tier Where It Excels Where It Struggles
3B (qwen2.5-coder:3b) Fast generation of Java record DTOs, custom exception hierarchies, and initial class skeletons on low-memory edge hardware. Prone to hallucinating Spring Data method signatures or leaving subtle Mockito stubbing mismatches across files.
7B (qwen2.5-coder:7b) Strong at resolving cross-file compiler errors, constructor injection, and Java 21 stream generics when fed structured Maven error output. Occasionally requires a second repair pass when refactoring deeply nested JDBC resource blocks.
14B (qwen2.5-coder:14b) Highest single-pass accuracy across multi-class Spring Boot 3.5 wiring and architectural decomposition. Noticeably slower prompt ingestion on CPU-bound systems; benefits from stage-level model unloading.

Key Takeaway: Models Are Frozen — Your Harness Learns

Core Engineering Principle: An open-weight model does not retain memory across retries; its weights are static. Reliable automation comes from encoding every recurring failure mode into deterministic code outside the model.

Instead of writing longer prompts whenever a model stumbled on Java 21 generics or missing imports, three deterministic patterns delivered far higher reliability:

  1. Bottom-Up Batch Decomposition: Generate domain records and repository interfaces first, verify compilation, and only then wire service classes and unit tests.
  2. Deterministic AST & Import Normalization: Promote recurring import resolutions and type fixes out of LLM retry loops into deterministic code recipes (such as OpenRewrite rules).
  3. Explicit Memory Management: Unload models (keep_alive: 0) between pipeline stages so local workstations and edge devices stay responsive during Maven compilation and test runs.

Scaling to Enterprise Observability: Jaeger, Kafka, and Automated PRs

To move from a local prototype to an enterprise microservice environment, the same verification loop connects directly to standard observability infrastructure:

1. Observability OpenTelemetry & Jaeger export stack traces to prod.exceptions.triaged 2. Triage & Slicing Deduplicate fingerprints, map repo & commit SHA, slice AST target context 3. Local LLM Escalation Phase 0 Plan & Batch Gen 3B → 7B → 14B + Deterministic Recipes 4. Zero-Trust Gate JUnit 5 + Mockito ArchUnit 1.3 + PMD 7 Open Verified PR
End-to-end log-driven defect remediation pipeline from OpenTelemetry/Jaeger traces and Kafka to local verification gates and GitHub Pull Requests.
  • Trace & Log Ingestion: OpenTelemetry and Jaeger export runtime exceptions to a dedicated Kafka topic (prod.exceptions.triaged).
  • Fingerprinting & Triage: A consumer groups duplicate stack traces, maps stack frames to exact source repositories and commit SHAs, and filters transient network noise from actionable code defects.
  • Isolated Local Remediation: A worker checks out a fix/<trace-id> branch, runs a planner to map affected interfaces, and escalates edits across 3B → 7B → 14B local models paired with deterministic recipes.
  • Zero-Trust Pull Request Gate: A pull request is opened on GitHub only if mvn test—including JUnit 5, Mockito, ArchUnit 1.3, and PMD 7—passes completely. Reviewers receive the diff alongside the original Jaeger trace link and guardrail report.

You can inspect the complete before-and-after code, guardrail tests, and batch orchestrator across the main, legacymess, and refactored branches in the autonomous-java-refactoring-guardrails GitHub repository.

About the Author
Hara Totapally is a software architect and engineering leader based in Ashburn, Virginia, with over twenty years of experience building enterprise Java platforms, distributed systems, and practical AI automation workflows.

Wednesday, November 25, 2026

From Zero Unit Tests to Self-Healing Java Code: Turning Production Logs into Automated Fixes on an 8GB Jetson Orin Nano

From Zero Unit Tests to Self-Healing Java Code: Turning Production Logs into Automated Fixes on an 8GB Jetson Orin Nano

In legacy or fast-moving codebases, production logs are often the most honest documentation you have. When an application crashes at 2:00 AM with zero unit test coverage, developers typically follow the same manual routine: read the stack trace, locate the failing method, write a test to reproduce the crash, patch the edge case, and verify the build.

I wanted to see if I could automate that entire loop—starting with zero unit tests and using only runtime log files as the source of truth—while running the AI model 100% locally on an 8GB NVIDIA Jetson Orin Nano.

The result is split across two open-source repositories:

  • The Target Application: springboot-calculator-seed — A deliberately unhardened Spring Boot REST API with zero unit tests.
  • The Autonomous Repair Control Plane: defect-repair-agent — A Python orchestrator that parses logs, slices Java ASTs, generates JUnit 5 tests and patches via Ollama (qwen2.5-coder:3b), and verifies fixes with Maven.

Here is how the system works, how it turns raw stack traces into dynamic regression tests, and what it took to make a 3-billion-parameter edge model reliable.


1. The Starting Point: Zero Tests, Real Runtime Crashes

To "eat our own dog food," I built springboot-calculator-seed with four atomic service methods (add, subtract, multiply, divide) accepting generic Java Number wrapper objects—and intentionally omitted all input validation and unit tests.

Because the methods were unhardened, sending malformed or edge-case HTTP requests immediately produced genuine production stack traces in logs/app.log:

  • POST /api/calc/divide with {"a": 10, "b": 0} threw java.lang.ArithmeticException: / by zero.
  • POST /api/calc/add with {"a": 10} (leaving b as null) threw java.lang.NullPointerException.

At this stage, the log file was the only signal describing what was broken and how the application was actually failing.

2. The Split-Node Architecture: Edge AI + Workstation Build

Running an LLM, a Python orchestrator, and a Java/Maven JVM build simultaneously on an 8GB Jetson Orin Nano quickly exhausts unified RAM. To keep inference fast and memory flat, I split the pipeline across two machines on my local network:

┌──────────────────────────────────────────────┐    LAN (HTTP)    ┌────────────────────────────────┐
│          64GB Windows Workstation            │ ───────────────► │   NVIDIA Jetson Orin Nano      │
│      (defect-repair-agent Control Plane)     │                  │   (8GB Unified RAM - Headless) │
│                                              │                  │                                │
│  1. log_parser.py  -> Extract stack frame    │                  │  • Ubuntu multi-user.target    │
│  2. java_slicer.py -> Slice atomic method    │                  │  • Ollama API (:11434)         │
│  3. jetson_agent.py -> Enforce guardrails    │ ◄─────────────── │  • qwen2.5-coder:3b            │
│  4. verifier.py -> Run mvnw.cmd test         │  Test & Patch    │    (num_ctx: 4096)             │
└──────────────────────────────────────────────┘                  └────────────────────────────────┘
  • 8GB Jetson Orin Nano (Inference Appliance): Booted into headless mode (multi-user.target) to free ~700 MB of GUI overhead, running Ollama with qwen2.5-coder:3b (~1.9 GB weights) and a strict num_ctx: 4096 cap.
  • 64GB Workstation (Control Plane & Build Runner): Executes defect-repair-agent, parses logs, slices Java source files, and runs mvnw.cmd test locally.

3. How Logs Drive Dynamic Unit Test Creation & Defect Repair

Instead of asking an LLM to scan an entire repository blindly, the pipeline uses the production stack trace as a surgical scalpel across four stages:

Stage 1: Stack Trace Extraction (log_parser.py)

log_parser.py scans logs/app.log, deduplicates repeated exceptions, and extracts the exact application frame (com.aiops.governance.calculator.service.CalculatorService), method name, exception type, and crashing line number.

Stage 2: Atomic AST Slicing (java_slicer.py)

Small 3B models lose accuracy when fed hundreds of lines of boilerplate. Using tree-sitter-java, java_slicer.py parses the target .java file and slices out only the exact method containing the crashing line—keeping the prompt tiny, focused, and fast.

Stage 3: Test-First Synthesis (jetson_agent.py)

Using the stack trace and the sliced method, the Jetson generates artifacts in three distinct steps:

  1. Dynamic JUnit 5 Test Generation: Because the repository started with zero tests, jetson_agent.py first generates a brand-new JUnit 5 test class (CalculatorService_divideAutoTest.java and CalculatorService_addAutoTest.java) targeting the exact failure inputs from the log.
  2. Closed-Loop Bug Reproduction: Before touching any application code, verifier.py runs mvnw.cmd test. The newly generated test must fail against the unpatched code—proving it genuinely reproduces the production crash.
  3. Atomic Method Patching: Once reproduction is confirmed, the Jetson rewrites only the sliced method to handle the edge case (IllegalArgumentException on null or zero divisor), and verifier.py patches the exact line range while keeping a .bak safety backup.

Stage 4: Verification & Auto-Rollback (verifier.py)

verifier.py runs mvnw.cmd test again. If the patch compiles and passes both the new regression test and existing tests, the fix is kept. If anything fails, verifier.py feeds the Maven [ERROR] lines back to the Jetson for a self-correction retry—and automatically restores the .bak file if all attempts fail.

4. What Made a 3B Model Reliable: Deterministic Guardrails

One of the biggest lessons from building defect-repair-agent is that prompts alone aren't enough for small local models—Python guardrails are essential:

  • Atomic Method Boundaries: Writing single-responsibility methods meant qwen2.5-coder:3b only ever had to reason about 6–10 lines of Java at a time.
  • Automatic Import Injection: When the 3B model occasionally omitted import org.junit.jupiter.api.Test;, Python injected the standard JUnit 5 imports deterministically before compiling.
  • Contract Normalization: Rather than letting the generated test and generated fix disagree on which exception class to throw, Python normalized the expected contract (IllegalArgumentException) across both artifacts.
  • Dynamic Exception Anchoring: Anchoring the prompt directly to the parsed stack trace (NullPointerException vs. ArithmeticException) prevented the model from hallucinating unrelated edge cases (like testing division by zero inside add()).

5. Live Execution Proof

Running .venv\Scripts\python.exe verifier.py against logs/app.log automatically generated the missing JUnit 5 test suite and hardened both crashing methods:

==========================================
[DEFECT] java.lang.ArithmeticException in com.aiops.governance.calculator.service.CalculatorService.divide() (Line 31)
[1/4] Asking Jetson (qwen2.5-coder:3b) to generate JUnit 5 reproduction test...
[2/4] Running mvnw test to verify bug reproduction...
[OK] Bug reproduced! Test failed as expected.
[3/4] Asking Jetson (qwen2.5-coder:3b) to generate method fix (Attempt 1/2)...
[4/4] Running mvnw test to verify patched method (Attempt 1/2)...
[SUCCESS] Fix verified! CalculatorService.java patched and CalculatorService_divideAutoTest.java passes.

What started as an untested Spring Boot API with runtime crashes in a log file ended with verified, passing JUnit 5 regression tests and hardened service methods—built autonomously on an 8GB edge GPU.


Explore the Code & What's Next

Both repositories are available on GitHub:

Next, I plan to expand the pipeline with real-time file tailing (log_watcher.py), automated Git branch/PR creation so human developers can review verified fixes with one click, and benchmarking qwen2.5-coder:7b on the Jetson as an automatic fallback tier for more complex service methods.

Tuesday, November 24, 2026

From Local Beans to an Official MCP Agent Registry: Building a Distributed, Human-on-the-Loop AIOps Governance Platform

From Local Beans to an Official MCP Agent Registry: Building a Distributed, Human-on-the-Loop AIOps Governance Platform
AIOps Model Context Protocol MCP Registry Spring AI Jaeger Milvus RAG NVIDIA Jetson Orin Human-in-the-Loop Vibe Coding

From Local Beans to an Official MCP Agent Registry: Building a Distributed, Human-on-the-Loop AIOps Governance Platform

Transparency Disclaimer: I did not write a single line of code for this project. Every Java class, Docker Compose configuration, MCP server registration manifest, and frontend script in the aiops-governance-orchestrator repository was generated by Google AI based on my architectural requirements, iterative testing, and operational feedback.

1. Why Hardcoded Agents Hit a Wall

In Phase 1 of building the AIOps Governance Operations Center, all specialist agents—telemetry scouts, latency/error analysts, and remediation executors—lived as local Spring @Component beans inside a single JVM (:8085). While convenient for an initial prototype, coupling agents inside one application meant adding a new diagnostic specialist or upgrading an agent required recompiling and redeploying the entire orchestrator.

In Phase 2, the platform evolved into a distributed, polyglot agent ecosystem powered by the Official Model Context Protocol (MCP) Registry (:8090). Specialist agents now run as standalone containerized MCP servers (:8091, :8092, :8093), self-publish their capabilities and routing metadata on startup, and are discovered dynamically at runtime over MCP Server-Sent Events (SSE).

AIOps Governance & Official MCP Registry Distributed Architecture
Figure 1: Distributed AIOps Governance Architecture with Official MCP Registry (:8090), Standalone MCP Agents (:8091–:8093), Jaeger, Milvus, and NVIDIA Jetson Orin GPU.

2. Complete Service & Port Reference

Component Port Role in the Architecture
aiops-governance-orchestrator :8085 Core control plane, Operations Center Web UI, TelemetryScoutAgent, McpRegistryClient, and PolicyGatekeeperAgent.
Official MCP Registry :8090 Upstream Go-based MCP Registry (modelcontextprotocol/registry) serving POST /v0/publish and GET /v0/servers.
Registry PostgreSQL :5433 Stores published ServerJSON manifests, SSE URLs, tool names, match keywords, and routing priorities.
security-analyst-mcp :8091 Standalone Spring AI MCP server specializing in admin, auth, and forbidden span anomalies (priority: 5).
latency-analyst-mcp :8092 Standalone Spring AI MCP server specializing in latency SLO violations and HTTP 5xx errors (priority: 10).
remediation-executor-mcp :8093 Standalone Spring AI MCP executor handling approved actions (OPEN_CIRCUIT_BREAKER, CLEAR_CACHE).
geo-time-mcp-server :8083 Monitored Spring Boot microservice exposing /api/admin/remediate for live circuit-breaker control.
jaeger-aiops-guardian :8084 MCP bridge querying Jaeger traces and exposing structured span summaries to TelemetryScoutAgent.
Jaeger UI / Query :16686 / :16685 Distributed trace ingestion, visualization, and span latency/error lookup.
Milvus Vector DB / Attu :19530 / :8000 Vector storage for application-specific runbooks and SLO evaluation criteria (Attu provides the visual UI).
NVIDIA Jetson Orin (Ollama) :11434 Edge GPU inference running qwen2.5:3b for root-cause diagnosis and nomic-embed-text for RAG embeddings.

3. End-to-End Incident Detection & Execution Flow

During a governance scan, the orchestrator coordinates telemetry inspection, dynamic agent discovery, edge GPU reasoning, and human sign-off—recording exact millisecond durations for every stage and every Jaeger span segment.

End-to-End AIOps Incident Detection, MCP Discovery & Human-on-the-Loop Approval Sequence
Figure 2: Step-by-step incident detection, MCP Registry discovery, Jetson Orin GPU inference, and Human-on-the-Loop remediation sequence with real execution timings.
Stage 1 • Scout
39 ms
TelemetryScoutAgent queries Jaeger and extracts anomalous spans.
Stage 2 • MCP Analyst
~1.5 s warm
latency-analyst-mcp (:8092) diagnoses root cause on Jetson Orin GPU (12,411 ms cold model load).
Stage 3 • HITL Gate
< 1 ms
PolicyGatekeeperAgent pauses execution until an operator approves in the UI.
Stage 4 • MCP Executor
157 ms
remediation-executor-mcp (:8093) opens the circuit breaker on timeapi.

4. Architectural Deep Dive

What Agent Registry Is Used?

The platform runs the Official Model Context Protocol (MCP) Registry (modelcontextprotocol/registry on :8090) backed by PostgreSQL (:5433). On startup, each Spring Boot MCP agent (:8091, :8092, :8093) obtains a registry token via POST /v0/auth/none, validates its manifest against the 2025-12-11 MCP schema, and registers via POST /v0/publish. Custom routing metadata—role (ANALYST or EXECUTOR), toolName, matchKeywords, allowedActions, priority, and internalSseUrl—is stored inside _meta["io.modelcontextprotocol.registry/publisher-provided"].

How Do Jaeger and Milvus Fit Into the Architecture?

  • Jaeger (:16686) — Real-Time Anomaly Detection: Monitored applications export OpenTelemetry spans to Jaeger. During a scan, TelemetryScoutAgent fetches spans exceeding the app's sloMaxLatencyMs threshold or carrying error=true, attaching each segment (operationName, durationMs, hasError, and clickable traceId) directly to the incident card.
  • Milvus (:19530) — Context-Aware Runbook RAG: Operators upload runbooks or remediation policies in the UI (+ Upload Criteria (Milvus)). CriteriaKnowledgeService embeds the rules via nomic-embed-text on the Jetson Orin GPU and stores them in Milvus. Before calling a remote MCP analyst, the orchestrator retrieves the top matching runbook rules via vector similarity search so the LLM's recommendation respects service-specific constraints.

Where Are Jaeger Traces & Metrics Stored?

In the local Docker Compose stack, Jaeger runs as jaegertracing/all-in-one, storing trace spans in memory for fast, zero-setup local testing (traces clear when the container restarts). For persistent storage in production, switching Jaeger's SPAN_STORAGE_TYPE environment variable moves trace storage to Badger (local disk volume), Elasticsearch / OpenSearch, or Cassandra with zero changes to instrumented applications.

How Do You Adjust an Application's SLO?

  1. Open the Operations Center at http://localhost:8085 and locate the service under Onboarded Spring Boot Apps.
  2. Click Edit SLO & Policy to open the policy modal.
  3. Update Latency SLO Threshold (ms) (sloMaxLatencyMs), Allowed Actions, Evaluation Criteria, or the Require Human-on-the-Loop Approval toggle, then click Save Policy & SLO (POST /api/governance/apps).
  4. Subsequent governance scans immediately evaluate Jaeger spans against the updated SLO threshold.

Can You Onboard C#, Node.js, or Python Web Apps?

Yes — the orchestrator is completely language-agnostic. Any C# (.NET ASP.NET Core), Node.js (Express / NestJS), Python (FastAPI), or Go web service can be monitored as long as it fulfills two lightweight contracts:

  1. Export OpenTelemetry Traces to Jaeger: Configure the standard OpenTelemetry SDK/auto-instrumentation for C#, Node.js, or Python to export OTLP traces to Jaeger (http://localhost:4317 or :4318) with service.name matching the onboarded app name.
  2. Expose a Remediation Webhook: Expose an HTTP POST endpoint (such as /api/admin/remediate) accepting {"action": "...", "component": "..."} to toggle circuit breakers, flush caches, or adjust rate limits.
// Example C# ASP.NET Core Minimal API Remediation Webhook
app.MapPost("/api/admin/remediate", (RemediationRequest req) =>
{
    if (req.Action == "OPEN_CIRCUIT_BREAKER") CircuitBreakerState.Open(req.Component);
    if (req.Action == "CLEAR_CACHE") MemoryCacheManager.Clear(req.Component);
    return Results.Ok(new { status = "APPLIED", component = req.Component, action = req.Action });
});
// Example Node.js Express Remediation Webhook
app.post('/api/admin/remediate', (req, res) => {
  const { action, component } = req.body;
  if (action === 'OPEN_CIRCUIT_BREAKER') circuitBreakers.open(component);
  if (action === 'CLEAR_CACHE') caches.flush(component);
  res.json({ status: 'APPLIED', component, action });
});

5. Source Code Repository

Explore the full source code, Docker Compose manifests, and standalone MCP agent implementations on GitHub:
https://github.com/htotapally/aiops-governance-orchestrator.git

Sunday, November 22, 2026

From Distributed Traces to GPU-Accelerated AIOps: Building a Plug-and-Play Governance Operations Center (Part 2)

Plug-and-Play AIOps Governance: Building a Human-on-the-Loop Operations Center (Part 2)

How dynamic Spring AI routing agents, Milvus RAG evaluation criteria, and an 8 GB NVIDIA Jetson Orin Nano turn raw OpenTelemetry traces into governed, auditable incident response—with zero hand-written code.

Transparency Disclaimer: Every single line of Java, SQL, YAML, Dockerfile, and frontend code referenced in this series was entirely generated by Google AI—I did not write a single line of code myself. My role was strictly that of the systems architect: designing the topology, wiring the containers across a hybrid hardware setup, testing edge cases, and diagnosing bottlenecks. You can explore the complete source code on GitHub:

1. Recap: Why Governance Matters Beyond Auto-Remediation

In Part 1, we split workloads across a 64 GB Windows Docker Desktop host and an 8 GB NVIDIA Jetson Orin Nano GPU node (192.168.1.171:11434 running qwen2.5:3b and nomic-embed-text). When Jaeger captured a 1,024 ms trace (459eed2edf029bfc8a36ac609145caf1) breaching our 800 ms SLO, jaeger-aiops-guardian pinpointed timeapi.io and tripped its circuit breaker—dropping tail latency from 386 ms to < 5 ms via deterministic java.time.ZoneId fallback.

However, blindly auto-remediating every anomaly does not scale to production fleets. Different Spring Boot microservices have different SLO thresholds, runbook rules, and risk tolerances—and hardcoded if/else orchestrators quickly become brittle.

In Part 2, we built aiops-governance-orchestrator (:8085) from scratch around four core principles:

  • Easy Application Onboarding: Register any Spring Boot service via YAML or the Web UI with custom SLOs, allowed actions, and approval policies.
  • Per-App Evaluation Criteria in Milvus RAG: Upload Markdown, text, or JSON runbooks embedded via nomic-embed-text so each app is evaluated against its own operational rules.
  • Dual Plug-and-Play Routing Patterns: Dynamic specialist selection for both Runbook Analysts and Remediation Executors using Spring's @Order bean discovery.
  • Human-on-the-Loop (HITL) Operations Center: A lightweight Tailwind + Alpine.js web console at http://localhost:8085 that pauses high-impact actions for operator sign-off while recording a complete agentTimeline.

2. Hybrid Architecture & Dual Routing Patterns

Rather than wiring brittle point-to-point calls between agents, every specialist reads from and appends its structured findings to an immutable IncidentCase shared blackboard. TelemetryScoutAgent inspects OpenTelemetry spans from Jaeger and dynamically routes the incident through two plug-and-play Spring component registries:

  • Routing Pattern #1 (RunbookAnalystAgent): Evaluates incoming SpanSignal lists in @Order priority—dispatching security-sensitive paths to SecurityAnomalyAnalystAgent (@Order(5)), HTTP 5xx/exception traces to ErrorRunbookAnalyst (@Order(10)), and pure latency breaches to LatencyRunbookAnalyst (@Order(20)).
  • Routing Pattern #2 (RemediationAgent): Once PolicyGatekeeperAgent (or a human operator) approves the recommended action, the orchestrator dynamically selects the matching executor (CircuitBreakerRemediationAgent or CacheWarmupRemediationAgent).
Part 2 Architecture: Plug-and-Play AIOps Governance Orchestrator
Figure 1: Hybrid 64 GB Host + 8 GB NVIDIA Jetson Orin Nano architecture for aiops-governance-orchestrator (:8085), featuring dual plug-and-play routing registries, Milvus RAG criteria storage, PostgreSQL state, and an optional Bifrost AI Gateway (:18080).

3. Per-App Evaluation Criteria with Milvus RAG

To ensure each onboarded Spring Boot application is judged by its own operational runbooks rather than generic prompts, CriteriaKnowledgeService chunks uploaded runbook documents, embeds them into 768-dimensional vectors using nomic-embed-text on the Jetson Orin GPU, and stores them in Milvus (governance_criteria_rag) tagged with appName.

# Upload per-app evaluation criteria into Milvus via Jetson Orin (nomic-embed-text)
$runbook = @{
    source = "geo-time-slo-runbook.md"
    content = "Rule 1: If nominatim lookup-location spans exceed 400ms, recommend CLEAR_CACHE on nominatim.`n`nRule 2: If timeapi get-time-zone spans exceed 800ms or fail with HTTP 5xx, recommend OPEN_CIRCUIT_BREAKER on timeapi."
} | ConvertTo-Json

Invoke-RestMethod -Method Post -Uri "http://localhost:8085/api/governance/apps/geo-time-mcp-server/criteria" -ContentType "application/json" -Body $runbook

During every scan, the selected analyst queries Milvus filtered strictly by appName == policy.getAppName(), retrieving the exact runbook rules before invoking qwen2.5:3b for structured root-cause diagnosis.

4. Proving Zero-Touch Extensibility: Adding a 20-Line Security Agent

The true test of a plug-and-play architecture is adding a brand-new capability without modifying a single line of existing orchestrator code. To prove this, we dropped SecurityAnomalyAnalystAgent into the agent package at @Order(5)—giving it higher priority than both error and latency analysts whenever a Jaeger span touches an /admin or /auth path:

@Component
@Order(5) // Highest priority: evaluated before ErrorRunbookAnalyst (@Order 10) and LatencyRunbookAnalyst (@Order 20)
public class SecurityAnomalyAnalystAgent implements RunbookAnalystAgent {

    private final ChatClient chatClient;
    private final CriteriaKnowledgeService criteriaKnowledgeService;

    private record LlmDiagnosis(String severity, String summary, String rootCauseComponent, String recommendedAction) {}

    public SecurityAnomalyAnalystAgent(ChatClient.Builder builder, CriteriaKnowledgeService criteriaKnowledgeService) {
        this.chatClient = builder.build();
        this.criteriaKnowledgeService = criteriaKnowledgeService;
    }

    @Override
    public String analystType() { return "SecurityAnomalyAnalystAgent"; }

    @Override
    public boolean supports(List<SpanSignal> signals) {
        return signals.stream().anyMatch(s ->
            s.operationName().toLowerCase().contains("admin")
            || s.operationName().toLowerCase().contains("auth")
            || s.operationName().toLowerCase().contains("forbidden")
        );
    }

    @Override
    public IncidentCase analyze(AppPolicy policy, List<SpanSignal> signals) {
        String criteria = criteriaKnowledgeService.retrieveAppCriteria(
            policy.getAppName(), signals.toString(), policy.getEvaluationCriteria()
        );
        LlmDiagnosis d = chatClient.prompt()
            .user("Security Analyst for " + policy.getAppName() + ". Criteria:\n" + criteria
                + "\nSet rootCauseComponent to timeapi or nominatim. Pick action from " + policy.getAllowedActions()
                + ". Spans: " + signals)
            .call()
            .entity(LlmDiagnosis.class);

        return IncidentCase.detected(policy.getAppName(), signals)
            .withAnalysis(analystType(), d.severity(), d.summary(), d.rootCauseComponent(), d.recommendedAction());
    }
}

After rebuilding the container and triggering a request to POST /api/admin/remediate, TelemetryScoutAgent captured the http post /api/admin/remediate span (traceId: a0fef50d73d4990aab6f1945a75047c7) and automatically routed it to SecurityAnomalyAnalystAgent:

PowerShell scan output showing SecurityAnomalyAnalystAgent in agentTimeline
Figure 2: Live governance scan JSON confirming TelemetryScoutAgent detected http post /api/admin/remediate, dynamically selected SecurityAnomalyAnalystAgent, and paused at PolicyGatekeeperAgent for operator sign-off.
Zero-Touch Result: Adding SecurityAnomalyAnalystAgent required zero edits to TelemetryScoutAgent, PolicyGatekeeperAgent, GovernancePipelineService, or the frontend UI. Spring's dependency injection automatically discovered the new @Order(5) bean and placed it at the front of the routing chain.

5. Human-on-the-Loop Operations Center in Action

Opening http://localhost:8085 brings the entire governance loop into a single dark-mode dashboard. Operators can inspect all active plug-and-play agents, onboard new Spring Boot applications, upload Milvus criteria files, and review the full four-step agentTimeline before clicking Approve & Execute Remediation:

AIOps Governance Operations Center UI showing INC-0A340B71 approved and remediated
Figure 3: The AIOps Governance Operations Center (:8085) after approving incident INC-0A340B71—displaying the complete handoff from TelemetryScoutAgent → SecurityAnomalyAnalystAgent → PolicyGatekeeperAgent → CircuitBreakerRemediationAgent (REMEDIATED).

6. Looking Ahead (Part 3): Evolving Toward an External Registry

In Part 2, keeping the application and agent registry inside aiops-governance-orchestrator gave us rapid iteration and tight integration with Spring's @Order lifecycle. As the platform scales across multiple teams and production replicas, externalizing the registry is the natural next architectural phase:

Evolution Phase Architecture Pattern Key Capabilities Unlocked
Phase 1 (Part 2) In-App Registry + Spring @Order Beans Single-node deployment, zero-friction local testing, in-process specialist routing.
Phase 2 (Persistence) Externalized Policy Store (PostgreSQL :5433) Persists onboarded apps, SLOs, and IncidentCase audit logs across container restarts and replicas.
Phase 3 (Federation) External Agent & MCP Control Plane (PostgreSQL + Bifrost :18080) Standalone specialist agents self-register over HTTP/MCP while Bifrost centralizes LLM & MCP tool governance.

From Distributed Traces to GPU-Accelerated AIOps: Building a Self-Healing Microservice Architecture (Part 1)

From Distributed Traces to GPU-Accelerated AIOps: Building a Self-Healing Microservice Architecture (Part 1)
Part 1 of 2 Java 21 & Spring AI MCP Jetson Orin Nano GPU

From Distributed Traces to GPU-Accelerated AIOps: Building a Self-Healing Microservice Architecture (Part 1)

Transparency Disclaimer & Source Repositories

Every single line of Java, SQL, YAML, Dockerfile, and frontend code referenced in this series was entirely generated by Google AI—I did not write a single line of code myself. My role was strictly that of the systems architect: designing the topology, wiring the containers across a hybrid hardware setup, testing edge cases, and diagnosing bottlenecks. Explore the complete source code on GitHub:

Modern microservice architectures give engineering teams remarkable agility, but they also turn everyday latency spikes into distributed puzzles. When a downstream third-party API slows down, log lines rarely tell the whole story—instead, delays cascade across virtual threads, database checkpoints, and user-facing Service Level Objectives (SLOs).

In this two-part series, we explore how to move from passive observability to governed, AI-driven incident response:

  • Part 1 (This Post): Instrumenting a hybrid neuro-symbolic Spring Boot service with OpenTelemetry and Jaeger, offloading local LLM and embedding inference to an NVIDIA Jetson Orin Nano GPU, and building an autonomous Model Context Protocol (MCP) guardian that detects SLO breaches and trips circuit breakers automatically.
  • Part 2 (Coming Next): Building a lightweight Security & AIOps Operations Center from scratch—integrating semantic runbook retrieval via a Milvus RAG store and a Human-on-the-Loop approval console so operators can inspect evidence, approve remediations, and persist structured root-cause memories.

1. The Hybrid Hardware & Container Architecture

Rather than running heavy LLM weights on CPU alongside Docker containers, this architecture splits workloads across two nodes on the local network:

  1. Primary Host Laptop (64 GB RAM — Docker Desktop): Runs the containerized Spring Boot 3.4+ / Java 21 microservices, Jaeger (OTLP collector and trace query API), PostgreSQL (stateful Human-in-the-Loop checkpoints), and Milvus + Attu (vector storage for semantic city-alias resolution and incident runbooks).
  2. Dedicated GPU Inference Node (NVIDIA Jetson Orin Nano — 8 GB Unified RAM): Runs Ollama (dustynv/ollama with CUDA 12.6) at 100% GPU offload, serving qwen2.5:3b (2.9 GB VRAM) for structured root-cause diagnosis and nomic-embed-text (768-dimensional vectors) for semantic retrieval.
Distributed Hybrid AIOps Infrastructure Diagram showing 64GB Windows Host Laptop and 8GB NVIDIA Jetson Orin Nano GPU Node
Figure 1: Distributed Hybrid AIOps Topology — Containerized Spring Boot MCP servers, Milvus, PostgreSQL, and Jaeger on a 64 GB host paired with 100% CUDA GPU inference on an 8 GB NVIDIA Jetson Orin Nano.

2. How the Telemetry & Remediation Loop Works

Step A: Hybrid Neuro-Symbolic Execution (geo-time-mcp-server, :8083)

The monitored application (geo-time-adaptive-agent) resolves U.S. city queries into verified local times and geographic coordinates. Instead of routing every request through a slow chat loop, it uses a deterministic fast-path in Java 21 virtual threads—falling back to Milvus semantic search (nomic-embed-text) for colloquial city aliases (like "The Big Apple") and PostgreSQL HITL checkpoints when city names are ambiguous (like "Springfield").

Every inbound request and downstream external HTTP call (nominatim.openstreetmap.org and timeapi.io) is instrumented with OpenTelemetry and exported over OTLP (:4318) directly to Jaeger (:16686).

Step B: Catching a Real SLO Breach in Jaeger

Our operational SLO defines any /api/geo-time/query trace exceeding 800 ms as degraded. Below is the Jaeger span breakdown captured during testing (1.02s total duration across 12 spans):

Figure 2: Real Jaeger trace waterfall (459eed2edf029bfc8a36ac609145caf1) showing a 1,024 ms request breaching the 800 ms SLO due to combined external geocoding and time-zone API latency.

Looking at the span breakdown immediately isolates why the request crossed our 800 ms threshold:

  • Local Milvus + Jetson Embedding Lookup (resolve-city-alias → milvus query → embedding): Completed in just ~40 ms.
  • Upstream Geocoding (lookup-location): Took ~468 ms.
  • Downstream Time-Zone API (get-time-zone): Stretched out another ~386 ms at the tail end of the waterfall, pushing total end-to-end latency to 1,024 ms.

Step C: Autonomous Diagnosis & Remediation (jaeger-aiops-guardian, :8084)

Instead of waiting for a human engineer to manually click through Jaeger waterfalls at 2:00 AM, jaeger-aiops-guardian exposes Jaeger's trace API and service admin endpoints as Spring AI MCP tools (inspectServiceTraces and executeServiceRemediation):

  1. Trace Inspection: AutonomousFleetObserver queries Jaeger for traces exceeding 800 ms on geo-time-mcp-server.
  2. GPU Root-Cause Diagnosis: The slow spans are serialized and sent over the LAN to qwen2.5:3b running at 100% GPU on the Jetson Orin Nano, which identifies timeapi as the root-cause component and selects OPEN_CIRCUIT_BREAKER.
  3. Standardized Remediation: jaeger-aiops-guardian invokes POST /api/admin/remediate on geo-time-mcp-server, immediately tripping the circuit breaker:
Executed OPEN_CIRCUIT_BREAKER on geo-time-mcp-server (timeapi): {"status":"APPLIED","component":"timeapi","circuitOpen":true}
Outcome: Self-Healing Latency Recovery & Graceful Degradation

The moment OPEN_CIRCUIT_BREAKER flipped circuitOpen to true on timeapi, geo-time-mcp-server stopped blocking virtual threads on slow external HTTP calls to timeapi.io and switched seamlessly to deterministic local IANA timezone resolution (java.time.ZoneId):

Before Remediation
1,024 ms (SLO Breach)
timeapi.io Span
386 ms → < 5 ms
Post-Remediation Status
HEALTHY (< 800 ms SLO)
  • Zero User Disruption: End users continued receiving accurate, verified local time cards with zero failed requests.
  • Cascading Failure Prevention: Short-circuiting the degraded external dependency eliminated tail-latency amplification across concurrent virtual threads.
  • Closed-Loop Verification: Subsequent health scans by jaeger-aiops-guardian confirmed traces dropped back well below the 800 ms SLO threshold.

3. What's Next in Part 2: Building a Lightweight Security & AIOps Operations Center

Coming Up in Part 2

Blindly auto-remediating every anomaly works for safe, reversible actions like tripping a circuit breaker on a flaky external API—but high-impact changes require policy gates, institutional runbook knowledge, and human sign-off.

In Part 2, we will build a lightweight Security & AIOps Operations Center (:8085) from scratch to replace heavy, complex enterprise scaffolding with a transparent, self-hosted governance engine:

  • Semantic Runbook & Incident Memory (milvus-memory-broker, :8080): Grounding LLM recommendations in PDF operational manuals and past post-mortems stored in Milvus.
  • Policy-Driven Human-on-the-Loop Console (:8085): Pausing high-risk actions so an operator can review Jaeger spans, Milvus runbook citations, and Jetson GPU reasoning before clicking Approve or Reject.