Inspiration

Moving to a new city is exciting, but it often comes with a steep learning curve regarding local safety. As students from St. Louis, we realized that while GPS apps are great at finding the fastest route, they are "safety-blind" which often leads newcomers through high-crime areas or active incidents just to save two minutes. We wanted to build a tool that gives people "Street Smarts" instantly, using real-time AI to bridge the gap between static crime statistics and the living, breathing reality of city streets.

What it does

StreetSmarts is a map-first safety intelligence platform. It provides users with a real-time "risk heatmap" generated by an autonomous multi-agent AI system.

  • Safety-First Routing: Unlike traditional GPS, our "Safety First" option generates multiple candidate routes and selects the one with the lowest risk score, even if it adds a few minutes to the trip.
  • Real-Time Intelligence: A background pipeline scrapes news and public data every 20 seconds to update the map with active incidents.
  • Risk Analysis: Users can click any coordinate to get a detailed breakdown of risk factors (crime, public safety, infrastructure) and see nearby "Safe Spaces" like hospitals and police stations.

  • Frontend: A single-page application built with React 19 and Vite. We used Mapbox for the core experience, designing overlay panels to ensure zero page reloads.

  • Backend: A FastAPI server managing a SQLite database.

  • The AI Agent Pipeline: We deployed a multi-agent system using Vultr AI and Gemini. This includes a query_planner to search for local news, a scraper_agent to extract details, and a validator_agent specifically designed to cross-check data and eliminate AI hallucinations.

  • The Algorithm: We developed a custom "Generate-and-Test" routing algorithm. It calculates risk using a Gaussian distance decay and penalizes high-risk zones quadratically to ensure the "Safety First" route stays far away from "red zones."

Challenges we ran into

The single biggest technical hurdle was hitting the "glass ceiling" of Gemini API rate limits. Our multi-agent pipeline is heavily communicating with three distinct agents (Scraper, Validator, and Ciriticality Agent) constantly communicating to verify urban data, and we quickly exhausted our Calls Per Minute (CPM) even after aggressive prompt optimization.

To keep our 20-second live background loop functional, we migrated our core inference to Vultr AI. This was a turning point for the project. By switching to Vultr, we were able to orchestrate a diverse model stack without the friction of rate limits. We strategically deployed the DeepSeek model for deep reasoning and complex data extraction, while utilizing GPToss for high-speed validation and cross-referencing. This hybrid approach didn't just solve our rate-limiting issues; it actually made our pipeline more resilient by reducing single-model bias and eliminating empty API returns.

Accomplishments that we're proud of

We are incredibly proud of the routing engine. Seeing the app successfully identify a route that was 7 minutes longer but avoided a 26% risk spike in Downtown St. Louis felt like a "Eureka" moment. We also achieved a highly responsive UI where complex risk stats and live feeds feel like a natural part of the map experience, rather than a cluttered dashboard.

What we learned

We learned a massive amount about Agentic Workflows. Moving from a single prompt to a 3-agent pipeline (Scraper -> Validator -> Criticality) taught us how to build robust AI systems that self-correct. We also gained deep experience in spatial indexing and performing nearest-neighbor queries on coordinate grids to keep our risk lookups fast enough for real-time navigation.

What's next for Street Smarts

We want to make StreetSmarts more customizable. Our next steps include:

  1. Allow users to select their city and save their own locations as safe places
  2. Crowdsourced Reporting: Adding a "social feed" where users can report "sketchy" vibes or minor incidents in real-time to supplement official news.
  3. Predictive Modeling: Using historical data to predict risk "spikes" before they happen based on time of day or local events.

Built With

Share this project:

Updates