Skip to content

Repository files navigation

Sthala

Your AI's place.

Most AI deployments let LLMs touch everything — computation, decisions, execution. That's the failure mode. Sthala is built on one hard constraint: LLMs narrate, code executes. Always. Enforced at build time.

An open-source reference framework for governed AI runtime placement on commodity x86 hardware. Airgapped by default. Built for SMBs, CA firms, clinics, schools — any organisation where data movement must stay under explicit boundary control.

"Sthala" (स्थल / ஸ்தலம்) — place, site, ground. Where your AI actually runs.


The Problem

Modern AI systems let interpretation, decision-making, and execution share one trust boundary. That lets probabilistic systems directly own deterministic consequences — the root cause of prompt injection, unsafe automation, context contamination, and authority confusion.

This project is part of the context-stack, which separates interpretation from authority: intelligence proposes, governance validates, execution authorizes. Intelligence can suggest anything. Authority stays deterministic.

Full doctrine: https://github.com/kannanokannan/context-stack


Why Sthala

  • Cloud AI is expensive — 3-year TCO cloud vs Sthala appliance: ~6× savings
  • Compliance is tightening — EU AI Act (Aug 2026), India DPDP Act (Stage 2: Nov 2026), MCA backup mandates
  • LLMs are commodities — the moat is the pipeline, not the model
  • Refurb hardware works — a ₹1.5L node serves 50–200 concurrent SMB users on 7B–34B models

Sthala is not a product. It is a documented pattern. Read it, fork it, deploy it, adapt it.


Family

Project Role
ContextOps How to govern AI context
ContextBoundary Where AI context can flow
Sthala Where AI actually runs

What You Get

Boot a commodity PC → drop your data → get AI-powered analysis
Nothing crosses the approved boundary unless you explicitly approve it
  • Immutable Linux base (no drift, atomic updates)
  • Sarvam-30B default (Apache 2.0, Indic-optimised, 24GB VRAM Q6_K)
  • Multi-model verifier pipeline (LLM extracts → code computes → LLM narrates)
  • Egress consent gateway (you see what leaves, you approve every send)
  • Vertical recipes: CA firm, distributor, school, clinic

Quick Start

curl -fsSL https://raw.githubusercontent.com/kannanokannan/sthala/main/install.sh | bash

Or with a profile:

curl -fsSL .../install.sh | bash -s -- --profile ca-firm

Repository Structure

sthala/
├── SPEC.md                    ← Framework specification
├── AGENTS.md                  ← Machine-readable build contract for AI coding agents
├── CLAUDE.md                  ← Context file for Claude / AI assistants
├── CONTRIBUTING.md            ← Contribution guide
├── install.sh                 ← Idempotent bootstrap script
├── profiles/                  ← Vertical presets
│   ├── generic.yaml
│   ├── accounting-firm.yaml
│   ├── clinic.yaml
│   ├── distributor.yaml
│   └── school.yaml
├── hardware/
│   └── detect.sh              ← Auto-detect CPU/GPU/RAM, recommend tier
├── stack/
│   ├── docker-compose.yml     ← Full service stack
│   ├── inference/             ← Inference services
│   ├── ingestion/             ← Ingestion services
│   ├── observability/         ← Metrics and tracing
│   └── rag/                   ← Retrieval services
├── recipes/
│   ├── _template/             ← Six-stage recipe template
│   ├── in/                    ← India recipes
│   ├── eu/                    ← EU recipes
│   ├── us/                    ← US recipes
│   └── global/                ← Global recipes
├── research/
│   ├── 2026-05-market.md      ← India SMB AI market research
│   └── 2026-05-standards.md   ← Standards & academic landscape
└── docs/
    ├── architecture.md        ← Architecture deep-dive
    ├── compliance.md          ← Compliance notes
    ├── egress.md              ← Egress guidance
    ├── hardware.md            ← Hardware guidance
    └── models.md              ← Curated model catalog with HuggingFace links

Design Principles

  1. LLM-as-component, not LLM-as-magic — LLM extracts, code computes, LLM narrates
  2. Deterministic compute, fuzzy understanding — numbers never come from an LLM
  3. Egress-by-consent — nothing leaves without explicit human approval
  4. Commodity hardware first — if it needs a $30K GPU, it's out of scope
  5. Vertical recipes over generic stacks — a CA firm is not a chatbot

Standards Alignment

  • NIST AI RMF 1.0 + GenAI Profile
  • ISO/IEC 42001 (AI management systems)
  • EU AI Act (non-high-risk tier by default)
  • India DPDP Act 2023 compliance posture
  • 16-Factor App for AI (Google, 2024)
  • OpenTelemetry GenAI semantic conventions
  • CycloneDX 1.7 AI BOM auto-generated

License

Apache 2.0 — use it, fork it, ship it, build on it.


Author

Kannan Okannan — Chennai, India

Part of the ContextOps / ContextBoundary / Sthala open-source family.


Part of the Stack

This project is one of three sibling open-source projects under github.com/kannanokannan.

Project Question Repo
ContextOps How does an org govern its AI context? github.com/kannanokannan/ContextOps
ContextBoundary Where is data allowed to go? github.com/kannanokannan/ContextBoundary
Sthala Where does the AI actually run? github.com/kannanokannan/Sthala

Canonical terminology and cross-project decisions: context-stack

About

A reference framework for running AI on-premise on commodity x86 hardware.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages