惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
有赞技术团队
有赞技术团队
博客园_首页
IT之家
IT之家
爱范儿
爱范儿
量子位
小众软件
小众软件
Jina AI
Jina AI
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
The Cloudflare Blog
博客园 - 司徒正美
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
雷峰网
雷峰网
V
Visual Studio Blog
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
Last Week in AI
Last Week in AI
S
SegmentFault 最新的问题

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
The Loop That Creates Civilization Infrastructure
Gabriel Mahia · 2026-06-14 · via DEV Community

Gabriel Mahia

The Loop That Creates Civilization Infrastructure

There's a precise sentence in a system architecture document for East Africa that stops you:

"Technology alone rarely creates civilization. Civilization creates technology. So: Build with communities, not merely for communities."

That's the constraint that makes everything else in the document worth reading.


Two Architecture Documents, One Stack

The first document is an engineer's schematic: 7 agent types, 4 product modules, a 15-table data model, a 3-month MVP plan. It frames the whole thing as a "reusable coordination system" — not an app, not a chatbot.

The core loop:

Input → Structure → Retrieve → Reason → Verify → Act → Record → Improve

The second document is a sovereignty blueprint. It argues that designing AI infrastructure for the Global South requires rejecting three assumptions:

  • Stable 1Gbps fiber
  • Corporate credit cards billed in USD
  • Uninterrupted access to Western cloud infrastructure

Its answer: Technological non-alignment. A 4-tier decoupled architecture that fails gracefully down to a purely local, offline state without data corruption.

Together they answer the question the 30-server MCP stack didn't fully address: how does this run in production, cheaply, reliably, when OpenAI goes down, when Anthropic applies export controls, when the power goes out in Marsabit?


The Tri-Polar Model Router

The most important technical contribution of the second document is the routing strategy.

One LiteLLM proxy. Three independent geopolitical infrastructure paths:

Western:    Claude Haiku / Gemini Flash      → complex reasoning
Eastern:    DeepSeek / Qwen (SiliconFlow)    → bulk, Swahili, <$0.14/M tokens  
Sovereign:  Llama 3.2 / Qwen (Ollama local)  → offline, sensitive data, free

Switch the entire model stack by changing one environment variable. No OpenAI SDK, no Anthropic SDK, no Google SDK in core application code. If a provider goes dark, recovery requires changing a single string in litellm.yaml.

The budget constraint is hard: < $1.00/M tokens for all production tasks. High-cost frontier models are ring-fenced for rare auditing tasks only.

This is not idealism. It's engineering for a continent where export controls are a realistic risk, where mobile data costs money, and where a failed API call cannot mean a failed health navigation query.


The 7 Agent Types, Mapped

The first document identifies 7 agent types. Each one now maps to specific MCP servers in the stack:

Agent Model Tier MCP Tools
Research Eastern (cheap) habari-mcp · historia-mcp · soko-mcp · county-mcp
Form Eastern fomu-mcp · kra-mcp · diaspora-mcp · familia-mcp
Verification Western (high stakes) sifa-mcp · mkopo-mcp · fomu-mcp
Translation Sovereign (free) tafsiri-mcp
Financial Eastern mpesa-mcp · faida-mcp · kra-mcp · jumuia-mcp
Market Eastern soko-mcp · kilimo-mcp · sifa-mcp
Escalation Human (always HITL) church-mcp · haki-ya-kazi-mcp · afya-mcp

The Escalation Agent is the one that never gets automated. Legal advice, medical advice, land disputes, loan decisions — AI prepares, humans certify. The n8n workflow pauses and pings the operator via WhatsApp before any high-stakes action fires.


What "fomu-mcp" Does

One of the agent types produced a new MCP server: the Form Agent.

"Turns messy user answers into applications, checklists, letters."

pip install fomu-mcp — 6 tools:

  • form_checklist: complete requirements for any Kenya government process
  • form_draft_letter: generates introduction letters, reference letters, complaints, land inquiries
  • form_requirements_check: tells you what you have and what's missing
  • ecitizen_guide: eCitizen portal service directory
  • huduma_centre_guide: Huduma Centre locations by county
  • form_timeline_planner: sequences multiple processes with completion dates

This is the Form Agent made concrete. Every Kenya citizen filing for a business permit, a KRA PIN, an NHIF card, or a Certificate of Good Conduct needs exactly this: a structured checklist, a draft document, and a timeline. Previously this knowledge cost money or time to get.


The Real Moat

Both documents are explicit that the moat is not the model.

It's:

  • Local workflows — n8n DAGs hardcoded for Kenya processes (business permits, land searches, tax filing)
  • Trusted data — 32 MCPs encoding institutional knowledge Anthropic doesn't have
  • Community relationships — embedding in SACCOs, churches, county governments
  • Multilingual context — Swahili, Kikuyu, Luo via tafsiri-mcp
  • Institutional memory — audit_logs storing source, confidence, human_review_status for every output
  • Feedback from real users — the compounding loop that frontier labs cannot build from abroad

The audit_logs table in the database schema enforces this at the infrastructure level. Every AI output stores: source, confidence, date, agent_used, human_review_status, next_action. This prevents hallucination from becoming policy.


The Invariant That Matters Most

Both documents share one invariant that isn't technical:

"Build with communities, not merely for communities."

The catholicparishsteward app, the jumuia-mcp SACCO tools, the church-mcp religious institution layer — these aren't feature additions. They're the answer to the question: who maintains this after you deploy it?

Communities with existing institutional trust networks do. You build the infrastructure. They run it.


Stack:

sii-stack: github.com/gabrielmahia/sii-stack — Docker Compose: n8n + LiteLLM + Ollama + 32 MCPs

fomu-mcp: pip install fomu-mcp

Nairobi Stack: gabrielmahia.github.io/nairobi-stack