Skip to content
Swayambhu.ai

Swayambhu.ai

Sovereign AI that works inside your walls

Created on 11th October 2026

•

Swayambhu.ai

Swayambhu.ai

Sovereign AI that works inside your walls

The problem Swayambhu.ai solves

The Problem

India's defence labs, space agencies and refineries hold decades of technical knowledge, but engineers cannot easily find, reuse or trust it. The result is wasted effort, repeated work, and expertise that leaves when people retire.

  • Research duplication (DRDO): A Parliamentary Committee has flagged duplicated research across DRDO's 52 laboratories. With no shared searchable memory, the same work gets done and paid for twice.
  • Time lost to data processing (ISRO): ISRO's Chairman has publicly said scientists spend a large share of their time (60-70%) processing data rather than analysing it.
  • Slow records retrieval (HAL): Maintenance history for a single aircraft sits in paper logbooks and physical files across multiple locations, and retrieving it can take weeks.

Existing tools don't fit these environments. Cloud AI platforms need internet access and cannot be used with classified or sensitive data. Enterprise platforms like Palantir are costly and heavy to deploy. Generic AI chatbots can invent answers, which is unacceptable in engineering.

What Swayambhu.ai Does

Swayambhu.ai is a fully offline, India-built AI assistant that takes engineers from document to decision:

Upload → Extract → Calculate → Draft → Review

  • Search before you start: find existing work across uploaded documents and avoid duplication.
  • Ask your data: get answers in seconds, each cited to the source document, never invented.
  • Exact calculations: engineering formulas (e.g. NPSHa) run as deterministic, logged, auditable code, not AI guesses.
  • Scanned PDFs to approval notes: reads image-only inspection reports, extracts findings and drafts the note for human review.
  • Hindi and English support.

Why It Works Where Others Can't

Swayambhu.ai runs entirely on local hardware, with no cloud and no API keys. Today it works on a standard 8 GB RAM laptop with no GPU, so it can be deployed in air-gapped labs, plants and forward locations at a fraction of enterprise cost.

Built to scale: the same architecture moves from a laptop to dedicated GPUs and on-premise servers. Larger local models, faster processing and multi-user deployment need no redesign, only more hardware.

Responsible by Design

Swayambhu assists engineers; it does not replace their judgment. Every output is cited, calculations are auditable, and a human reviews and approves every result.

Tech stack: React, FastAPI, Ollama (local LLM inference), Qdrant (vector search), PostgreSQL, Linux namespace sandboxing.

Status: Working prototype, running today on an 8 GB laptop. Next step: pilots with partner organisations, then scaling to GPU servers for larger models and multi-user deployment. We will measure task time saved, reviewer corrections, and repeat usage..

Challenges we ran into

Challenges We Ran Into

1. RAM Crash — Vision Model Killed the Backend

What happened:

First live end-to-end test of our inspection flow.
User uploaded P101_inspection_report_scanned.pdf.
Agent started: vision_read step running.
Model finished reading the scanned PDF.
Agent moved to next step: draft_recommendation.
Backend died. Silent. No error. No traceback.

The operating system OOM killer fired.
Peak RAM had hit 7.9 GB on our 8 GB laptop.

The vision model qwen2.5vl:3b uses 3.2 GB.
It was still loaded when the smart model
qwen3:1.7b tried to load for the recommendation.
Combined with Chrome and VS Code running,
we had zero memory left.

How we fixed it:

We found that Ollama accepts a keep_alive
parameter on every inference request.
Setting it to "0" tells Ollama to evict
the model from RAM immediately after
the response completes.

We added this in vision_read.py:

python
result = await complete(
model_for("vision"),
messages,
keep_alive=get_settings().vision_keep_alive
)

And in config.py:

python
vision_keep_alive: str = "0"

We also added OLLAMA_MAX_LOADED_MODELS=1
to the Ollama start command as a hard limit.

After the fix, peak RAM dropped from 7.9 GB
to 6.8 GB. Vision model unloads. Smart model
loads. No crash. Flow 1 completed in 4 min 4 sec.

Commit: 8839c15


2. Air-Gap Badge Showed Red — Our Own Product

Was Not Air-Gapped

What happened:

We built the egress monitor to prove
zero external connections. Green badge = safe.
Red badge = data leaving the machine.

During testing with WiFi on, badge showed red.
Fine — WiFi was on.

We turned WiFi off. Badge still red.
16 external connections. From our own processes.

We checked the monitor code.
It was working correctly.
The connections were real.

Ollama 0.35.1 connects to Google Cloud servers
on every startup by default. Cloud features
are enabled unless explicitly disabled.

ConnectionInfo(
remote='34.36.133.15:443',
process='ollama',
internal=False
)

Our "sovereign, air-gapped" product was
phoning home every time it started.

How we fixed it:

One environment variable:

bash
OLLAMA_NO_CLOUD=1 ollama serve

We verified in Ollama's startup log:

"Ollama cloud disabled: true"

We also rewrote connections.py to scope
the monitor to Swayambhu's own process tree
only — uvicorn, ollama, qdrant, vite.
Chrome and VS Code make their own external
connections legitimately. Those should not
count against our air-gap status.

After the fix, badge reads:
"Air-gap: 0 external"
Stays green throughout the entire demo.
Verified with real TCP connection test.

Commit: 09f1d25


3. Python Sandbox Was Restarting Our Server

What happened:

Every time the agent ran a Python calculation
in the sandbox, Uvicorn restarted.

User would see:
Step 1: generate_code — running
Step 2: run_python — running
Connection dropped.

We spent two hours debugging.
Checked memory. Checked async code.
Checked the sandbox isolation.
Everything looked correct.

Then we looked at the Uvicorn logs:

WARNING: WatchFiles detected changes in
'storage/sandbox/ff544e0c2b52/main.py'. Reloading...

We were writing sandbox code files to:
backend/storage/sandbox/<uuid>/main.py

Uvicorn runs with --reload --reload-dir app.
It watches the backend folder for changes.
Every sandbox execution wrote a new file
inside that folder.
Uvicorn saw it as a source code change.
Server restarted. Stream died.
Every single time.

How we fixed it:

Move sandbox files outside the backend directory:

python

Before — inside watched directory

workdir = settings.sandbox_dir / new_id()

backend/storage/sandbox/abc123/main.py

After — outside watched directory

sandbox_dir = Path("/tmp/swayambhu_sandbox")
code_file = sandbox_dir / f"{uuid.uuid4().hex}.py"

/tmp/swayambhu_sandbox/abc123.py

Cleanup after each run:

python
finally:
try:
code_file.unlink()
except FileNotFoundError:
pass

After the fix, zero restarts.
Sandbox executes in 30ms.
Connection stays alive.
Confirmed by checking Uvicorn logs —
zero new WatchFiles entries after sandbox runs.

Commit: 8839c15


4. NPSH Calculator Returned -9.85 × 10²⁵ metres

What happened:

We asked our coder model qwen2.5-coder:1.5b
to calculate Net Positive Suction Head.

It generated Python code.
Sandbox ran it. Exit code 0.
Answer returned to user:

NPSH = -98502826086956525135331328.00 m

The model had invented its own formula.
It used Hagen-Poiseuille — a formula for
pipe pressure drop, not suction head.
Both involve fluid mechanics.
The application was completely wrong.

The correct answer for:
suction 101.3 kPa, vapour 2.3 kPa
is 10.09 metres.

We tried fixing the system prompt.
Added the correct formula with an example.
Reran the query.
Model ignored it. Returned a different
wrong formula. Different wrong answer.

A 1.5B parameter model cannot reliably
perform domain-specific arithmetic
even with the formula provided.

For a product used in operational refiner

Tracks Applied (1)

Best use of Agentic AI / Gen AI

How Swayambhu.ai fits "Best use of Agentic AI / Gen AI" Swayambhu.ai is a sovereign, air-gapped AI workbench for confid...Read More

Discussion

Builders also viewed

See more projects on Devfolio