Runs on a Raspberry Pi 5 in a township classroom. Survives load shedding. Teaches fractions in isiZulu. Reaches parents on WhatsApp and USSD feature phones. No student devices required. No data leaves the school.
A single Python/FastAPI process running on a Raspberry Pi 5 that orchestrates voice capture, AI tutoring, hash-chained academic records, and POPIA compliance โ with a Service Worker PWA for teachers, no internet required.
Asyncio event bus routing messages between agents in <3ms per hop. Latency tracking enforces the 3-second end-to-end response budget.
If Ollama crashes during load shedding, the tutor instantly falls back to deterministic Z3 SMT hints. The lesson never stops.
Monitors UPS HAT and EskomSePush API. Executes SQLite WAL checkpoint and graceful shutdown before data corrupts under power failure.
Enforces T0 / T1 / T2 data tiers at every API endpoint. Misconfigured access hits a hard 403. POPIA deletion drill completes in 0.01s.
Hash-chained, append-only SQLite event log. The permanent record of every tutoring session โ tamper-evident and fully replayable.
OpenCV bubble-sheet grader with QR anchors and perspective warp. Teacher photographs paper; system grades instantly at 100% accuracy.
Offline-capable PicoCSS Service Worker app. Class mastery heat maps, circuit breaker status, POPIA tools, and EWS early-warning flags.
Ingests messy SA-SAMS CSV exports, validates against the LURITS schema, and populates the school roster in seconds.
The tutor now reads actual DBE curriculum documents, tracks whether a student has truly mastered a concept or is still guessing, and auto-measures reading fluency to address the 81% Grade 4 reading crisis head-on.
Local vector database on the Pi. Ingests DBE Rainbow Workbooks and Siyavula textbooks via multilingual MiniLM embeddings. The tutor retrieves real curriculum paragraphs before generating any response.
Bayesian Knowledge Tracing computes p_mastery โ the probability a student genuinely understands a concept vs. is still guessing. Drives adaptive question selection and parent briefings.
Wires Whisper STT to calculate Words Correct Per Minute (WCPM) against a reference passage using difflib alignment. Automates what previously required trained assessors for every learner.
Flags learners showing BKT stagnation, WCPM decline, or attendance gaps. Integrates with the Teacher PWA dashboard as amber/red EWS chips โ visible at a glance across the entire class.
Three new channels extend SchoolOS beyond the classroom โ a WhatsApp gateway that briefs parents daily in isiZulu, a USSD menu that works on the cheapest feature phone with no data, and an offline mesh that syncs content between schools without any internet connection.
Turn.io inbound webhook with raw-body HMAC-SHA256 verification before any JSON parsing. Parents text "Report" or "Umbiko" to get their child's latest mastery and EGRA scores in isiZulu or English.
An asyncio scheduler fires at 17:00 every school day, generates a 2-sentence isiZulu teaching tip via Qwen3 (with a rotating static fallback pool for Ollama-down nights), and pushes it to every T0-consented parent.
Stateless Africa's Talking integration. The entire session history lives in
AT's accumulated text field โ no server memory needed.
Menus: Mastery ยท Hint (Z3-first) ยท EGRA WCPM ยท isiZulu help.
Generates a Syncthing config.xml with global announce, relay,
and cloud upgrade all disabled. Two school Pis on the same WiFi sync their
curriculum folders peer-to-peer without a single packet leaving the LAN.
A teacher inserts a USB drive containing schoolos_pack.zip.
The Pi verifies every file against a SHA-256 manifest before extraction,
rejects zip-traversal attacks, then re-ingests curriculum into Qdrant.
Exports a school's locally-created curriculum, Z3 templates, and anonymized aggregate telemetry into a signed zip for USB transfer or Syncthing distribution. No student SIDs, names, or timestamps included.
The system now goes beyond tutoring individual students. It anonymizes and clusters everything children have asked across all channels to surface the gap between what CAPS says they should learn and what they actually need to know. Principals and DBE officials see a real-time traffic-light health index โ zero PII, pure policy signal.
Two-layer PII redaction (SA ID, cells, "igama lami ngu X") then greedy cosine centroid clustering against CAPS topic embeddings. Queries with similarity < 0.45 to any CAPS topic are shadow curriculum โ things learners need that the system was never designed to teach.
A read-only aggregated view for principals and DBE officials. EGRA WCPM averages, BKT mastery distributions with per-template breakdowns, weekly engagement rates, and the top shadow curriculum gap clusters โ all fetched live from the Pi, zero PII in any response.
A composite Green / Amber / Red traffic light combining EGRA WCPM (target โฅ 45), BKT mastery rate (target โฅ 70%), and weekly engagement (target โฅ 60%) using a worst-of-three policy โ the most conservative signal for a system built to flag problems early.
Repository structure, CI hooks, eval harness, and deployment scripts. All phase-gate tests written before any implementation.
โ CompletePiBus event bus, SpeechAgent (Whisper.cpp), TutorAgent (Qwen3 + Z3), Piper TTS, POPIA 3-tier consent gate, hash-chained StudentLedger, OMR bubble-sheet grader, Teacher PWA, SA-SAMS importer, UPS watchdog.
โ CompleteQdrant local vector DB with curriculum ingestion, multilingual MiniLM embeddings, pyBKT mastery tracking, EGRA WCPM auto-scoring via Whisper, Early Warning System flags in the Teacher PWA.
โ CompleteTurn.io WhatsApp gateway (HMAC-SHA256, daily isiZulu briefings), Africa's Talking USSD (stateless, 160-char, Z3 hints on feature phones), Syncthing offline mesh (LAN-only P2P), USB sneakernet with SHA-256 manifest verification and zip-traversal protection.
โ CompleteShadow Curriculum Detector (greedy cosine clustering vs. CAPS topics, two-layer PII redaction, gap reports), District Dashboard (health index, mastery distribution, EGRA stats, shadow panel โ zero PII throughout), School Health Index (Green / Amber / Red, worst-of-three composite).
โ Complete โ 141 Tests PassingMulti-school Syncthing mesh with district aggregation. Federated shadow curriculum analysis across schools. One-click Windows/Linux installer for schools without Linux expertise. DBE integration pilot.
Horizon