DEV Community

Khe Ai
Khe Ai Subscriber

Posted on

HuntOS: The Autonomous Enterprise Sentinel — A Production-Grade Agentic Swarm on the Next '26 Stack

Google Cloud NEXT '26 Challenge Submission

This is a submission for the Google Cloud NEXT Writing Challenge

What I Built

The era of vibe-coding fragile chatbot prototypes is over. Thanks to extensive research into the announcements at Google Cloud Next '26, I have combined the most impactful platform updates into one cohesive architecture. This project demonstrates the full Agentic Enterprise stack in action—systems that don't just chat, but take verified, physical business actions.

To pressure-test this new stack, I built HuntOS: an autonomous, cross-cloud security swarm.

HuntOS: The Autonomous Enterprise Sentinel. Building the First Production-Grade Agentic Swarm on the Next '26 Stack

HuntOS is an Agent-to-Agent (A2A) workforce designed to hunt anomalies across disconnected environments. It ingests messy unstructured "dark data" (like AWS S3 logs), cross-references anomalies against a secure Spanner Graph, and orchestrates a swarm of Gemini 3.1 Pro agents to draft, critique, and deploy Terraform remediation scripts. All with zero human intervention and enterprise-grade egress security.

The Next '26 Equation:
(Cross-Cloud Lakehouse × Knowledge Catalog) + MCP Server + (A2A Swarm @ TPU v8i) + (Agent Gateway + Model Armor) + Vertex AI Memory Bank = Production-Ready Agentic OS

💡 For the Enterprise CISO: Currently, remediating a cross-cloud leak takes hours of human investigation, Jira tickets, and manual Terraform patching. HuntOS reduces Time-To-Remediate (TTR) from hours to under 3 seconds—without requiring you to move your raw AWS logs into Google Cloud, and without exposing your database credentials directly to an LLM.

Demo & Code

Source Code:

HuntOS: The Autonomous Enterprise Sentinel

HuntOS-Banner

HuntOS is an autonomous, cross-cloud security swarm built to demonstrate the full Agentic Enterprise stack announced at Google Cloud Next '26.

It transitions from simple "fragile chatbot prototypes" to "Agentic AI" by detecting anomalies in "dark data" (messy AWS S3 logs), verifying them via a secure Spanner Graph, and orchestrating a swarm of Gemini 3.1 Pro agents to draft, critique, and deploy Terraform remediation scripts. All with zero human intervention and enterprise-grade egress security.

The Next '26 Mega-Product Equation (Cross-Cloud Lakehouse × Knowledge Catalog) + MCP Server + (A2A Swarm @ TPU v8i) + (Agent Gateway + Model Armor) + Vertex AI Memory Bank = Production-Ready Agentic OS

🚦 Architectural Breakdown Matrix

System Requirement Next '26 Execution Method Primary Technology Function (The Sentinel Value)
Data Gravity / Ingestion Cross-Cloud Connectivity Cross-Cloud Lakehouse & Knowledge Catalog Indexes unstructured "dark data" (PDFs/Logs) in-place across AWS and GCP

The Architecture: Reversing the Prototype Trap

To win in modern infrastructure, you have to architect for the system, not just the AI. AI cannot verify your identity or configure cross-cloud IAM roles. You must lay the physical groundwork first.

Here is the architectural breakdown of how I wired the Next '26 stack together:

huntos-dashboard

huntos-view-fix

1. Conquering Data Gravity: Cross-Cloud Lakehouse

The biggest friction in enterprise AI is moving data. Instead of paying massive egress fees to pull AWS S3 security logs into GCP, HuntOS utilizes the new Cross-Cloud Lakehouse. By leveraging Cross-Cloud Interconnect (CCI) combined with bi-directional federation via the Apache Iceberg REST Catalog, the system indexes the logs in place.

The Vertex AI Knowledge Catalog sits on top, allowing our agents to read these "dark data" PDFs as if they were local, low-latency files.

2. Zero-Trust Data Access: The MCP Bridge

AI agents need database access to verify threats, but handing raw SQL credentials to an LLM is a massive security risk. HuntOS implements the breakout open-source standard: the Model Context Protocol (MCP).

I deployed an MCP bridge pointing to a newly provisioned Spanner Graph database (hunter-os-db). This creates a secure, abstracted interface so the agent can query the blast radius between flagged anomalies and impacted microservices without ever seeing the raw schema or connection strings.

3. The Autonomous Swarm & The "Skeptic Loop"

The core logic was generated using Google AI Studio leveraging the new A2A Protocol. HuntOS is not one monolithic prompt; it is a delegated hierarchy:

  1. Manager Agent: Flags the AWS log anomaly using the Knowledge Catalog tool.
  2. Researcher Agent: Queries the Spanner Graph via MCP to map the blast radius.
  3. Architect Agent: Drafts the raw Terraform remediation script.
  4. Red Team "Skeptic" Agent: A dedicated critique loop. Before finalizing code, this agent aggressively scans the Architect's output to eliminate hallucinations and fix downtime risks.

Here is a look under the hood at how the Skeptic Loop enforces code safety in my Next.js API route:

// 1. Architect drafts the raw Terraform based on Spanner Graph verification
const architectPrompt = `Context: ${JSON.stringify(verification)} Draft Terraform remediation.`;
const draft = await ai.models.generateContent({
    model: 'gemini-3.1-pro',
    contents: architectPrompt
});

// 2. The Skeptic Loop - Red Team critiques for downtime risks before returning
const skepticPrompt = `Critique this Terraform for production downtime risks or race conditions. Rewrite safely: ${draft.text}`;
const finalRevision = await ai.models.generateContent({
    model: 'gemini-3.1-pro',
    contents: skepticPrompt
});

return finalRevision.text; // Only the verified code is passed to the Gateway
Enter fullscreen mode Exit fullscreen mode

4. Institutional Memory via Semantic Grounding

To ensure the Architect Agent doesn't write generic, tutorial-level code, I grounded the swarm using the Vertex AI Memory Bank.

Memory Bank doesn't just act as a static file drive. It utilizes an LLM-driven background process to extract, compress, and consolidate facts into a long-term knowledge graph. By uploading my company's official security guidelines alongside my own GitHub repositories, the agent uses semantic search to retrieve my specific "Pragmatic Developer" preferences. It writes like me, preventing context-window bloat.

5. Hardware & Edge Egress Security

To execute sub-100ms reasoning loops for the "Red Team" simulations, the swarm is routed through the TPU v8i architecture running on highly-optimized Google Axion Arm-based CPUs.

Finally, transition to production requires strict perimeter security. I wrapped the Cloud Run deployment in an Agent Gateway, configured with a strict Egress Model Armor template. For an autonomous swarm executing live Terraform patches, strictly defining the Agent-to-Anywhere (Egress) guardrails is the ultimate safeguard. It sanitizes all outbound code, blocks prompt injections, and mathematically ensures no internal API keys are leaked during execution.

Overcoming Engineering Challenges

Building a genuinely autonomous system revealed a few hurdles:

  • The "Infinite Loop" Threat: Initially, A2A agents can get stuck endlessly debating a fix. Implementing strict token budgets and a definitive "Architect vs. Skeptic" hierarchy was necessary.
  • Resilient Infrastructure: Since MCP client connections to gcloud rely on local environment credentials, I had to architect graceful fallbacks in the Next.js route.ts. This ensures the dashboard remains highly available even if the backend MCP proxy temporarily disconnects.
  • React Hydration: Handling real-time agent telemetry in Next.js required careful useEffect management to prevent React hydration mismatches caused by split-second timestamp differences between the server and the browser.

Architectural Breakdown Matrix

For a quick reference of the Next '26 tools utilized in this build:

System Requirement Next '26 Solution Function (The Sentinel Value)
Data Gravity Cross-Cloud Lakehouse Indexes unstructured dark data (PDFs/Logs) in-place across AWS and GCP without costly data egress.
Secure Data Access MCP Server Abstracted interface for agents to query live databases without exposing raw credentials.
Relational Intelligence Spanner Graph (GQL) Maps complex relationships between anomalies and system dependencies to identify root causes.
Agent Swarm Logic A2A Protocol Orchestrates handoffs between specialized agents (Researcher → Architect → Skeptic).
Inference & Speed TPU v8i (Boardfly) Powers sub-100ms reasoning loops, allowing the Skeptic agent to run without stalling the pipeline.
Code Sanitization Gateway & Model Armor Automated egress filter to sanitize LLM-generated code and block prompt injections.
Visual Architecture Nano Banana 2 Enables the Architect to output Mermaid.js/PlantUML for executive-facing conceptual diagrams.
Institutional Memory Vertex AI Memory Bank Enforces corporate security standards and brand voice by grounding outputs in past successful patches.

The Payoff: Why This Matters

For this challenge, I wanted to showcase depth, usefulness, and genuine insight into where Cloud is heading.

We are no longer just wrapping LLMs in simple chat interfaces. By leaning entirely into the physical infrastructure and security announcements of Next '26—especially MCP, Spanner Graph, and Model Armor—HuntOS proves that the Agentic Enterprise isn't just a concept. It is ready to deploy today.

Top comments (0)