Aegis-OS: Industrial Intelligence HUD by Gemini 2.5-Flash

Published: (January 31, 2026 at 10:50 AM EST)
2 min read
Source: Dev.to

Source: Dev.to

Demo & Repository

  • GitHub:
  • Live demo:

Click the demo to upload a P&ID diagram, query the manual database, or chat with the AI assistant.

Deployment to Google Cloud Run

gcloud run deploy aegis-os \
  --image gcr.io/qwiklabs-gcp-04-1def6ef2b7e7/aegis-os \
  --platform managed \
  --region us-east1 \
  --allow-unauthenticated \
  --port 8080 \
  --set-secrets="NEXT_PUBLIC_GEMINI_API_KEY=GEMINI_API_KEY:latest,NEXT_PUBLIC_RAG_API_KEY=RAG_API_KEY:latest" \
  --labels dev-tutorial=devnewyear2026

Deployment output

Deploying container to Cloud Run service [aegis-os] in project [qwiklabs-gcp-04-1def6ef2b7e7] region [us-east1]
✓ OK Deploying... Done.
  ✓ OK Creating Revision...
  ✓ OK Routing traffic...
  ✓ OK Setting IAM Policy...
Done.
Service [aegis-os] revision [aegis-os-00002-dft] has been deployed and is serving 100 percent of traffic.
Service URL: https://aegis-os-765925296978.us-east1.run.app

Deployment Components

  • Multi‑stage Dockerfile with Next.js standalone builds
  • Google Secret Manager for dual‑key API management (Gemini chat vs. RAG/Vision)
  • IAM role Secret Accessor configured for the service account
  • Container image: gcr.io/qwiklabs-gcp-04-1def6ef2b7e7/aegis-os

Note: The Cloud Run deployment runs on a Qwiklabs sandbox. Because Pakistani bank cards are not accepted for Google Cloud billing, permanent hosting requires additional verification. The Vercel embed above provides full functionality for demonstration purposes.

Core Features

  • P&ID Analysis – Upload engineering blueprints for instant component identification and risk assessment.
  • Manual RAG Search – Query thousands of pages of technical documentation in seconds.
  • 24/7 Industrial AI – Safety‑trained assistant for operational support.

Technical Stack

  • Frontend: Next.js 15 + TypeScript
  • Styling: Tailwind CSS + custom HUD animations
  • AI: Google Gemini 2.5‑Flash (Vision + RAG + Chat)
  • Deployment: Docker + Cloud Run + Secret Manager
  • Architecture: Dual‑key API with 5‑tier retry logic

Multimodal Capabilities

Vision Analysis

// JavaScript – Gemini Vision
const visionModel = genAI.getGenerativeModel({ model: "gemini-2.5-flash" });
const result = await visionModel.generateContent([
  { inlineData: { data: base64Image, mimeType: "image/png" } },
  { text: "Analyze this P&ID diagram..." }
]);

RAG Implementation

// JavaScript – Retrieval‑Augmented Generation
const ragModel = getGenAI('rag').getGenerativeModel({ model: "gemini-2.5-flash" });
const chunks = await vectorSearch(query);
const context = chunks.join('\n');
const response = await ragModel.generateContent([
  `Context: ${context}`,
  `Query: ${query}`
]);

API Resilience

Designed for continuous industrial uptime with:

  • Dual‑key isolation (separate keys for chat vs. RAG/Vision)
  • Smart retry using exponential backoff
  • Quota detection for daily vs. minute limits
// JavaScript – Quota‑aware retry logic
const isDailyLimit = errorMessage.includes("PerDay");
if (isDailyLimit) {
  throw new Error("GEMINI_DAILY_LIMIT: Quota exhausted for 24h.");
}
const delay = extractWaitTime(error) || (5000 * Math.pow(2, attempt));

Industrial HUD Aesthetic

  • Tactical polygon borders
  • Biometric scan‑line animations
  • SVG noise‑grain overlay
  • RGB glitch effects

These visual cues are optimized for low‑light plant floors and help operators focus on critical information.

Learnings & Reusable Patterns

  • API quota management: skills/gemini-resilience.md
  • HUD component library: skills/industrial-hud-design.md
  • Recovery protocols: .agent/workflows/gemini-quota-recovery.md

Hashtags: #GoogleAIChallenge #GeminiAI #BuildWithAI #Industry40 #NextJS #CloudRun

Back to Blog

Related posts

Read more »

New Site For The Old Minimalist

Overview I’m a developer who believes that the ability to build whatever you can imagine is one of the greatest privileges in the world. For me, development is...