Inspiration

Cities make policy decisions that ripple through everything at once: emissions, transportation, housing pressure, economic health, and public trust. We wanted to build a tool that makes those tradeoffs easier to explore in real time instead of hiding them behind static reports or disconnected dashboards.

The idea behind Toronto Climate Pulse was to create a city-scale "what if" simulator where a user can propose policies in plain language, see how multiple specialized AI agents interpret the change, and then view the combined effect on the overall state of the city. We were especially interested in making policy experimentation feel interactive and understandable rather than abstract.

What it does

Toronto Climate Pulse is an AI-powered urban policy simulator. A user can add or remove proposed policies, such as free public transit or zoning reform, and the system evaluates their likely impact across multiple dimensions. Specialized agents produce structured assessments, and the platform aggregates them into a shared city-state model.

The app presents the results through a modern web interface backed by a real-time WebSocket connection, so policy changes update the simulation immediately.

How we built it

We built the backend with FastAPI and a WebSocket-based event loop to support real-time interaction. The backend manages a shared policy registry and aggregates the outputs of multiple agent evaluations into a single city-state response.

The frontend was built with Next.js, React, and TypeScript. We used a component-driven UI to display the simulation state, policy history, and live updates in a way that feels closer to a command center than a traditional form-based app.

For the intelligence layer, we integrated an LLM endpoint that returns structured JSON with estimated policy impact, confidence, and reasoning. That output is then normalized and merged into the simulation engine.

Challenges we ran into

One of the biggest challenges was making LLM output reliable enough for a simulation workflow. Model responses are not always perfectly structured, so we had to build parsing and validation logic to extract clean JSON safely and clamp values into a consistent range.

Another challenge was keeping the frontend and backend synchronized in real time. Since users can add and remove policies dynamically, we needed a stable event model over WebSockets so the UI could react immediately without drifting from backend state.

We also spent time simplifying the user experience. Policy simulation tools can easily become overwhelming, so a big part of the work was deciding what to show, what to summarize, and how to make the interface feel fast and legible.

What we learned

We learned a lot about designing around uncertainty. When AI is part of the core loop, you need strong guardrails, validation, and transparent confidence signals instead of treating the model output as absolute truth.

We also learned how valuable event-driven architecture is for interactive simulation products. Separating agent evaluation, policy state management, and UI rendering made the system much easier to reason about and extend.

What's next

Next, we want to improve the realism of the simulation by grounding agent responses in more explicit city datasets, historical policy outcomes, and scenario constraints. We also want to add saved scenarios, shareable links, and side-by-side comparisons so users can test multiple policy packages more effectively.

Toronto Climate Pulse started as a way to make complex civic tradeoffs easier to explore, and we see it evolving into a collaborative tool for planners, students, and anyone curious about how policy choices shape urban futures.

Built With

Share this project:

Updates