The DPI-AI Framework

Three layers.
One governed AI service.

The DPI-AI Framework breaks AI-powered public service delivery into three composable, reusable, and governable elements — designed to work together and be deployed incrementally.

🧩
Layer 1
AI Blocks
⚙️
Layer 2
DPI Workflows
🤝
Layer 3
Public Agents
🏛️
Outcome
Service Delivered

The three building blocks

Each element has a single responsibility. Together they give AI a governed, auditable path from citizen request to service delivery.

🧩 Layer 1

AI Blocks

The ingredients — callable AI functions

Modular, single-purpose AI functions that each do one thing: translate text, verify identity, extract structured data, detect fraud, log an audit event. Reusable across any service. Replaceable without rewriting the system around them.

translate() identity_verify() eligibility_verify() speech_to_text() audit_log() fraud_detect()
Explore AI Blocks
AI Block · translate() # Spec
inputs: text, source_lang, target_lang
output: translated_text, confidence
threshold: 0.88
fallback: human_review()
hosting: cloud | sovereign

# Usage in workflow
translate("Nataka msaada",
  source:"sw", target:"en")
# → "I want assistance" · 0.94
DPI Workflow · AGRI_BENEFIT workflow: AGRI_BENEFIT_2026
steps:
  - consent_check() # always first
  - speech_to_text(lang: sw-KE)
  - identity_verify(via: MOSIP)
  - eligibility_verify(via: OpenSPP)
  - if confidence < 0.85:
      human_escalate()
  - payments.disburse(via: Mojaloop)
  - audit_log(all_steps: true)
⚙️ Layer 2

DPI Workflows

The orchestration layer — AI inside governance

Structured, YAML-defined sequences that chain AI Blocks with DPI systems (identity, payments, registries) and human oversight gates. The workflow is the source of truth for what happened, when, and why. AI operates inside it — never outside it.

YAML-defined Human oversight gates Audit trail Consent-first
Explore DPI Workflows
🤝 Layer 3

Public Agents

The citizen interface — accountable, not autonomous

AI-enabled interfaces that activate DPI Workflows on behalf of citizens — via WhatsApp, USSD, voice, or web. Not autonomous systems: constrained by design, accountable to government, and always with a human escalation path. The last mile of public service delivery.

WhatsApp USSD Voice Human escalation Multi-language
Explore Public Agents
Supported channels
💬
WhatsApp
Voice & text
#
USSD
Feature phones
🎤
Voice IVR
Phone call
🌐
Web / App
Browser
👤 Always: human escalation path

How the three layers connect

A citizen sends a message. A Public Agent receives it and activates a DPI Workflow. The workflow calls AI Blocks and DPI systems in sequence, with governance at every step. The service is delivered.

Step 1
🤝

Public Agent receives request

Citizen sends WhatsApp voice note. Agent initialises, consent is logged, workflow is identified.

Step 2
⚙️

DPI Workflow activates

The YAML-defined workflow begins. Each step calls an AI Block or DPI system. Human gates fire on low confidence.

Step 3
🧩

AI Blocks execute

speech_to_text() → translate() → identity_verify() → eligibility_verify(). Each block returns a result and confidence score.

Outcome
🏛️

Service delivered

Payment disbursed, certificate issued, or benefit confirmed. Full audit trail. PII redacted. Consent verified.

📐 The core rule: AI Blocks operate inside the DPI Workflow — never outside it. No AI output can write to an authoritative registry without passing through a governance step.

Build your service in the sandbox

Two interactive tools for designing and specifying DPI-AI services — from free-form workflow composition to a guided 9-step wizard.

See the framework in action

Walk through a live farmer benefit application — from WhatsApp voice note to M-Pesa payment — step by step in the sandbox.

Open the Sandbox → Read the Paper