DPI-AI Framework Β· Element 03

Public Agents

AI-enabled interfaces that interact with citizens and public servants β€” invoking DPI Workflows, not acting autonomously. Constrained, accountable, and governed by design.

What is a Public Agent?

Accountable extensions of government capacity

A Public Agent is an AI-enabled assistant β€” software-based, AI-assisted human, or a hybrid of both β€” that interacts with citizens or officials within defined rights-based boundaries, and activates DPI Workflows to complete tasks.

⚠ A Public Agent is not autonomous. It cannot access data without consent, cannot modify records directly, and cannot bypass human oversight. It is a constrained interface that activates governed workflows β€” not a decision-maker.

What a Public Agent can do

Interpret citizen intent

Use LLM/SLM to understand what a citizen is asking for, in any language, via any channel

Invoke DPI Workflows

Activate pre-approved workflows to deliver services β€” identity verification, eligibility, benefits, registration

Call AI Blocks

Use foundational blocks (translation, OCR) and sector-specific blocks (eligibility, fraud detection)

Escalate to humans

Route low-confidence cases, exceptions, and complaints to a human caseworker with a case ID

Notify and follow up

Send status updates via preferred channel (SMS, WhatsApp, voice)

What a Public Agent cannot do

Access data without consent

Every data pull requires a consent token β€” verified by the workflow, not assumed

Modify authoritative records directly

Record updates require a governance step in the workflow β€” the agent cannot write directly to registries

Operate outside approved workflows

Agents can only activate workflows that have been pre-approved and audited

Make final decisions autonomously

All decisions above a confidence threshold remain with human authorities

Multi-Channel Design

Design for the lowest-bandwidth channel first

A Public Agent must work for every citizen β€” including those with limited connectivity or literacy. Channel design is a governance principle, not a technical afterthought.

πŸ’¬

WhatsApp / Chat

Primary channel for urban and semi-urban users. Supports text, voice notes, and document submission.

πŸŽ™οΈ

Voice / IVR

Critical for low-literacy users. speech_to_text() + translate() blocks enable voice in local dialects.

πŸ“±

USSD

Fallback for feature phones and low-connectivity zones. No data connection required. Async queue.

πŸ’»

Web / Mobile App

For users with reliable connectivity. Richer interface, document uploads, case tracking.

πŸ“¨

SMS

Notifications and confirmations. Lowest common denominator for all mobile users.

🏒

In-Person Kiosk

Assisted mode for citizens without devices. Agent operates through a public servant as intermediary.

Language principle: Local language AI Blocks (translation, transliteration, speech-to-text in dialects) are not optional features β€” they are prerequisites for inclusion. A Public Agent that only works in English or French is structurally exclusionary.
Agent Specification

Generic Public Agent Spec (YAML)

A machine-readable spec for a Public Agent, including its model configuration, channels, workflow bindings, and governance constraints.

public_agent: id: "social_benefit_agent_v1" description: "Guides citizens through social protection benefit applications" channels: ["whatsapp", "ussd", "voice", "web"] languages: ["sw", "en", "am", "om"] # Swahili, English, Amharic, Oromo ai_model: # Plug-and-play: swap the adapter to change providers adapter: "ollama" # openai | anthropic | google | ollama | vllm | bedrock | custom runtime: "sovereign_cloud" # sovereign_cloud | on_prem | external_api endpoint: "https://ai.gov.example/v1" model: "llama3-8b-instruct-sw" # SLM fine-tuned on Swahili civic content auth_ref: "vault://ai-gateway/token" timeout_ms: 30000 scope: allowed_workflows: ["benefit_disbursement_v1", "eligibility_check_v1"] allowed_ai_blocks: ["translate", "speech_to_text", "eligibility_verify_v1"] data_access: "consent_required" escalation_target: "caseworker_queue" constraints: can_modify_records: false can_initiate_payments: false # Only via workflow disburse step can_access_data_without_consent: false human_escalation: always_available session_timeout: "30m" governance: owner_agency: "Ministry of Social Welfare" legal_basis: "Social Protection Act Β§ 8.1" audit_logging: true pii_handling: "tokenise_in_logs" human_recourse: enabled: true channel: "any" response_sla: "48h"
Model Selection

LLMs vs SLMs: choosing the right model for government

Public Agents can run on any language model β€” from large frontier APIs to small on-device models. The choice is not just technical; it has direct implications for sovereignty, cost, latency, and inclusion. Neither type is universally better. Each has a role.

LLM

Large Language Models

GPT-4o, Claude 3, Gemini 1.5 Pro, Llama 3 70B+

βœ…

Broad knowledge β€” handles open-ended queries, complex reasoning, and edge cases with less fine-tuning

βœ…

Strong multilingual base β€” reasonable performance across many languages without specialised training

βœ…

Faster to prototype β€” good default behaviour out of the box for pilots and demos

⚠️

Data sovereignty risk β€” cloud-only APIs send citizen data to third-party servers; requires careful PII handling

⚠️

High cost at scale β€” per-token pricing becomes significant across millions of citizen interactions

⚠️

Latency and connectivity β€” dependent on reliable internet; unsuitable as primary model for low-connectivity contexts

⚠️

Unpredictable outputs β€” larger context windows and generality increase risk of off-scope responses in constrained workflows

Best for: Exploratory pilots, non-PII tasks (translation, summarisation), and use cases where interpretive flexibility is more important than strict constraint.
SLM β€” Recommended

Small Language Models

Phi-3 Mini, Gemma 2B/7B, Llama 3 8B, Qwen2 1.5B, Mistral 7B

βœ…

On-premise deployment β€” runs entirely within government infrastructure; citizen data never leaves the country

βœ…

Low cost at scale β€” fixed infrastructure cost; no per-token billing across millions of interactions

βœ…

Low latency β€” local inference means fast responses even in constrained network environments

βœ…

Task-focused fine-tuning β€” small models specialised on a narrow task (eligibility checking, document extraction) outperform large generalist models on that task

βœ…

Predictable behaviour β€” narrower scope means fewer off-topic or hallucinated responses within governed workflow steps

βœ…

Local language fine-tuning β€” SLMs can be fine-tuned on local dialect corpora that large model providers do not cover

⚠️

More upfront investment β€” requires GPU infrastructure, fine-tuning pipelines, and technical capacity to evaluate and maintain models

Best for: Production deployments, PII-sensitive workflows, low-connectivity contexts, local dialect support, and any service operating at national scale.
⚑

Why task-focused SLMs are the right fit for government at scale

Government AI does not need to be brilliant β€” it needs to be reliable, bounded, and governable. A Public Agent executing a benefits eligibility workflow does not need to discuss philosophy or write poetry. It needs to understand a citizen's request, extract structured fields, call the right workflow step, and escalate when uncertain. A 3–8 billion parameter model fine-tuned on that specific task, running on sovereign infrastructure, is more appropriate than a frontier LLM accessed via a third-party API β€” and it will be cheaper, faster, and more controllable at the 10 million interactions that matter.

01

Sovereignty by default

Data stays within national infrastructure. No dependency on foreign API availability, pricing changes, or terms of service. The government owns the model and its outputs.

02

Replaceability

Smaller models are easier to swap. The DPI Workflow spec declares the model adapter β€” changing from Llama to Mistral or a locally developed model requires no workflow rebuild.

03

Local language inclusion

SLMs can be fine-tuned on Swahili dialects, Amharic, Bahasa, or Kinyarwanda corpora that large providers do not prioritise. Inclusion is a governance imperative, not a feature request.

04

Auditability

A model you control can be inspected, re-evaluated, and red-teamed by your own team. Black-box third-party models make it harder to satisfy accountability requirements to citizens and legislatures.

05

Cost at scale

At 5 million citizen interactions per month, per-token API costs become significant budget line items. Fixed infrastructure costs for on-prem SLMs are predictable and decrease per-interaction as usage grows.

06

Offline and edge capability

SLMs in the 1–3B range can run on commodity hardware, enabling AI-assisted services in district offices without reliable internet β€” extending the reach of Public Agents to the last mile.

The principle of replaceability applies to models too. Every Public Agent spec declares its model adapter (adapter: "ollama", "openai", "vllm"). Start with what you can deploy today β€” even a cloud LLM for a pilot β€” and migrate to a sovereign SLM as capacity grows. The workflow does not change. Only the adapter does.
Multi-Agent Orchestration

The natural progression: agents collaborating

As modular capabilities mature, there is a natural progression toward multi-agent orchestration β€” multiple agents collaborating by sharing context, coordinating across workflows, and dynamically decomposing complex tasks that a single agent could not achieve alone.

DPI provides the shared digital rails to meet these requirements: common protocols, registries, and governance frameworks that ensure agents and workflows operate securely and transparently. This is how the framework evolves β€” from single-workflow agents to coordinated, multi-sector service delivery β€” without sacrificing accountability.

Trust requires transparency. Building trust in Public Agents requires transparency in their actions, clear consent mechanisms, cultural and linguistic adaptation to local contexts, and β€” critically β€” the ability for any citizen to escalate to a human at any point, for any reason.

β†’ See how to build a Public Agent with code or no-code tools

Related Elements

Public Agents are the citizen-facing layer

Agents invoke Workflows, which call Blocks. The framework is a stack: Agents at the top, infrastructure at the bottom.

← 01 AI Blocks ← 02 DPI Workflows 03 Public Agents Implementation Guide β†’ Try the Sandbox β†’