Here is a realistic, authentic, human-written version with all # symbols completely removed. You can copy and paste this directly into your submission box: Inspiration Smart cities generate gigabytes of IoT sensor data every minute, but when a real crisis strikes—like flash flooding, power grid tripping, or traffic gridlock—city operators face total data overload. Continuous raw time-series logs make it almost impossible to quickly answer three simple questions: What state actually changed? Why did it change? And how did we successfully handle a similar incident in the past? Existing smart city tools are built mainly as real-time visual dashboards. They show you what is happening right now, but they lack long-term memory and contextual history. We built CityMind to fix this by introducing a version-controlled, event-driven memory operating system for urban infrastructure. What it does City Mind treats urban state changes like a Git repository. Instead of saving continuous 24/7 raw sensor values, it records state diffs called City Commits whenever significant events happen—such as sensor threshold breaches, structural anomalies, citizen reports, or agent observations. Each commit receives an immutable SHA-256 hash, creating a clear history of city events. With City Mind: City operators can query historical events semantically to see how past urban crises were resolved. Autonomous AI agents (Traffic, Environmental, Water, Emergency) run on top of this shared memory to evaluate issues and coordinate evidence-backed responses. Responders get targeted, real-time alerts dispatched automatically during emergencies. How we built it We built City Mind with a fast, modern stack focused on eliminating database synchronization overhead: Cockroach DB Distributed Vector Indexing: We used CockroachDB's native VECTOR(384) type and cosine vector search to co-locate vector embeddings directly alongside operational state diffs in a single database. Google Gemini API: Generates 384-dimensional semantic embeddings for event state diffs and powers RAG reasoning over historical city commits. AWS Infrastructure: We integrated Amazon DynamoDB for persistent state diff archival, Amazon SNS for emergency push alerts, and Amazon S3 for telemetry snapshot storage. Backend: Built with Python 3.10+ and FastAPI, managed asynchronously with uv. Frontend: Built with React, Vite, and custom CSS to deliver a clean command dashboard with real-time commit streaming and analytics graphs. Challenges we ran into Filtering Signal from Noise: Setting up state diff thresholds so that normal background telemetry isn't recorded as a commit, but every meaningful anomaly is captured. Vector Data Co-location: Avoiding the complexity of dual-writing to separate vector databases by bringing distributed vector indexing directly into Cockroach DB. Multi-Agent Coordination: Preventing domain agents (e.g., traffic rerouting vs. flood response) from making conflicting decisions by enforcing a single shared memory state. Accomplishments that we're proud of Successfully unified relational data and distributed vector search inside Cockroach DB. Built an explainable AI pipeline where every recommendation links directly to verified commit evidence and sensor metrics. Reduced stored telemetry noise by over 90% while keeping high-fidelity event history. What we learned Event-driven state diffing works remarkably well for IoT and physical city systems. AI multi-agent systems operate far more reliably when reading from an immutable versioned ledger rather than passing messages back and forth asynchronously. What's next for City Mind Integrating 3D Digital Twin visualization to replay historical commits spatially. Implementing citizen verification signatures to securely feed local community reports directly into city commit chains.
Built With
- amazon-web-services
- api
- cockroach
- python
- vite
Log in or sign up for Devpost to join the conversation.