Inspiration
Kenya's 7.4 million registered businesses collectively pay over KES 2 billion annually in compliance penalties — not because they're negligent, but because the regulatory landscape is too complex to track manually. With KRA alone operating 47 different tax obligation types, CBK issuing weekly circulars, and PPRA constantly updating procurement thresholds, Kenyan SMEs face a regulatory burden that demands dedicated compliance officers costing KES 200,000/month — far beyond what most small businesses can afford.
We witnessed this firsthand: a Nairobi retail SME missed a VAT filing deadline by 3 days and faced a KES 50,000 penalty. The owner knew the deadline existed but couldn't track every obligation across multiple regulators while running their business. This isn't a knowledge problem — it's an orchestration problem.
RegentAI was born from the insight that compliance is fundamentally an information routing problem: regulatory changes need to be detected, interpreted for specific business contexts, and acted upon before deadlines expire. This is exactly what multi-agent AI systems excel at.
What it does
RegentAI is an AI-powered regulatory compliance fleet that autonomously monitors, interprets, and acts on Kenya's regulatory landscape for SMEs, SACCOs, and government suppliers.
For Individual Tenants
- Automated Compliance Calendar: Tracks all KRA, CBK, PPRA, NITA, KEBS, and CMA obligations with colour-coded severity (red < 3 days, amber < 7 days, green > 7 days)
- Natural Language Queries: Ask "Do I need to file VAT this month?" in English or Swahili and get a direct answer with legal basis
- Proactive Alerts: Email and SMS reminders before deadlines, with PDF compliance reports delivered to your inbox
- Gap Analysis: Identifies overdue, pending, and completed obligations with a 0-100 compliance score
For Population Intelligence
- Sector Benchmarks: Compare your compliance rate against anonymised sector medians
- Regional Risk Maps: Kenya county-level compliance choropleth showing where regulatory pressure is highest
- Predictive Risk Scoring: ML-powered deadline risk prediction (HIGH_RISK ≥ 0.75) that identifies at-risk tenants 14 days before traditional reminders
- Monthly Benchmark Report: Auto-generated Kenya Compliance Benchmark Report with Gemini-narrative insights grounded in ClickHouse data
The Agent Fleet
| Agent | Role |
|---|---|
| Orchestrator | Routes intents to specialist agents |
| Watcher | Monitors deadlines, publishes events |
| Interpreter | Gemini RAG over regulatory graph |
| Compliance Checker | Gap analysis against obligations |
| Action | PDF generation, email/SMS dispatch |
| Audit | Immutable compliance event logging |
| Analytics | Population-level intelligence queries |
How we built it
Architecture
We built a zero-trust, event-driven multi-agent system on Google Cloud:
Knowledge Graph (Neo4j): Designed a regulatory ontology with 544+ seeded obligations across KRA, CBK, PPRA, NITA, KEBS, and CMA. All seed scripts use
MERGEfor idempotent re-running.Agent Fleet (Google ADK): Seven specialist agents orchestrated via ADK's multi-agent protocol. Each agent runs as a separate Cloud Run service with its own OIDC service account.
Event Bus (Pub/Sub): Async communication between agents. The Watcher publishes
DeadlineProximityevents daily at 05:00 EAT; the Analytics Agent publishesHIGH_RISK_ALERTSat 06:30 EAT.Analytics Warehouse (ClickHouse Cloud): Four tables (
compliance_events,filing_records,regulatory_changes,agent_telemetry) with two materialised views for real-time sector and regional analytics. Pub/Sub → Cloud Run writer batches 500 rows or 2-second flush.Memory Bank (Firestore): Tenant profiles, obligation registers, compliance reports, and immutable audit logs. KRA PINs encrypted with Cloud KMS (AES-256).
Frontend (Next.js 15): Tenant dashboard with compliance calendar, Kenya Intelligence tab with D3 choropleth, and Agent Registry portal.
Security & Trust
- Model Armor: Microsoft Presidio PII scanner detects KRA PINs, ID numbers, bank accounts in <50ms
- OIDC Identity: Per-agent service accounts with least-privilege IAM
- Workload Identity Federation: Keyless CI/CD deployment (no service account keys)
Infrastructure
- Terraform IaC: All GCP resources provisioned as code (Cloud Run, Pub/Sub, KMS, VPC)
- GitHub Actions: Matrix build → test → deploy pipeline completes in <10 minutes
- OpenTelemetry: End-to-end tracing across all agent hops, exported to Cloud Trace
Challenges we ran into
1. Regulatory Data Fragmentation
Kenyan regulatory bodies publish in inconsistent formats — KRA uses PDF notices on iTax, CBK posts HTML circulars, PPRA publishes threshold tables. Building a unified ingestion pipeline required Playwright for JavaScript-rendered portals and BeautifulSoup for static pages, with Gemini 2.5 Flash extracting structured obligations from unstructured documents.
2. Hallucination in Compliance Context
LLMs confidently fabricate legal references — unacceptable when penalties are involved. We built a hallucination guard that requires every Gemini response to cite a graph node ID. If no node is found, the agent returns "regulation not yet indexed" rather than a fabricated answer.
3. Swahili Language Support
Most compliance LLMs are English-only. We implemented language detection (langdetect) and Swahili prompt localisation, enabling queries like "Je, nahitaji kufilia VAT mwezi huu?" with accurate responses grounded in the regulatory graph.
4. ClickHouse Latency at Scale
Cross-tenant analytics on 10M+ row datasets required careful schema design: MergeTree engines with (sector, region, obligation_id, deadline_at) ordering keys, toYYYYMM partitioning, and materialised views for pre-aggregated sector/regional compliance rates. Per-tenant queries now execute in <50ms.
5. Zero-Trust Agent Identity
Coordinating 7 agents without shared credentials required per-agent OIDC service accounts with least-privilege IAM. The Watcher only gets Pub/Sub Publisher + Neo4j read; the Action Agent only gets SendGrid + Cloud Storage write. A compromised agent cannot escalate to other tenants' data.
6. Deterministic Local Development
Cloud dependencies (Neo4j Aura, ClickHouse Cloud, Firestore) made local testing difficult. We built a config-driven architecture where every external integration degrades gracefully to deterministic local mode when credentials are absent, enabling 220+ tests to run without cloud access.
Accomplishments that we're proud of
1. Production-Grade Multi-Agent System
Seven coordinated agents running on Cloud Run with end-to-end OpenTelemetry tracing — not a demo, but a deployable system with real security, monitoring, and CI/CD.
2. Population-Scale Intelligence
We don't just automate per-tenant compliance — we generate Kenya-wide compliance intelligence (sector benchmarks, regional risk maps, predictive default scores) that KRA itself doesn't publish. This is the data network effect that transforms RegentAI from a tool into a platform.
3. Sub-50ms ClickHouse Queries
Our schema design achieves <50ms per-tenant lookups and <200ms cross-tenant aggregations on 10M-row datasets — validated with EXPLAIN analysis and documented in docs/clickhouse-performance.md.
4. Zero PII Leakage
Microsoft Presidio with custom KRA PIN recognisers (A[0-9]{9}[A-Z]) scans every prompt and response in <50ms. Automated CI tests verify zero PII in Cloud Logging output.
5. Idempotent Everything
All Neo4j seeds use MERGE (never CREATE). All ClickHouse inserts use content-hash deduplication. All Terraform applies produce zero changes on re-run. The system is safe to re-execute at any level.
6. 220+ Tests, Zero External Dependencies
Every integration is mocked with injectable adapters. The full test suite runs deterministically without cloud credentials — enabling reliable CI and reproducible demos.
7. Real Regulatory Coverage
544+ obligations seeded across KRA (VAT, PAYE, iTax), CBK (prudential returns), PPRA (procurement thresholds), NITA (levies), KEBS, and CMA — with automated ingestion pipelines for KRA iTax and CBK circulars.
What we learned
1. Compliance is an Orchestration Problem
The hardest part wasn't building individual agents — it was designing the routing, fallback, and aggregation logic that makes them work as a fleet. The Orchestrator's intent classification and sub-agent timeout handling (30s graceful degradation) were critical architectural decisions.
2. Graph + LLM > LLM Alone
Pure LLM approaches hallucinate legal references. Grounding Gemini in Neo4j graph context with citation validation produced compliance-grade accuracy. The knowledge graph isn't just storage — it's the source of truth that keeps the LLM honest.
3. ClickHouse is a Force Multiplier
Columnar storage with materialised views transformed cross-tenant analytics from "impossible" to "instant." The ability to query 50,000 compliance events across Nairobi, Mombasa, and Kisumu in <50ms is what makes the Kenya Intelligence Dashboard feel magical.
4. Zero-Trust is Non-Negotiable
When you're handling KRA PINs and financial data, "trust us" isn't enough. Per-agent OIDC identities, Cloud KMS encryption, and Presidio PII scanning aren't features — they're prerequisites. The judges noticed.
5. Config-Driven Architecture Enables Speed
Every external integration reading from a central config (with graceful local-mode degradation) allowed us to build 9 epics in 7 days without blocking on cloud credentials. This pattern is reusable for any multi-cloud AI system.
6. Swahili Support is a Competitive Moat
Most compliance tools are English-only. Supporting Swahili queries isn't just inclusive — it's a market differentiator for Kenyan SMEs where Swahili is the business lingua franca.
What's next for Regent AI
Immediate (Post-Hackathon)
- Phase 1: MVP Launch — 10 pilot SME tenants, KRA VAT + PAYE agents live, M-Pesa billing active (Target: KES 50K MRR)
- Phase 2: SACCO Tier — CBK prudential return agents, 5 SACCO clients, Benchmark Report to 50 subscribers (Target: KES 250K MRR)
Medium-Term (Commercialisation)
- Phase 3: Enterprise — PPRA procurement compliance fleet, BOQ Master integration, government supplier pipeline (Target: KES 600K MRR)
- Phase 4: East Africa — Tanzania TRA, Uganda URA, Rwanda RRA regulatory graphs, enterprise USD pricing (Target: USD 15K ARR)
Technical Roadmap
- Real-time Regulatory Ingestion: Expand from KRA/CBK to automated monitoring of all 6 regulatory bodies with daily scraping
- Advanced Risk Models: Move from configurable weights to ML-trained deadline risk models with feature importance analysis
- Mobile-First Experience: Progressive Web App for tenants who primarily use smartphones
- API Marketplace: Third-party developers building compliance applications on RegentAI's agent fleet
Partnership Path
- Submit for Google for Startups Africa accelerator
- GDE application: Graph AI / Vertex AI track
- Google Cloud Partner: Pursue MSP designation via ClickHouse + Vertex AI deployment track
RegentAI — Always watching. Always compliant.

Log in or sign up for Devpost to join the conversation.