Inspiration

What it does

πŸ’‘ Inspiration

Modern cities handle thousands of municipal infrastructure emergencies every dayβ€”from catastrophic water main bursts and electrical transformer explosions to hazardous road sinkholes. Today, the process of triaging 311 citizen calls, evaluating damage, dispatching specialized certified contractors, and notifying the public is slow, manual, and prone to human bottlenecks.

During critical emergencies, delays in dispatching crews or communicating safety perimeters can lead to property damage or loss of life. We were inspired to build CivicPulse DPI Taskmasterβ€”an autonomous Digital Public Infrastructure (DPI) agent that operates beyond standard conversational chatbots. It acts as an autonomous coordinator that ingests multimodal visual reports and IoT sensor streams, conducts rigorous structural damage triage with Gemini 3.5 Flash, assigns contractor fleets by geo-proximity, creates immutable Cloud Firestore work orders, and broadcasts emergency escalations in seconds.


⚑ What It Does

CivicPulse DPI Taskmaster is an event-driven, autonomous taskmaster designed for municipal emergency operations. Rather than just generating text, the agent executes a complete 6-step autonomous operational pipeline:

  1. Multimodal Ingestion: Ingests citizen 311 photo reports or autonomous Google Cloud Pub/Sub & IoT sensor telemetry (grid voltage spikes, pipe pressure drops).
  2. Computer Vision Damage & Risk Analysis: Leverages Gemini 3.5 Flash with structured JSON output schemas to calculate hazard severity ($\text{Severity} \in {\text{LOW}, \text{MEDIUM}, \text{HIGH}, \text{CRITICAL}}$), priority score ($1 - 10$), and SLA resolution targets ($2\text{h} - 48\text{h}$).
  3. Asset & Fleet Registry Matching: Dynamically queries municipal asset registries and matches the closest certified emergency contractor unit based on spatial proximity, certification, and live ETA.
  4. Digital Work Order Creation: Automatically writes the authenticated ticket into Google Cloud Firestore (/work_orders), calculates budget allocations with contingency buffers ($\text{Budget} = \text{Base} \times 1.25$), and stamps each ticket with a cryptographic SHA-256 DPI verification hash (0xdpi_...).
  5. Emergency Escalation Bus: Automatically triggers urgent SMS and CAD emergency pager alerts for critical and high-severity incidents.
  6. Citizen Live Tracking Broadcast: Generates a public citizen tracking link (/track/WO-2026-XXXX) with an active SLA resolution countdown clock.
  7. OpenTelemetry Observability: Records end-to-end W3C distributed traces with root and child tool spans (dpi.multimodal_ingestion, firestore.create_work_order, telecom.dispatch_sms), proving execution transparency.

πŸ—οΈ How We Built It

  • AI Reasoning Engine: Built using Gemini 3.5 Flash via the official Google GenAI SDK (@google/genai) with strict JSON schema constraints for structured parameter generation.
  • Agent Architecture: Designed around the Google Agent Development Kit (ADK) and Antigravity SDK runtime patterns for autonomous tool execution and state transitions.
  • Data Persistence: Google Cloud Firestore collection architecture (/work_orders, /assets, /contractors, /telemetry_logs) providing durable cross-session state.
  • Observability: W3C OpenTelemetry distributed tracing visualizer with latency waterfall timelines and cryptographic audit hashes.
  • Frontend Console: Built with React 19, TypeScript, Tailwind CSS, Lucide Icons, and Motion for a reactive municipal mission control dashboard.
  • Deployment: Serverless containerization on Google Cloud Run configured with min-instances: 0 for zero idle cost.

πŸ§— Challenges We Ran Into

  • Multimodal Visual Grounding: Ensuring the vision model consistently generated strict structured JSON while classifying nuanced structural damage (e.g., distinguishing high-voltage transformer arcing from standard wire drops). We resolved this by defining rigid Type.OBJECT response schemas with @google/genai.
  • Latency & Cost Optimization: Ensuring the entire 6-step multi-tool workflow executed in under 1 second with near-zero inference cost. By standardizing on Gemini 3.5 Flash, inference latency remained under 500ms at approximately $\$0.000031$ per triage.
  • Distributed Observability: Correlating asynchronous IoT webhook events to child tool execution spans in OpenTelemetry without adding overhead.

πŸ† Accomplishments That We're Proud Of

  • Built a true autonomous Taskmaster that eliminates manual dispatch coordination and cuts municipal response times from hours to seconds.
  • Integrated end-to-end OpenTelemetry auditability, providing municipal operators with complete transparency over every autonomous decision and tool execution.
  • Created an intuitive Citizen Live Tracking Portal that empowers the public with transparent SLA resolution countdowns and repair verification.
  • Designed a serverless architecture on Google Cloud Run that scales to zero when idle, ensuring $\$0$ standby cost.

πŸ“š What We Learned

  • How to harness Gemini 3.5 Flash for high-speed multimodal computer vision analysis and deterministic tool calling.
  • How to structure enterprise agent systems using Google ADK / Antigravity SDK patterns with resilient state persistence in Cloud Firestore.
  • The importance of cryptographic verification hashes and OpenTelemetry observability in building trustworthy Digital Public Infrastructure.

πŸš€ What's Next for CivicPulse DPI Taskmaster

  • 911 Audio Dispatch Ingestion: Adding real-time multimodal audio processing for emergency dispatch calls.
  • Automated Drone Inspection Integration: Autonomous dispatch of municipal inspection drones to stream aerial video directly to Gemini for pre-arrival damage assessment.
  • Inter-Agency Data Federation: Cross-city federation connecting police, fire, water, and power authorities across regional boundaries.

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for CivicPulse: Autonomous DPI Emergency Dispatcher

Built With

  • antigravity-sdk
  • computer-vision
  • digital-public-infrastructure
  • express.js
  • gemini-3.5-flash
  • google-adk
  • google-cloud-firestore
  • google-cloud-run
  • google-genai-sdk
  • iot-telemetry
  • multimodal
  • node.js
  • opentelemetry
  • react
  • rest-api
  • tailwind-css
  • typescript
  • vite
  • webhooks
Share this project:

Updates

Submission history