Project guide

Project Guide | AegisOps

Free incident-replay checklist and operator handoff glossary for security operations readers. This guide organizes the repository's original implementation notes for security operations leads and incident commanders.

Reviewed 2026-07-28. This page is derived from checked-in repository evidence and links back to its source.

AegisOps -- Multimodal Incident Review System

AegisOps turns raw incident logs and monitoring screenshots into structured, decision-ready incident reports -- complete with severity classification, root-cause analysis, timeline reconstruction, and operator handoff artifacts. Every analysis claim is backed by a deterministic replay eval suite before the live model path is trusted.

Three-Minute Proof

  1. Open the Cloudflare demo or local UI and run one incident scenario.
  2. Inspect the replay eval suite before trusting live model output.
  3. Run npm run verify to cover typecheck, tests, replay evals, surface smoke, and build.
  4. Review export and handoff artifacts as operator-facing proof, not just the chat flow.

System Overview

LensCurrent answer
UsersSOC, IT operations, managed service, and incident-response teams that need clearer handoff after noisy incidents.
Technical pathValidate the demo, README, architecture notes, and quality gate before deeper workflow review.
System scopeMultimodal incident analysis, schema-conformant reports, replay evals, follow-up Q&A, and export paths.
Operating boundaryBrowser never receives provider keys; demo mode is deterministic and no-key by default.
Evaluation pathnpm run verify, live Cloudflare Pages demo, replay eval suite, and surface smoke script.

Evaluation Path

Architecture Notes

Live Demo

SurfaceLink
Cloudflare Pageshttps://aegisops-ai-incident-doctor.pages.dev
Google AI StudioOpen in AI Studio
Demo videoWatch on YouTube

---

Architecture

flowchart LR
    subgraph Intake ["1 - Intake"]
        Logs["Raw Logs"]
        Screenshots["Monitoring Screenshots"]
    end

    subgraph Analysis ["2 - Multimodal Analysis"]
        API["Express API\n(server-side key handling)"]
        Gemini["Gemini"]
        OpenAI["OpenAI"]
        Ollama["Ollama (local)"]
        Demo["Demo mode\n(no keys)"]
    end

    subgraph Output ["3 - Structured Output"]
        Report["Incident Report\n(JSON schema)"]
        Postmortem["Postmortem Pack\nSeverity + RCA + Timeline"]
        FollowUp["Follow-Up Q&A\n(grounded on report)"]
        TTS["Audio Briefing\n(TTS)"]
    end

    subgraph Eval ["4 - Replay Evals"]
        Suite["4 scenarios\n32 rubric checks"]
        Buckets["Failure Buckets\nby category"]
    end

    subgraph Handoff ["5 - Operator Handoff"]
        Export["JSON / Markdown\nSlack / Jira"]
        Workspace["Google Workspace\nDocs / Slides / Sheets\nCalendar / Chat"]
        Persist["GCS Artifacts\nBigQuery Analytics"]
    end

    Logs --> API
    Screenshots --> API
    API --> Gemini
    API --> OpenAI
    API --> Ollama
    API --> Demo
    Gemini --> Report
    OpenAI --> Report
    Ollama --> Report
    Demo --> Report
    Report --> Postmortem
    Report --> FollowUp
    Report --> TTS
    Report --> Suite
    Suite --> Buckets
    Report --> Export
    Report --> Workspace
    Report --> Persist

Key design principle: API keys never reach the browser. The React frontend calls /api/analyze, /api/followup, /api/tts -- the Express API reads provider keys server-side and returns validated, schema-conformant JSON.

---

Prerequisites

Run locally


## 1. Clone and install
git clone https://github.com/KIM3310/AegisOps.git
cd AegisOps
npm install


## 2. Configure (optional -- runs in demo mode without keys)
cp .env.example .env

## 3. Start both API and UI
npm run dev

## API: http://127.0.0.1:8787

If no API key is set, the system runs in demo mode -- deterministic output, no external calls, and the full replay eval suite still runs.

Verify the build

npm run verify   # typecheck + test + replay evals + surface smoke + build

---

Tech Stack

LayerTechnologyPurpose
FrontendReact 19, Vite 6, Lucide IconsIncident input, report rendering, operator dashboard
BackendExpress, Node.js 20+API routing, key management, payload validation
LLM ProvidersGemini (default), OpenAI, OllamaMultimodal incident analysis + follow-up Q&A
ValidationZod 4Request/response schema enforcement
LoggingPinoStructured JSON logging
Eval FrameworkCustom replay harness4 scenarios, 32 rubric checks, failure bucket aggregation
AuthBearer token + OIDC (RS256 JWT)Operator access control with role-based gating
PersistenceGCS + BigQuery (optional)Report artifacts + analytics rows
MonitoringPrometheus + Datadog (optional)HTTP metrics, analysis latency, provider usage
Cloud InfraTerraform (Cloud Run), Cloudflare PagesIaC deployment, static hosting
ContainersDocker, Kubernetes (HPA, Ingress)Production container orchestration
CI/CDGitHub ActionsTypecheck, test, replay proof, build, artifact upload
LanguageTypeScript 5.8 (strict mode)End-to-end type safety

---

Core API

EndpointMethodDescription
/api/analyzePOSTAnalyze logs + screenshots, return structured incident report
/api/followupPOSTFollow-up Q&A grounded on the generated report
/api/ttsPOSTText-to-speech audio briefing (Gemini TTS)
/api/evals/replaysGETReplay eval suite results (4 scenarios / 32 checks)
/api/live-sessionsGETPersisted incident session history
/api/metaGETRuntime modes, replay summary, operator checklist
/api/healthzGETDeployment mode, provider, limits
/api/summary-packGETInspectable trust surface with replay proof
/api/schema/reportGETIncident report JSON schema contract
/api/metricsGETPrometheus-format metrics

---

Incident Replay Evals

The replay eval suite validates report quality against fixed scenarios with a structured rubric before the live model path is trusted.

npm run eval:replays

Rubric categories

CategoryWhat it checks
severity_matchSeverity classification matches the expected level
title_keywordsTitle captures the dominant failure mode
tag_coverageOperational tags cover the main systems involved
timeline_coverageTimeline retains enough events for reconstruction
root_cause_coverageRoot causes name the failure mode, not just symptoms
actionabilityAction items are concrete and operator-facing
reasoning_traceReasoning preserves Observations, Hypotheses, Decision Path
confidence_rangeConfidence score stays within the rubric band

Current scenarios

ScenarioDescription
llm-latency-spikeSLO breach, queue saturation, memory pressure, autoscaling recovery
redis-oom-failoverRedis master OOM, quorum loss, cache miss storm during failover
payments-retry-storm5xx spike + retry fan-out and request queue growth
search-warning-buildupPre-outage warning with latency and queue buildup (no hard outage)

See docs/INCIDENT_REPLAY_EVALS.md for full documentation.

---

Local development

npm install && npm run dev

Cloudflare Pages

npm run build && wrangler pages deploy dist/

Docker / Cloud Run

docker build -t aegisops .
docker run -e GEMINI_API_KEY=<key> -e HOST=0.0.0.0 -p 8787:8787 aegisops

Terraform (GCP Cloud Run)

cd infra/terraform
terraform init
terraform plan -var="project_id=<your-project>" -var="image=<your-image>"
terraform apply

Kubernetes

Pre-built manifests in infra/k8s/ include Deployment, Service, HPA, Ingress, and ConfigMap.

Optional GCP persistence

Set GOOGLE_APPLICATION_CREDENTIALS + GCP_PROJECT_ID to persist incident artifacts to GCS and analytics rows to BigQuery.

---

Project Structure

AegisOps/
  App.tsx                    # React app root
  types.ts                   # Shared TypeScript types
  constants.ts               # Sample presets, review lenses
  components/                # React UI components (26 files)
  hooks/                     # React hooks (app state, auth, storage)
  services/                  # Frontend service clients (Google APIs, Gemini, export)
  server/
    index.ts                 # Express API server (~700 lines, 15+ routes)
    lib/
      gemini.ts              # Gemini provider (analyze, follow-up, TTS)
      openai.ts              # OpenAI provider (analyze, follow-up)
      ollama.ts              # Ollama provider (analyze, follow-up)
      demo.ts                # Deterministic demo mode
      replayEvals.ts         # Replay eval scoring and bucket aggregation
      schemas.ts             # Zod request validation schemas
      operatorAccess.ts      # Bearer + OIDC operator auth
      gcp-persistence.ts     # GCS artifact upload, BigQuery analytics
      prometheus.ts          # Prometheus metrics
      datadog-adapter.ts     # Datadog integration
      aws-adapter.ts         # AWS S3/SQS/CloudWatch integration
      ...
  evals/
    incidentReplays.ts       # 4 replay scenarios with expected rubrics
  __tests__/                 # 29 test files (Vitest)
  scripts/                   # CLI tools (replay runner, smoke tests, load tests)
  infra/
    terraform/               # GCP Cloud Run IaC
    k8s/                     # Kubernetes manifests
  docs/                      # Architecture docs, evidence, SVGs
  samples/                   # Sample logs, screenshots, resource packs
  .github/workflows/         # CI pipeline (test, build, artifact upload)

---

Testing

npm test                    # Unit tests (Vitest, 29 test files)
npm run typecheck           # TypeScript strict mode check
npm run eval:replays        # Replay eval suite (4 scenarios / 32 checks)
npm run architecture:smoke        # Review surface smoke tests
npm run verify              # All of the above + build

---

Environment Variables

See .env.example for the full list. Key variables:

VariableRequiredDescription
LLM_PROVIDERNoauto (default), gemini, openai, ollama, demo
GEMINI_API_KEYFor live modeGoogle Gemini API key
OPENAI_API_KEYFor OpenAI modeOpenAI API key
OLLAMA_BASE_URLFor local modeOllama server URL (default: http://127.0.0.1:11434)
GCP_PROJECT_IDFor persistenceGCP project for GCS + BigQuery
AEGISOPS_OPERATOR_TOKENFor authStatic operator bearer token
DD_API_KEYFor monitoringDatadog API key

---

Cloud + AI Architecture

Enterprise Productization

System Architecture

Service Architecture

Search And Service Surface