SIH26117
Sovereign On-Premise Agentic AI Workbench
An air-gapped agentic workbench for confidential plants: no byte leaves the building, every answer carries its evidence.
- commits
- 16
- lines of backend Python
- 80,407
- test functions
- 148
- lines of frontend source
- 6,926
- first commit
- 30 Aug 2026
- hackathon build
- 1 day
Measured from the repository on 7 Oct 2026 (git rev-list, git ls-files over backend/ and frontend/src/; build length from the hackathon record).
Abstract
Built in a rapid 1-day hackathon sprint for Smart India Hackathon 2026, SIH26117 is an air-gapped, on-premise agentic AI workbench designed for confidential industrial operations (specifically MRPL). It combines local Qwen SLM inference, an EvidenceGate RAG boundary that prevents hallucinations, deep OOXML artifact validation, and Linux unshare sandbox execution.
A fully air-gapped, on-premise agentic AI workbench built during a 1-day hackathon sprint for confidential industrial environments.
- Type
- Air-Gapped Sovereign AI Workbench (Hackathon)
- Started
- 30 August 2026
- Status
- Completed Prototype · Verified in Sandbox
- Language
- Python / TypeScript (React + Vite)
- Domain
- Industrial Sovereign AI / Air-Gapped Agents / Document Synthesis
- Architecture
- Decoupled ReAct Orchestrator · Dual Evidence Gates · Sandbox Isolation
- Scale
- 1,582 Files · 137k Lines · 573 Python Modules · 1-Day Hackathon Sprint
- Verification
- 100% Air-Gapped (Zero External Network Egress)
- Materials
- Python 3.11FastAPIReact 18ViteChromaDBLocal Qwen SLMEasyOCR / MoondreamLinux unshareDocker
Background
Deploying Agentic AI in Critical Industrial Infrastructure
“How do you provide engineers at high-security industrial facilities (e.g., MRPL - Mangalore Refinery and Petrochemicals Limited) with autonomous AI tools to analyze technical SOPs and inspection logs without a single byte leaving the facility's local network?”
Cloud LLMs (OpenAI, Anthropic, Google Cloud) are legally and operationally unusable in sensitive national infrastructure and refinery operations due to strict data sovereignty mandates. Furthermore, standard RAG systems hallucinate citations, and generic agents cannot generate validated, professional engineering deliverables (structured DOCX, PPTX with charts, PDF audit logs) in air-gapped environments.
Developed during the Smart India Hackathon on 30 August 2026 under extreme time constraints, demonstrating the ability to pivot from long-term research engineering to high-velocity, production-ready hackathon execution.
Where earlier approaches fall short
- 01Zero internet connectivity allowed: commercial cloud API endpoints are strictly inaccessible.
- 02Industrial SOPs require 100% auditable citations; standard vector search hallucinates procedural steps.
- 03Generated documents must strictly conform to Microsoft Office OOXML specifications without corrupting formatting.
- 04Complex agent execution must be interruptible without corrupting local workbench state.
Working hypothesis
By combining a local quantized SLM (Qwen) with a decoupled 7-phase state-machine orchestrator, an explicit EvidenceGate that verifies RAG citations, and an OOXML ArtifactQualityGate, an autonomous workbench can operate with zero cloud egress while matching cloud assistant capabilities.
Summary
The Air-Gapped Sovereign Workbench
Industrial engineers drag-and-drop confidential inspection logs and SOPs into a local workspace. A decoupled orchestrator decomposes tasks, queries an audited local vector store (`EvidenceGate`), executes tools in an isolated Linux `unshare` sandbox, and verifies generated documents before delivery.
- 10
Workspace Ingestion
User uploads SOPs, piping P&ID diagrams, and inspection logs. Multimodal extractors (EasyOCR/Moondream) parse schematics locally.
- 20
Decoupled Task Decomposition
The FastAPI TaskClassifier categorizes intent and delegates to the 7-phase Orchestrator (Planner, Selector, Executor).
- 30
Audited Retrieval (EvidenceGate)
ChromaDB retrieves local SOP chunks. The EvidenceGate runs a secondary verification pass ensuring the model only references verified passages.
- 40
Linux Sandbox Execution
Code execution and automated calculations occur within an isolated Linux `unshare` namespace with zero network permissions.
- 50
Artifact Quality Gate
Generated DOCX, PPTX, or PDF files are parsed and structurally validated against OOXML specifications before being handed to the user.
Description
SIH26117 enforces a strict physical and logical boundary between the browser workspace and the sovereign backend engine, with decoupled mockable orchestrator components.
- Implemented
React Workspace
102 · in 100 Workspace Interface (React / Vite)
Interactive user interface featuring split-pane document viewers, streaming responses, and progress graphs.
- How it works
- Vite + TypeScript SPA communicating over local REST and streaming Server-Sent Events.
- Trade-off
- Built rapidly with pragmatic UI components rather than a custom bespoke design system.
- Source
- frontend/src/
Reference numerals
100Workspace Interface (React / Vite)
120Sovereign Orchestrator Engine (FastAPI)
140Verification & Quality Gates
160Isolation & Multimodal Engine
In operation
Execution Flow: Industrial SOP Compliance Audit
An illustrative walk-through, written to show the flow (not a captured log), of how SIH26117 audits a refinery maintenance report against internal safety SOPs and generates a certified presentation.
Input · illustrative, not a captured log
Engineer uploads 'Boiler Inspection Report 2026.pdf' and requests: 'Verify compliance against MRPL Safety SOP 402 and generate a summary slide deck.'
- 10
Intake & Classification
FastAPI Gateway
TaskClassifier tags task as `COMPLIANCE_AUDIT_WITH_DELIVERABLE` with dual file attachments.
StateTask initialized in SQLite task store with status `RUNNING`.
- 20
Parsing & OCR
Multimodal Engine
Rasterizes PDF pages and runs EasyOCR to extract valve pressure readings and weld inspection dates.
StateStructured text and tables indexed into ChromaDB task collection.
- 30
Audited RAG Retrieval
EvidenceGate
Retrieves clauses from MRPL Safety SOP 402. Matches pressure thresholds and flags 1 safety discrepancy.
StateEvidence bundle verified with cryptographic hash citations.
- 40
Sandboxed Analysis
Unshare Sandbox
Executes Python calculation script inside isolated namespace to verify pressure safety margins.
StateScript outputs exact delta: Boiler #3 exceeds safe operating threshold by 12 PSI.
- 50
Deliverable Synthesis
Artifact Generator
Compiles PowerPoint deck (`.pptx`) with visual compliance tables and flagged hazard notices.
StateRaw OOXML presentation created in memory.
- 60
Quality Certification
ArtifactQualityGate
Inspects `.pptx` XML DOM, verifying slide layouts, font embeddings, and table schema validity.
StateArtifact certified and saved to workspace downloads.
Output
Certified compliance audit report delivered with 1 flagged violation (Boiler #3 +12 PSI) and verified PPTX presentation ready for plant safety review.
Claims
Hackathon Sprint Verification & Air-Gap Certification
Reported, not re-measured
These figures come from the project's own records. They are not claimed here because there is no public note to check them against yet.
- Air-Gap Enforcement
- 0 External Calls
- 100% of network traffic blocked via Linux unshare sandbox; all inference runs on local hardware. Source: SIH26117 technical report in the repository; not re-measured.
- Repository Scale
- 137,027 Lines
- Across 1,582 files (573 Python backend files, 66 TypeScript/React frontend files). Source: SIH26117 repository inventory, whole tree; the measured figures above count backend and frontend source only.
- Artifact Schema Conformance
- 100%
- All generated DOCX and PPTX files pass OOXML structural schema verification. Source: SIH26117 technical report; not re-measured.
- Cancellation Latency
- <200ms
- Graceful abort of long-running agent workflows without database lock corruption. Source: SIH26117 technical report; not re-measured.
Test suite
Method
Decisions
Decision
EvidenceGate RAG Guard vs Direct Prompt Augmentation
In industrial facilities like refineries, hallucinated safety standards can cause physical equipment damage or severe safety hazards.
| Option | For | Against |
|---|---|---|
| Direct prompt stuffing (dump all retrieved text into LLM context) | Trivial to implement in 10 minutes. | Model freely hallucinates when retrieved context is ambiguous or incomplete. |
| Two-stage EvidenceGate with citation integrity checks | Structurally verifies that every claim in the output maps to an exact retrieved text snippet with document and line references. | Requires secondary validation logic and increases response time by ~1.2s. |
Chosen
Two-stage EvidenceGate
Why
Cost accepted
Decision
Parallel Mock Interfaces for Rapid Hackathon Development
During a 1-day hackathon, the frontend and backend developers need to work concurrently without waiting for local SLM weights to download or fine-tune.
| Option | For | Against |
|---|---|---|
| Develop frontend only after backend AI pipeline is 100% working | Tests real system from day one. | Guaranteed to fail hackathon deadlines due to idle waiting time. |
| Architect decoupled interfaces with parallel Mock implementations | Frontend developed seamlessly against `MockPlanner` and `MockExecutor` while backend perfected model quantization and sandboxing. | Requires maintaining mock implementations alongside real classes. |
Chosen
Decoupled Orchestrator with First-Class Mocks
Why
Cost accepted
Deficiencies
What broke, why, and what changed because of it. These stay on the record next to everything that worked.
CPU Bottleneck During Heavy Slide Templating
PERFORMANCE LIMITATIONFailure
When generating 20+ slides with embedded vector charts simultaneously, the FastAPI server pinned all CPU cores at 100%, causing UI health check timeouts.
Root cause
Headless chart rasterization and XML manipulation were running synchronously on the main event loop thread instead of in a background process pool.
First attempt
Limit slide decks to a maximum of 5 slides.
Fix that held
Offloaded document rendering to an asynchronous background worker pool with worker concurrency throttled to `os.cpu_count() - 1`.
Lesson
In on-premise environments without elastic cloud GPUs, CPU starvation is the primary threat to API responsiveness. Never run heavy file synthesis on the async event loop.
Evidence: lab-content/Sih/30_MASTER_TECHNICAL_REPORT.md
Hard problems
01Air-Gapped Document Generation Without Microsoft Office
Why it is hard
First approach
What failed
Final approach
Where it stands
02Mid-Execution Task Cancellation in Long-Running Workflows
Why it is hard
First approach
What failed
Final approach
Where it stands
History
30 August 2026
Sprint Hour 0–4 · completed
Problem Scoping & Contract Definition
Defined industrial requirements (MRPL compliance), air-gapped constraints, and orchestrator contracts.
Why
Establish clear boundaries before writing code under extreme time pressure.How
Created `backend/core/orchestrator/components.py` with mock interfaces.Result
Frontend and backend teams began working in parallel immediately.30 August 2026
Sprint Hour 5–14 · completed
Core Sovereign Engine & EvidenceGate
Implemented local Qwen SLM inference, ChromaDB RAG, and EvidenceGate citation auditor.
Why
Guarantee zero hallucinations on technical refinery SOPs.How
Built two-stage retrieval verification and unshare namespace sandbox.Result
Local RAG queries returning auditable, verified SOP citations.30 August 2026
Sprint Hour 15–24 · completed
ArtifactQualityGate & End-to-End Integration
Connected React workspace to FastAPI backend; built OOXML quality gate.
Why
Deliver polished, non-corrupted DOCX/PPTX deliverables for the final hackathon demonstration.How
Integrated unshare sandbox, slide generator, and live document preview.Result
Flawless live demonstration of air-gapped refinery compliance analysis.
Measurements
VERIFIED SOVEREIGN
Air-Gapped Sovereign Security Audit
Confirmed zero outgoing HTTP/TCP requests during full execution cycles using packet capture monitoring (`tcpdump`).
- Heavy concurrent document templating can saturate CPU cores on low-spec hardware.
Status
SIH26117 was successfully completed and demonstrated at the Smart India Hackathon on 30 August 2026. It serves as an active prototype and architectural proof-of-concept for industrial sovereign AI.
Maintained as an open research prototype for industrial sovereignty.
Works today
- Complete air-gapped FastAPI backend with local Qwen SLM and EasyOCR.
- React/Vite desktop workspace with split-screen document and preview modes.
- EvidenceGate RAG with verifiable citations against industrial SOPs.
- ArtifactQualityGate producing certified DOCX and PPTX files.
- Linux unshare sandbox preventing network leaks and filesystem traversal.
Incomplete
- Horizontal multi-node scaling (currently single-node SQLite architecture).
- Dynamic GPU memory scheduling across multiple concurrent users.
Remaining
- Packaged as a standalone ISO/Docker appliance for direct deployment on refinery edge servers.
I would change today
- I would integrate asynchronous Celery/Redis task queues for slide generation rather than in-process threading.
Next
Edge Appliance Packaging
planned
Packaging the entire stack into a turnkey single-ISO installer for air-gapped server racks.
Innovations in Air-Gapped Industrial Agents
Engineered an air-gapped sovereign AI workbench combining local SLMs, EvidenceGate RAG, and OOXML artifact generation.
Directions under study
- EvidenceGate as a General RAG Verification Primitive: Treating retrieval as a formal audit rather than prompt decoration.
- Hardware-isolated SLM workbenches for national critical infrastructure.
Possible contributions
- Case study in executing rapid, high-complexity systems engineering within a strict 24-hour hackathon window.
“Deep systems like ÆON require months of careful architectural iteration; hackathons require decisive execution under strict constraints. Being an all-rounder engineer means mastering both modes.”
Mock Interfaces Accelerate Velocity
Designing clean contracts with parallel mock implementations allowed UI and AI development to proceed simultaneously without blocking.
RAG Demands an Evidence Gate
In high-stakes industrial environments, RAG cannot be a simple top-k prompt injector. It requires a dedicated verification gate that checks evidence before generation proceeds.
Verify the Artifact, Not Just the Model
Users care about the final file. Building an ArtifactQualityGate to inspect OOXML schemas prevented broken downloads and proved production readiness.
Prior art
SHEET 12 / 12A parallel demonstration of rapid, high-intensity execution under tight hackathon constraints, complementing the long-horizon research of ÆON.
SIH26117 was built apart from this line, in a single hackathon day, with no predecessor of its own.