Inspiration

As computer science students traveling around Delhi, we realized that traditional transit databases and mapping apps are incredibly rigid. They require every single line and timetable to be perfectly hardcoded; if data is missing, the system breaks. We wanted to see if we could build a dynamic system inspired by how humans actually navigate—using large language models to reason through a transit network on the fly, simulating paths, suggesting precise station exits, and estimating last-mile fares just like a seasoned local commuter would.

What it does

One Delhi is an agentic transit journey simulator for Delhi NCR. It takes natural, chaotic language inputs and processes them through a multi-agent AI pipeline. It calculates the absolute shortest path across a local NetworkX graph dataset, but its real power lies in its LLM orchestration. Using LangGraph and OpenAI, the system generates contextual transit logic. It actively reads the time of day to determine the best last-mile transport (e.g., EV bikes for daytime, cabs for late night), calculates realistic dynamic fare estimates, and constructs full end-to-end travel strategies.

How we built it

We engineered a software-only, state-managed pipeline deployed on a custom Streamlit frontend. The core setup uses LangGraph to pass state data across a robust 4-agent workflow:

  • Agent 1 (NLP Translator): Standardizes chaotic user inputs into clean location tokens.
  • Agent 2 (Graph Router): Queries a local .gpickle graph of the metro network using a custom multi-property fuzzy matcher, running Dijkstra’s shortest-path algorithm. It includes an LLM fallback emulation layer to prevent application crashes.
  • Agent 3 (Last-Mile Context Engine): A heuristic pricing agent that reads the local machine time, suggests realistic Metro Gate exits, and calculates dynamic last-mile fare estimates in INR based on standard Delhi baseline rates.
  • Agent 4 (Strategy Formatter): Compiles the complex state data into a highly readable, markdown-formatted consumer UI complete with mock deep-links for booking rides.

Challenges we ran into

Handling the stochastic nature of Large Language Models in a domain that usually relies on hard math was a massive hurdle. When we used OpenAI, the model's tendency to follow formatting instructions literally broke our string parser, forcing us to build a highly generalized multi-property matcher to prevent graph traversal failures. Furthermore, since we didn't have live API keys for ride-hailing services, we had to engineer a prompt-anchored heuristic engine that forces the LLM to calculate realistic last-mile fares based on injected regional metrics rather than hallucinating random numbers.

Accomplishments that we're proud of

We are incredibly proud of building a functional, 4-agent LangGraph system as first-year CSE students. Setting up a state machine that successfully passes variables between deterministic Python data structures and an external LLM pricing engine—while gracefully recovering from parsing errors without crashing the UI—feels like a massive engineering win.

What we learned

We learned a massive lesson in state management and the unpredictability of agentic workflows. We discovered how to use prompt engineering to enforce strict guardrails, preventing the LLM from losing the physical constraints of the Delhi map. We leveled up our understanding of graph data structures in NetworkX, and mastered fast UI rendering using custom CSS in Streamlit.

What's next for One Delhi

The next immediate step is replacing our heuristic pricing engine with live API integrations (like Uber or Rapido) to enable real 1-click booking directly from the itinerary screen. We also plan to ingest live GTFS feeds for DTC buses into the NetworkX graph edges so the agents can reason across real-world bus schedules and dynamic traffic conditions.

Built With

Share this project:

Updates

Submission history