Skip to content

mockup: add AI map assistant#3673

Draft
BRaimbault wants to merge 2 commits into
masterfrom
feat/ai-agent-poc
Draft

mockup: add AI map assistant#3673
BRaimbault wants to merge 2 commits into
masterfrom
feat/ai-agent-poc

Conversation

@BRaimbault

@BRaimbault BRaimbault commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Mockup

DO NOT MERGE

Description

DHIS2 users of analytics apps could manage their maps and charts in plain language — starting in the Maps app with add / edit / remove a layer and answer questions about the available metadata and how the app works, and later analyse what the map shows.

Because DHIS2 instances hold sensitive health data, two principles govern every choice. First, the customer decides what leaves their server: an administrator can restrict what any AI provider sees — down to "nothing leaves; only a self-hosted model may be used" — even at the cost of capability. Second, no vendor lock-in: customers use whatever AI they host or pay for, with at least one open-source/self-hosted option and one mainstream cloud option, and new providers added by writing one small adapter.

The assistant appears in two forms. Tier 1 — embedded in each analytics app (Maps, Data Visualizer, Event Visualizer), driving that app directly; this is where we start. Tier 2 — cross-app on a dashboard, where one assistant composes an entire dashboard — finding existing saved content or creating new maps and charts — without the user touching a dialog. Both run on the same shared machinery — provider connectors, a server-side broker, an egress-policy engine, and a tool/executor layer — so security and provider rules are defined and audited once.

The first deliverable is a proof of concept in the Maps app: add, edit, and remove layers, plus answer questions about the instance's metadata and DHIS2 documentation, against two interchangeable providers — a small self-hosted model and a cloud model. It is built so no health figures ever leave the browser: adding a layer and answering "what malaria indicators do we have?" both need only names and labels, never values. This validates the two hardest constraints — provider-swapping and data-minimisation — before any sensitive data is in scope. Analyse the map requires values to leave, so it follows once the egress-policy engine exists. The end state extracts the shared machinery into a library the other analytics apps can consume.

The single most important design property: the assistant manipulates the real app, not a parallel one. Its tools dispatch the same actions a user's clicks do, so an AI-built layer is an ordinary layer the user can then edit or delete by hand.


Screenshots

image

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
31 New issues
31 New Code Smells (required ≤ 0)
4 New Critical Issues (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant