SYS-02 // DOCUMENTATION

How YantraOS Works

One README. Four pillars. Zero ambiguity. From bare metal to autonomous operation.

01 // THE PHILOSOPHY

“Yantra” — Sanskrit (यन्त्र)

A geometric instrument of divine computation. Used in Vedic cosmology to represent structured pathways through which consciousness operates on matter.

CONVENTIONAL MODEL
Human
Input
OS
Output
YANTRAOS MODEL
OS senses context
OS reasons over it
OS acts autonomously
Human observes & overrides
┌─────────────────────────────────────────────────┐
│ YOUR OS HAS BEEN PASSIVE FOR TOO LONG. │
│ │
│ Every traditional OS is a hammer — │
│ it waits to be swung. │
│ │
│ YantraOS is a mind. │
│ It reasons. It remembers. It acts. On its own. │
└─────────────────────────────────────────────────┘
02 // FOUR PILLARS

How it thinks. How it acts.

KARMA YOGI

The Autonomous Agent Runtime

YantraOS is not a Linux distro with AI bolted on. It is an inversion of the computing paradigm. The OS senses context, reasons over it, and acts — without waiting to be commanded. You are a principal. The OS is your agent.

# daemon starts on boot, thinks forever
systemctl status yantra.service
# → Active: active (running) since ...
# → Main PID: 1337 (yantra-daemon)
KRIYA LOOP

Five-Phase Cognitive Cycle

SENSE → REMEMBER → REASON → ACT → LEARN. The Kriya Loop is the heartbeat of YantraOS. It runs perpetually inside yantra.service. It never pauses. Every cycle is a cognitive event: telemetry in, ChromaDB retrieval, LiteLLM inference, Docker execution, vector embedding out.

# Watch the loop in real time
python3 -m core.tui_shell
# ┌─ TELEMETRY ─┬─ THOUGHTSTREAM ──────┬─ COMMAND ─┐
# │ CPU:  12%   │ [SENSE]  reading...  │           │
# │ RAM: 4.1GB  │ [REASON] planning... │  > _      │
# └─────────────┴──────────────────────┴───────────┘
DOCKER SANDBOX

Ephemeral Execution Layer

Every autonomous action executes inside a locked-down Alpine Docker container. No host mount. No network. No privilege. LLM output is never executed on the host directly — it passes through JSON schema validation, then into the sandbox, then through a whitelisted SSH gateway.

# Execution chain (simplified)
LLM_OUTPUT
  → JSON Schema Validation
  → Docker Alpine Container
  → Restricted Shell
  → SSH (whitelisted key)
  → Host Command Executor
HYBRID INFERENCE

LiteLLM Routing Engine

Hardware is not a barrier. YantraOS detects your hardware and routes inference to the optimal backend: Ollama for local GPUs with ≥8GB VRAM (ALPHA MODE), Gemini/Claude/GPT-4o via LiteLLM for edge hardware (EDGE MODE), or minimal offline models when network is unavailable (DARK MODE).

# In config.yaml — one setting, three modes
inference:
  local_model: llama3:70b       # ALPHA
  cloud_model: gemini-2.0-flash # EDGE
  fallback_model: phi3:mini     # DARK
  router: litellm               # always
03 // GETTING STARTED

From zero to autonomous.

PREREQUISITES
REQUIREMENTMINIMUMRECOMMENDED
RAM8 GB16 GB+
Storage50 GB100 GB (Btrfs)
GPUNoneNVIDIA RTX (Local)
NetworkAt bootAlways-on (Fleet)
BUILD THE ISO
archiso build pipeline
$git clone https://github.com/AIYantra/YantraOS.git
$cp host_secrets.env.template host_secrets.env
$$EDITOR host_secrets.env
$cd archlive && sudo bash compile_iso.sh
TEST IN QEMU
qemu — virtual boot
$qemu-system-x86_64 \ -m 4G -enable-kvm -cpu host \ -drive file=archlive/out/yantraos-*.iso,format=raw,if=virtio \ -nographic -serial mon:stdio
RUN IN DEV MODE
dev mode — two terminals required
$python3 -m venv .venv && source .venv/bin/activate
$pip install -r requirements.txt
$python3 -m core.daemon
$python3 -m core.tui_shell
04 // API REFERENCE

Web HUD API Routes

ROUTEMETHODDESCRIPTION
/api/healthGETTelemetry — Pinecone + model status
/api/kriya/executePOSTStreaming inference (Gemini 2.0 Flash)
/api/skills/searchGETRAG skill search via Pinecone
/api/skills/publishPOSTSkill ingestion (requires YANTRA_DAEMON_KEY)
/api/telemetry/heartbeatPOSTFleet node metrics ingestion
ENVIRONMENT VARIABLES (.env.local)
.env.local
PINECONE_API_KEY=
GOOGLE_GENERATIVE_AI_API_KEY=
NEXT_PUBLIC_SITE_URL=https://yantraos.com
YANTRA_DAEMON_KEY=
SUPABASE_URL=
SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=