AWS Builder Center
JARVIS Civic: Building a Trustworthy Voice-First Civic Grievance Workflow with AWS Open Source

JARVIS Civic: Building a Trustworthy Voice-First Civic Grievance Workflow with AWS Open Source

JARVIS Civic turns multilingual citizen conversations into structured Civic Action Dockets, combining Strands Agents, Cedar, LocalStack, AWS SAM CLI, and OpenSearch with deterministic validation and citizen-controlled resolution.

JARVIS Civic: From Citizen Voice to a Trusted Civic Action Docket

A pothole is easy to describe.
A citizen might simply say:
“There is a huge pothole near my street. It has been there for weeks and is becoming dangerous.”
But turning that sentence into an actionable civic workflow is much harder.
Who should handle it?
What exactly is the problem?
Where is it located?
How urgent is it?
What evidence supports the report?
Can an authority access the case?
How do we know submitted evidence has not been tampered with?
And most importantly:
Who gets to decide when the issue is actually resolved?
These questions led us to build JARVIS Civic — “Speak. Report. Resolve.”
JARVIS Civic is a voice-first, multilingual civic grievance workflow that converts natural-language citizen conversations into structured AI-generated Civic Action Dockets and provides a controlled workflow from reporting to resolution.
The project was built around a simple principle:
AI can assist the workflow, but AI should never be the authority that controls it.



The Problem

Traditional grievance systems often force citizens to navigate forms, categories, departments, and technical terminology before they can even report a problem.
For a citizen, the natural interaction is much simpler:
“This is the problem. This is where it happened. Here is the evidence.”
JARVIS Civic converts that natural interaction into structured information.
A citizen can:
  • Describe a civic issue conversationally.
  • Interact using supported Indian languages.
  • Provide location information.
  • Attach supporting evidence.
  • Generate a structured Civic Action Docket.
  • Track the docket through its lifecycle.
  • Review resolution evidence.
  • Explicitly confirm or reject the claimed resolution.
The system is designed as a civic workflow prototype, not as an official government portal.



From Conversation to Civic Action Docket

The core workflow is:
Citizen Conversation
↓
Requirement & Issue Extraction
↓
AI-Generated Civic Action Docket
↓
Evidence Validation
↓
Recommended Department
↓
Authority Workflow
↓
Resolution Evidence
↓
Citizen Confirmation
↓
Resolved
The important distinction is that the AI does not directly control these transitions.
The application separates:
  1. AI reasoning
  1. Deterministic validation
  1. Authorization
  1. Workflow state
  1. Citizen decision
This separation became one of the most important architectural decisions in the project.



Why AWS Open Source?

We wanted to understand how AWS technologies could be used to build the system without hiding the architecture behind managed services.
For the Build It track, we used the AWS open-source/local development ecosystem:
  • Strands Agents SDK
  • Cedar
  • LocalStack
  • AWS SAM CLI
  • Amazon OpenSearch
We combined these with FastAPI, React, and local AI inference through Ollama.
The result is a completely local development environment where we can exercise the major architectural components without requiring a production AWS account.



1. Strands Agents SDK — Agentic Civic Intake

The first challenge was converting an unstructured conversation into structured civic information.
Instead of treating the LLM as a simple chatbot, JARVIS Civic uses an agent-oriented workflow.
The system extracts information such as:
  • Issue category
  • Description
  • Location
  • Urgency
  • Evidence
  • Recommended department
  • Relevant contextual information
The Strands Agents SDK provides the orchestration layer for this agentic workflow.
The important design decision was to keep the agent's output structured.
The AI can propose information.
The application validates and persists the resulting state.
This means the LLM is not treated as the source of truth for authorization or lifecycle transitions.



2. Cedar — Authorization as a Security Boundary

A civic workflow can contain sensitive information.
For example, a Roads authority should not automatically have access to every department's cases.
Instead of scattering authorization checks throughout the application, we introduced Cedar as an explicit policy enforcement layer.
Cedar controls decisions such as:
  • Who can access a case?
  • Which department can access it?
  • Who can add evidence?
  • Who can add resolution evidence?
  • Which role can perform a particular action?
  • Who is allowed to confirm resolution?
The application follows a fail-closed model.
If authorization is not explicitly granted, the action is rejected.
This became especially important for the final resolution workflow.



3. AI Does Not Close Cases

One of the most important architectural decisions in JARVIS Civic is the separation between AI assessment and workflow authority.
Suppose an authority uploads a photograph claiming that a pothole has been repaired.
The vision model can assess the evidence and provide an advisory result.
For example:
SUPPORTED
or
NOT_SUPPORTED
or
UNCERTAIN
But the AI cannot transition the case to  RESOLVED .
Instead, the workflow becomes:
Authority submits resolution evidence
↓
Deterministic evidence validation
↓
Optional AI assessment
↓
Citizen reviews the resolution
↓
Citizen accepts or rejects
Only the case-owning citizen can provide the final acceptance that moves the case from:
Under Review → Resolved
This creates a clear trust boundary.



4. Evidence Is Treated as Data, Not Just an Attachment

Evidence introduces another security problem.
A system should not blindly trust a filename or a client-provided MIME type.
JARVIS Civic therefore performs deterministic validation before evidence becomes trusted application data.
The validation pipeline includes:
  • File size limits
  • Filename sanitization
  • MIME validation
  • Magic-byte validation
  • Supported-format validation
  • Corruption checks
  • Server-side SHA-256 hashing
Supported evidence formats include common image, document, audio, and text formats.
The resulting evidence metadata is persisted so that the evidence lifecycle can be audited.



5. Local Vision AI for Evidence Relevance

We also wanted the system to answer a practical question:
Is the citizen's attached evidence actually related to the reported issue?
For example:
Citizen query:
“There is a large pothole outside the main road.”
Attached image:
A photograph showing a pothole.
The vision model can return:
RELATED
For an unrelated photograph:
NOT_RELATED
When the model cannot reliably assess the evidence:
UNCERTAIN
The important part is that this assessment remains advisory.
A  NOT_RELATED  result does not silently delete the citizen's evidence or automatically reject the grievance.
Likewise,  UNCERTAIN  does not become a hidden failure.
The system preserves the distinction between:
What the deterministic system knows
and
What the AI believes



6. LocalStack — AWS-Compatible Persistence

For the Build It implementation, we use LocalStack to exercise AWS-compatible persistence locally.
Our architecture uses:
DynamoDB-compatible persistence
for structured civic case data and workflow state.
And:
S3-compatible storage
for evidence artifacts.
This allowed us to build and test the persistence architecture without requiring a cloud deployment during development.
The important distinction is that LocalStack is used as a local development environment; we do not represent it as production AWS infrastructure.



7. AWS SAM CLI

We use AWS SAM CLI for local serverless development and validation.
This helps keep the application architecture aligned with AWS serverless conventions while allowing the development and testing workflow to remain local.
SAM also gives us a concrete infrastructure definition rather than relying entirely on undocumented manual configuration.



8. Amazon OpenSearch — Searchable Civic Workflows

As the number of civic dockets grows, simply storing records is not enough.
Authorities need to search them.
JARVIS Civic uses Amazon OpenSearch as a searchable projection for information such as:
  • Civic dockets
  • Evidence metadata
  • Audit information
  • Workflow information
However, OpenSearch is not the source of truth.
The architecture deliberately separates:
CaseStore → Source of Truth
from
OpenSearch → Search Projection
This means a search-index problem does not redefine the underlying civic case.
The search projection can be rebuilt from authoritative data.



The Complete Architecture

At a high level:
CITIZEN
│
▼
Voice / Conversation
│
▼
Strands Agents SDK
│
▼
Structured Civic Docket
│
┌────────────┴────────────┐
▼ ▼
Evidence Pipeline Cedar Authorization
│ │
▼ ▼
Validation + Hashing Role / Department Policy
│
▼
LocalStack
┌─────┴─────┐
│ │
DynamoDB S3
│ │
└─────┬─────┘
▼
CaseStore
Source of Truth
│
▼
OpenSearch Projection
│
▼
Authority Workspace
│
▼
Resolution Evidence
│
▼
AI Assessment
(Advisory)
│
▼
Citizen Confirmation
│
┌────┴─────┐
▼ ▼
Reject Accept
│ │
▼ ▼
Under Review Resolved



The Trust Model

The most important part of the architecture is not any individual AWS service.
It is the separation of responsibilities.

AI

AI can:
  • Understand conversations
  • Extract structured information
  • Recommend categorization
  • Assess evidence
  • Provide explanations
AI cannot:
  • Override Cedar
  • Change ownership
  • Authorize access
  • Directly resolve a case
  • Impersonate a citizen
  • Bypass deterministic validation

Cedar

Cedar provides the authorization boundary.

Deterministic validation

The application validates evidence and critical state transitions independently of the AI.

CaseStore

The persisted case state remains the source of truth.

Citizen

The citizen has the final confirmation step for resolution.



Why This Architecture Matters

A common pattern in AI applications is:
User → LLM → Action
We wanted something different:
User → AI assistance → Validation → Authorization → Controlled Action
That difference matters when AI is being used in workflows involving real-world issues.
The model can be uncertain.
The authorization policy should not be.
The model can make an incorrect assessment.
The workflow should not silently accept it as fact.
The model can recommend a department.
It should not become the authority that grants itself access to that department's data.



What We Learned

Building JARVIS Civic with AWS's open-source stack taught us that the difficult part of an agentic application is not simply connecting an LLM.
The difficult part is designing the boundaries around it.
We learned how:
  • Strands Agents SDK can provide structured agentic orchestration.
  • Cedar can turn authorization into an explicit policy layer.
  • LocalStack can support realistic AWS-compatible local development.
  • AWS SAM CLI can bring serverless development patterns into a local workflow.
  • OpenSearch can provide a searchable projection without becoming the source of truth.
  • AI systems should be treated as advisory components when deterministic authorization and workflow state are required.



What We Built

JARVIS Civic brings these components together into one workflow:
Speak.
A citizen describes the problem naturally.
Report.
The conversation becomes a structured Civic Action Docket with validated evidence.
Resolve.
Authorities process the issue, provide resolution evidence, and the citizen makes the final confirmation.
The result is not simply an AI chatbot for civic complaints.
It is an attempt to build a trust-aware agentic workflow, where AI assists the process while explicit authorization, deterministic validation, auditability, and citizen control remain outside the model.



Technology Stack

AI & Agents
  • Strands Agents SDK
  • Ollama
  • Vision-capable local models
AWS Open Source / Local Stack
  • Cedar
  • LocalStack
  • AWS SAM CLI
  • Amazon OpenSearch
Backend
  • Python
  • FastAPI
  • Pydantic
Frontend
  • React
  • TypeScript
  • Vite
Storage
  • DynamoDB-compatible LocalStack storage
  • S3-compatible LocalStack storage
  • OpenSearch projections



Final Takeaway

The goal of JARVIS Civic is simple:
Make reporting a civic problem as natural as having a conversation, while making the resulting workflow more structured, auditable, and controlled.
Speak. Report. Resolve.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

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

Loading recommendations

Loading article