cd /news/artificial-intelligence/building-an-event-driven-multimodal-… Β· home β€Ί topics β€Ί artificial-intelligence β€Ί article
[ARTICLE Β· art-182683] src=builder.aws.com β†— pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Building an Event-Driven Multimodal Citizen Copilot: System Design of Akshaya Sahayi

A computer science undergraduate is building Akshaya Sahayi, a WhatsApp-first civic copilot for Kerala's Akshaya citizen facilitation centers that uses Kapso automation workflows, a Node.js ingestion layer, Cloudinary media normalization, Supabase state storage and the Gemini API for multimodal document pre-verification and government scheme guidance. The system acknowledges webhooks with an immediate 200 OK before dispatching media and LLM work asynchronously, aiming to cut late-stage document rejections and portal navigation friction for applications such as income and caste certificates and welfare enrollments.

recommendation

Split webhook ingestion from multimodal inference: validate the signature, persist the raw event, return 200 OK immediately, then process media and LLM calls asynchronously to stay inside the platform's few-second retry window.

more in playbook: Designing agent systems
by read5 min views2 publishedDec 5, 2026
Building an Event-Driven Multimodal Citizen Copilot: System Design of Akshaya Sahayi
Image: Builder (auto-discovered)

How I am designing and building a WhatsApp-first civic copilot using event-driven webhooks, decoupled media pipelines, and multimodal AI to reduce document rejections and simplify government portal navigation. Covers design patterns for idempotency, PII protection, and mapping civic workflows to AWS.

Computer Science Undergraduate | Passionate about AI, machine learning, and full-stack development

Public service portals and citizen facilitation centers (such as Akshaya centers in Kerala) process thousands of high-stakes applications dailyβ€”from income and caste certificates to welfare scheme enrollments. In practice, two bottlenecks slow down both citizens and operators:

  1. Late-stage document rejections: Citizens often wait in queues only to discover a blurry scan, mismatched name spelling, or expired supporting certificate after manual review.

  2. Portal navigation friction: Government service portals involve multi-step forms, shifting eligibility rules, and dense regional-language terminology that confuse first-time applicants.

To solve both problems at the edge, I am currently building

Akshaya Sahayiβ€”an automated WhatsApp citizen intake, multimodal document pre-verification, government scheme guidance, and live portal navigation copilot. Here is how I am architecting the system and how its patterns map to scalable cloud-native workloads.

1. Why WhatsApp + Event-Driven Webhooks? #

For civic and public-interest software, forcing users to download a standalone app or create another portal login creates unnecessary friction. By anchoring the user interface in WhatsApp via

Kapso automation workflows, citizens can interact with the system using voice notes, text queries, and phone-camera photos of their documents. Because webhook payloads from messaging platforms arrive asynchronously and carry strict timeout windows (typically a few seconds before retries trigger), synchronous processing inside the request handler breaks down quickly under load. In my architecture, I separated

message ingestion frommultimodal inference:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      Webhook       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚  Citizen Client   β”‚ ─────────────────► β”‚   Kapso + Node.js API    β”‚β”‚ (WhatsApp / Media)β”‚                    β”‚  (Fast Ack & Validation) β”‚β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                                      β”‚                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                       β–Ό                              β–Ό                              β–Ό        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚       Media Pipeline        β”‚ β”‚     State & Audit DB     β”‚ β”‚     AI Reasoning Engine     β”‚        β”‚  β€’ Cloudinary Ingestion     β”‚ β”‚  β€’ Supabase (PostgreSQL) β”‚ β”‚  β€’ Gemini API (Multimodal)  β”‚        β”‚  β€’ Normalization & CDN URLs β”‚ β”‚  β€’ Session & Step State  β”‚ β”‚  β€’ Scheme RAG & Portal Nav  β”‚        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  • Fast Webhook Acknowledgment: My Node.js ingestion layer validates the incoming Kapso webhook signature, persists the raw event state, and returns an immediate200 OKΒ  before kicking off heavy media or LLM tasks.

  • Decoupled Media Handling: Incoming document photos and PDFs are streamed toCloudinary for format normalization and secure URL generation rather than passing raw binary blobs across application services.

2. Three Core Functional Pipelines I Am Implementing #

A. Multimodal Document Pre-Verification

Before a citizen visits a facilitation center or submits an online application, Akshaya Sahayi runs an automated pre-check on uploaded IDs and supporting certificates:

  • Visual & Structural Check: UsingGemini API multimodal capabilities, the pipeline inspects image clarity, checks whether required stamps or signatures are cropped out, and extracts key fields (name, document ID, issue date).

  • Cross-Document Consistency: Extracted fields are compared against the citizen's session state inSupabase to flag spelling discrepancies or missing prerequisites early, helping prevent avoidable counter rejections.

B. Government Scheme Eligibility & Guidance

Citizens rarely know the exact official name of a welfare schemeβ€”they describe their situation (such as student scholarships, housing assistance, or pension renewals).

  • My copilot maps natural-language queries against structured scheme criteria, returning clear eligibility checklists, required document lists, and fee or timeline expectations in plain language.

C. Live Portal Navigation Copilot

Beyond Akshaya center pre-intake, many services can be completed directly by citizens on state and central e-governance portals if they have step-by-step guidance:

  • Akshaya Sahayi tracks where the user is in a multi-page portal workflow, explains what each form field expects, and troubleshoots common validation errors in real time.

3. Cloud Architecture & Security Considerations #

As I prepare this project for wider deploymentβ€”and look at how it translates to production AWS infrastructure using

API Gateway,** AWS Lambda**,** Amazon S3**,** Amazon RDS / DynamoDB**, and** Amazon Bedrock**β€”three design rules are central to my build:

  1. Idempotent Webhook Consumers: Messaging gateways retry webhooks whenever network jitter delays an acknowledgment. Tracking a uniquemessage_idΒ  constraint in PostgreSQL/Supabase prevents duplicate AI invocations and double replies to the citizen.

  2. Zero-Retention / Scoped Media Policies: Citizen identity documents contain sensitive Personally Identifiable Information (PII). Media assets stored in object storage (Cloudinary or S3) need signed, short-lived URLs and automated lifecycle expiration rules once verification completes.

  3. Structured JSON Outputs Over Free-Form Text: For document verification and portal step routing, enforcing strict JSON schemas from the model keeps backend state transitions predictable rather than relying on fragile regex parsing.

4. Key Takeaways From Building This System #

  • Meet users where they already are: Pairing conversational interfaces (WhatsApp) with multimodal LLMs lowers UI barriers for non-technical citizens far more effectively than building a complex web form.

  • Separate media storage from inference: Off image optimization and hosting to a dedicated media layer keeps stateless API workers fast and lightweight.

  • Design for graceful fallback: When an image is too blurry for confident extraction, the workflow explicitly prompts the user to retake the photo in better lighting rather than guessing fields.

How do you handle idempotency and PII cleanup when processing user-uploaded documents in webhook-driven AI pipelines? Share your approach in the comments below.

Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

recommendations

── more in #artificial-intelligence 4 stories Β· sorted by recency
── more on @akshaya sahayi 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/building-an-event-dr…] indexed:0 read:5min 2026-12-05 Β· β€”