Inspiration

Kenya’s "Water Towers" and biodiversity hotspots are the lifeblood of our ecosystem, yet they are under constant threat from silent, incremental environmental crimes. Illegal logging and poaching often occur in remote, unmonitored regions where damage is only discovered weeks after the fact. We were inspired to create a persistent sentinel—an AI that doesn't just "see" an image, but "understands" the temporal evolution of a landscape. We wanted to give wildlife rangers a "Force Multiplier" that combines high-altitude satellite telemetry with localized ground intelligence.

What it does

Mazingira AI is an autonomous "Marathon Agent" designed for environmental protection. Surveillance: It ingests multispectral satellite and drone imagery to detect illegal logging, poaching camps, and pollution. Cognitive Reasoning: Using a "Marathon" logic, it maintains "Thought Signatures" to distinguish between natural seasonal shifts and human encroachment (Temporal Variance). Grounding: Every detection is cross-verified via Google Search Grounding to provide rangers with legal context and real-time environmental news. Multimodal HQ: A tactical terminal allows rangers to interact via Voice (STT), receive Audio Briefings (TTS), and generate Cinematic Video Simulations (Veo) of detected threats to plan tactical deployments.

How we built it

The application is built with a modern React + TypeScript frontend , backend Supabase structure and a specialized AI core powered by the Gemini API: Gemini 3 Pro: Handles high-budget multimodal reasoning and vision analysis of satellite sectors. Gemini 3 Flash: Provides the low-latency "HQ Liaison" conversational interface. Gemini 2.5 Flash TTS: Delivers professional-grade audio briefings for field accessibility. Veo (veo-3.1-fast-generate-preview): Generates 4K tactical simulations of incidents to help rangers visualize terrain before a mission. Google Search Grounding: Ensures all agent findings are anchored in real-world facts and environmental law.

Challenges we ran into

One of the primary challenges was Temporal Variance. Distinguishing between a forest clearing (illegal logging) and natural deciduous shedding required fine-tuning the prompt engineering to utilize "Marathon" reasoning—forcing the model to explicitly compare current imagery against historical "Thought Signatures." We also worked hard to mitigate race conditions in the Veo video generation pipeline to ensure a smooth, reassuring user experience during the heavy rendering process.

We also had the challenge of getting cost effective UI /UX design platform to think through the application.

Accomplishments that we're proud of

The capability to explore and make use of the super features of Gemini 3 and aistudio Multimodal Synergy: We successfully combined Vision, Text, Audio, and Video into a single cohesive "Liaison" interface. Marathon Agent Model: Creating a system that feels like a persistent partner with memory, rather than a stateless chatbot. Accessibility: Implementing hands-free voice control and high-fidelity TTS ensures that rangers in rugged field conditions can still access mission-critical data.

What we learned

We discovered that the true power of the Gemini 3 series isn't just in its raw output, but in its reasoning budget. By allowing the model to "think" before answering, we achieved significantly higher precision in identifying subtle environmental signatures. We also learned how vital Grounding is for specialized fields like conservation, where hallucinated coordinates or laws could have real-world consequences.

What's next for MazingiraGuard AI: Autonomous Environmental Protection Agent

Partner with county and National Government to see the solution Implemented Aim towards scaling globally with the aim towards sustainable Future For All Real-time Drone Integration: Streaming live telemetry directly from field-deployed UAVs into the Marathon Agent. Predictive Heatmapping: Using historical "Thought Signatures" to predict which forest sectors are most at risk of encroachment in the next 30 days. Community Ground-Truth: A mobile app for local communities to upload "Citizen Science" data that the agent can use to further ground its satellite findings.

Built with

Core Framework: React 19 & TypeScript for a type-safe, high-performance frontend. Styling: Tailwind CSS for a modern "Tactical Command" interface and FontAwesome for professional iconography. Primary AI Engine: Google Gemini API (using the @google/genai SDK). Advanced Models: Gemini 3 Pro: Powers the "Marathon Reasoning" for satellite imagery analysis. Gemini 3 Flash: Provides the low-latency conversational Liaison terminal. Gemini 2.5 Flash TTS: Generates high-fidelity audio briefings for field accessibility. Veo 3.1 Fast: Creates cinematic 4K simulations of environmental threats.

Grounding & Data:

Google Search Grounding: Cross-verifies AI detections with real-time environmental laws and news. Web Audio API: Implements custom raw PCM decoding for Gemini's audio modal responses. Speech Recognition API: Enables hands-free "Terminal Command" input for rangers in the field.

Mental Conceptual Model and Principles of Design

We followed the "Tactical Command" design principle: High Contrast & Visibility: A dark-mode Emerald Forest theme designed for both night-time HQ and daylight field use. Persistence: The UI emphasizes the "Agent Intelligence Log," reminding the user that the system is constantly patrolling even when they are offline. Cognitive Transparency: We chose to "Reveal Agent Cognition," allowing rangers to see exactly why the AI flagged a sector, fostering trust through shared reasoning.

Architecture Diagram

[ Satellite/Drone Feeds ] | v [ Gemini 3 Pro Vision ] <--- [ Historical Persistence (Thought Signatures) ] | +---> [ Reasoning Chain Analysis ] | | | v | [ Google Search Grounding ] ---> [ Verified Incident Report ] | | v v [ HQ Terminal (Flash) ] <--- [ Multimodal Output: TTS / Veo Video / Map GIS ]

Our Call to Action

Protect the Heart of Africa. Environmental crime is a silent war against our future. By arming our protectors with autonomous, grounded intelligence, we can ensure that Kenya's forests remain standing for generations to come. Join us in scaling Mazingira AI to every protected ecosystem across the continent.

Share this project:

Updates