Logo Lanfrica

gabrielmahia/kenya-agui

Domain:

digital infrastructure

Record type:

software
Creator:
gab
Host:
First East African AG-UI implementation — connects civic AI agents to live frontends via the Agent-User Interaction protocol # kenya-agui > AG-UI (Agent-User Interaction) protocol implementation for East African civic contexts. ## What is AG-UI? AG-UI is the third protocol in the modern agent stack — adopted in 2025-2026 by Google, Microsoft, AWS, LangChain, and CrewAI. ``` MCP — Agent → Tool communication (mpesa-mcp, wapimaji-mcp) A2A — Agent → Agent communication (kenya-a2a) AG-UI — Agent → User/Frontend (kenya-agui) ← this repo ``` Where MCP connects agents to tools and A2A connects agents to other agents, **AG-UI connects agents to users** — enabling real-time streaming, generative UI, shared state, and human-in-the-loop workflows directly inside web applications. ## What this repo does `kenya-agui` provides AG-UI bindings for the East African civic agent stack: - **Streaming civic data** to a React/Next.js frontend in real time - **Generative UI** — agents dynamically render drought maps, financial dashboards, and county reports inside the interface - **Human-in-the-loop** — M-Pesa payment confirmation flows with agent-driven approval - **Shared state** — bidirectional sync between wapimaji-mcp drought data and the UI layer ## Architecture ``` ┌─────────────────────────────────────────────────┐ │ React Frontend (AG-UI Client) │ │ CopilotKit · useAgent hook · Generative UI │ └───────────────────┬─────────────────────────────┘ │ AG-UI protocol (HTTP/WebSocket) ┌───────────────────▼─────────────────────────────┐ │ kenya-agui Backend (AG-UI Server) │ │ FastAPI · AG-UI event emitter · state sync │ └───────┬──────────────────────────┬───────────────┘ │ MCP │ A2A ┌───────▼───────┐ ┌────────▼──────┐ │ mpesa-mcp │ │ kenya-a2a │ │ wapimaji-mcp │ │ kenya-adk │ └───────────────┘ └───────────────┘ ``` ## Quick Start ```bash pip install kenya-agui ``` ```python from kenya_agui import KenyaAGUIServer from mpesa_mcp import MpesaMCP from wapimaji …