Inspiration The inspiration for CivicGuard AI came from my personal experience with AI development and witnessing how it transformed smaller businesses by cutting through bureaucratic red tape. Having personally struggled with bureaucracy and seeing how citizens often get lost in the maze of public services, I realized AI could revolutionize public safety reporting. The endless phone transfers, long wait times, and language barriers that prevent people from getting help inspired me to create a solution that makes public safety services instantly accessible to everyone. What it does CivicGuard AI is an intelligent public safety assistant for Indianapolis that handles both emergency and non-emergency situations through multiple channels:
Instant Report Filing: Citizens can report burglaries, potholes, accidents, and other issues directly through chat or voice, receiving immediate reference numbers Multi-Channel Access: Available via web chat, phone calls (+1 463-300-6824), and SMS Emergency Detection: Automatically identifies emergencies and can immediately connect callers to 911 Status Tracking: Provides real-time updates on previously filed reports using reference numbers Multilingual Support: Operates in 6 languages (English, Spanish, Chinese, Burmese, French, Arabic) to serve Indianapolis's diverse population 24/7 Availability: Never closes, always ready to help
How we built it The technical stack combines several powerful technologies: Twilio Integration: We leveraged Twilio's Voice API and Media Streams for natural phone conversations. The system uses:
TwiML (Twilio Markup Language) for call flow control Speech recognition through Twilio's Gather functionality Neural text-to-speech voices (Polly.Joanna-Neural) for natural responses SMS messaging capabilities for text-based reporting
OpenAI Integration: The AI brain uses OpenAI's GPT-4 for conversation understanding and generation:
Whisper API for accurate speech-to-text transcription GPT-4 for contextual understanding and natural responses Text-to-speech API for voice responses in the web interface Custom system prompts to maintain helpful, empathetic conversations
Backend Architecture:
Flask web framework for API endpoints PostgreSQL database for storing reports and conversation history Real-time session management for maintaining context RESTful API design for frontend communication
Challenges we ran into The biggest challenge was the unavailability of Indianapolis's public data APIs. The data.indy.gov JSON endpoints were non-functional, forcing us to pivot our approach:
Had to research alternative data sources like ArcGIS REST APIs Implemented fallback mechanisms for when real-time data isn't available Created mock data structures for testing while maintaining compatibility with future real APIs Spent considerable time finding actual emergency contact numbers and city resources
Database integration complexities:
Designing a schema that could handle various report types Implementing conversation history tracking for context retention Creating efficient queries for quick report status lookups
Voice interaction challenges:
Balancing natural conversation flow with structured data collection Handling interruptions and partial speech results Ensuring the AI doesn't overwhelm callers with too many questions at once
Accomplishments that we're proud of Successfully integrated multiple complex technologies into a cohesive system:
Seamless Twilio-OpenAI integration for natural voice conversations Real-time language switching across 6 languages Database system that actually remembers conversations and can retrieve report statuses Emergency detection system that can differentiate between urgent and non-urgent situations Reference number generation and tracking system Natural conversation flow that asks one question at a time instead of overwhelming users
Created a genuinely helpful AI that takes action rather than just redirecting to phone numbers. What we learned
The importance of fallback systems when dealing with government APIs Natural conversation design is crucial for voice interfaces - people don't want to talk to forms Multi-language integration requires careful consideration of context and cultural nuances Database design for conversational AI needs to balance performance with context retention Real-time systems require robust error handling and timeout management User experience in emergency situations demands instant response and clear communication
Technical insights:
Twilio's webhook system requires proper content-type headers and XML responses OpenAI's new client structure (client.chat.completions.create) is more intuitive than the old API Session management is critical for maintaining conversation context PostgreSQL JSONB fields are perfect for storing flexible report details
What's next for CivicGuard AI The vision is to license CivicGuard AI to the Indianapolis Mayor's Office as a official public safety platform. Future enhancements include: Technical Roadmap:
Integration with actual city databases when APIs become available Computer vision for analyzing uploaded photos of potholes, damage, etc. Geo-location services for automatic address detection Real-time officer dispatch integration Analytics dashboard for city officials to track report trends
Business Development:
Presenting to the Mayor's Office for official adoption Exploring partnerships with other city departments Potential expansion to other cities (rebranding as needed) SaaS model for municipal governments Integration with existing 311 systems
Feature Expansion:
Push notifications for report status updates Community safety alerts Predictive analytics for crime prevention Integration with city IoT sensors Mobile app development
The goal is to transform how citizens interact with their local government, making public safety services as easy as talking to a helpful friend.
IMPORTANT DISCLAIMER
This is a demonstration project created for educational and hackathon purposes.
Database Note
- This demo uses local JSON file storage instead of PostgreSQL to avoid database hosting costs
- For production use, a proper database system would be required
Intended Use This project is intended to:
- Demonstrate the concept to city officials
- Show AI integration capabilities
- Serve as a prototype for funding discussions
- Display in portfolio/hackathon submissions
This is NOT a production-ready system and should not be used for actual emergency services without proper infrastructure and security measures.
Log in or sign up for Devpost to join the conversation.