Sovereign Institutional Infrastructure Stack — n8n + LiteLLM + Ollama + 30 MCPs. Tri-polar routing. Offline-capable. East Africa.
# AI-KungFU Sovereign Institutional Infrastructure (SII) Stack
> *Build open, portable, local-first digital institutions that allow ordinary people and communities to access capabilities that historically required governments, corporations, or wealthy elites.*
---
## What This Is
A production-grade, sovereignty-first AI infrastructure stack for East Africa.
Built to survive: power outages, export controls, API rate limits, vendor failures, and metered mobile data.
**Not a chatbot. Not an app. A reusable coordination system.**
```
Input → Structure → Retrieve → Reason → Verify → Act → Record → Improve
```
---
## 4-Tier Architecture
```
┌─────────────────────────────────────────────────────────┐
│ TIER 1: Context & Memory (Git + SQLite + Markdown) │
│ Sovereign, local-first, offline-readable │
├─────────────────────────────────────────────────────────┤
│ TIER 2: Orchestration (n8n + Redis + Postgres) │
│ Deterministic DAGs. Swarms for discovery only. │
├─────────────────────────────────────────────────────────┤
│ TIER 3: Intelligence (LiteLLM — Tri-Polar Routing) │
│ Western / Eastern / Sovereign. Switch via env var. │
├─────────────────────────────────────────────────────────┤
│ TIER 4: Delivery (WhatsApp / HTMX / SMS / USSD) │
│ Offline-first. This stack was designed for a specific constraint: communities must not be forced to choose between
> access to AI assistance and control of their own data.
The tri-polar routing model is not just about cost. It is about independence:
| Tier | Who Controls It | Data Exposure |
|------|-----------------|---------------|
| Western (Claude/Gemini) | US corporations | Aggregated, never raw personal data |
| Eastern (DeepSeek/Qwen) | Chinese providers | Aggregated, never raw personal data |
| **Sovereign (Ollama local)** | **The community** | **Zero — data never leaves the device** |
**The 72-hour offline test** is the sovereignty test: if the internet goes …