Inspiration
Inspired by widespread reports of police brutality and illegal detention across Nigeria, particularly during the #EndSARS protests, we recognized the urgent need for citizens to have immediate legal protection during encounters with law enforcement. Many Nigerians lack access to legal representation when their constitutional rights are violated. We built this AI companion to level the playing field and ensure every Nigerian can defend their rights, regardless of their legal knowledge or economic status.
What it does
Legal Protector AI is a voice-activated constitutional rights defender that provides real-time legal advocacy during police encounters in Nigeria. The dual-agent system records high-fidelity audio evidence, cites relevant sections of the Nigerian Police Act, and automatically uploads evidence to secure cloud storage if the user goes silent for 30 seconds. It gives every Nigerian a personal lawyer in their pocket, ready to intervene 24/7.
How we built it
We built it using React and TypeScript for the frontend, integrating Google's Gemini 2.5 Flash for native audio processing and real-time voice interaction. The dual-agent architecture uses function calling to trigger evidence collection, with automatic WAV encoding for audio preservation and AWS Lambda for emergency evidence distribution. Voice biometric enrollment adds an extra security layer to prevent unauthorized activation.
Challenges we ran into
Implementing the dual-agent system where Agent 1 speaks while Agent 2 silently records proved technically complex, requiring precise coordination through function calls. Ensuring real-time transcription accuracy with Nigerian accents and local pidgin English was challenging. The biggest hurdle was balancing immediate evidence capture with the 30-second idle detection while maintaining seamless audio recording throughout unpredictable police encounters.
Accomplishments that we're proud of
We're proud of achieving true real-time transcription that captures every word as it's spoken, giving users immediate feedback during high-stress situations. The automatic idle detection and cloud upload system ensures evidence is preserved even if a user's phone is confiscated or destroyed. Most importantly, we created a tool that empowers ordinary Nigerians to stand up to police abuse with the full weight of constitutional law backing them.
What we learned
We learned that building AI for crisis situations requires ruthless prioritization of reliability over features—every millisecond of delay could mean lost evidence. Working with voice biometrics taught us the importance of privacy-first design in surveillance-heavy environments. Most profoundly, we discovered that technology can be a powerful equalizer, giving marginalized communities access to legal protection that was previously reserved for the privileged few.
What's next for Legal Protector AI
We're developing an add-on integration for modern car systems (2014+) that auto-activates during traffic stops, seamlessly embedding legal protection into daily commutes. We're also building plugins for popular AI assistants like Siri, Google Assistant, Alexa, and Bixby, making constitutional defense as simple as saying "Hey Siri, protect my rights." Additionally, we're expanding to cover tenant rights, workplace harassment, and other common legal violations faced by everyday Nigerians.
Built With
- amazon-web-services
- django
- fastapi
- gemini
- google-ai-studio
- google-gen-ai
- python
- react
- typescript
Log in or sign up for Devpost to join the conversation.