This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
Khoj (ΰ€ΰ₯ΰ€) β Don't Follow the Map. Follow Your Curiosity.
What I Built
What if your phone gave you a reason to explore your city instead of another reason to stare at a screen?
We pass the same streets, buildings, markets, and waterfronts every day. We use maps to get from one place to another, but how often do we stop to notice the world around us?
I built Khoj (ΰ€ΰ₯ΰ€, "search" or "discovery"), an open-source, offline-first AI exploration companion that turns a walk around your city into a curiosity-driven adventure.
Starting with Mumbai, Khoj encourages people to step outside, observe their surroundings, and discover something new through short, guided exploration missions. Instead of simply telling you where to go, it gives you a reason to pay attention once you get there.
With Khoj, you can:
- π§ Choose an exploration duration and area of interest.
- πΏ Get a curiosity-driven mission grounded in a curated Mumbai city knowledge pack.
- π Explore the real world and record your own observations, notes, and discoveries.
- π Turn those observations into a personal field journal.
- πΆ Keep using the cached app when connectivity is unreliable.
The idea is simple: the phone gives you a question. The city gives you the answer.
The goal isn't to keep people chatting with an AI. It's to use AI to give them a reason to leave the screen.
How a Khoj Exploration Works
1. Start with curiosity
Choose an area of Mumbai and decide how much time you want to spend exploring. The experience is built around a manageable mission rather than a rigid itinerary.
2. Receive a mission
Khoj uses curated city knowledge to generate or select a mission that encourages you to notice something about your surroundings. The aim is to make an ordinary walk feel like an opportunity for discovery.
3. Look up from the screen
This is the most important part. Put the phone away, look around, and pay attention to details you might otherwise miss. When something catches your attention, record it in Khoj.
4. Keep what you discovered
Your observations become the foundation for a personal field journal. Khoj turns what you've recorded into a reflection without presenting unobserved details as facts about your experience.
The mission provides direction. You provide the curiosity.
A mission, start to finish
Mission: [paste a real mission Khoj gave you]
What I noticed: [2β3 real observations from your walk]
Journal entry: [an excerpt of the journal Khoj produced from those observations]
Demo
[One line on what the video shows, e.g. "A local Gemma-generated mission, the validation step, an observation, and the journal."]
Live demo: Try Khoj on Render
GitHub repository: [Shanaya31/Khoj]
Shanaya31
/
Khoj
Open-source, offline-first AI exploration companion that turns city walks into curiosity-driven missions and a personal field journal.
Khoj (ΰ€ΰ₯ΰ€)
Don't follow the map. Follow your curiosity.
Khoj is an open-source, offline-first AI exploration companion for discovering the city around you. Starting with Mumbai, it offers curiosity-driven missions, lets you record what you notice, and helps you turn those observations into a personal field journal.
Built for the Hacktoberfest 2026 Open-Source AI Challenge, Week 1: Touch Grass.
Khoj doesn't tell you where to go. It gives you reasons to look around.
Table of Contents
- See Khoj in Action
- How It Works
- Offline-First Design
- AI and Fallback Behavior
- Run Locally
- Technical Architecture
- API Reference
- Current Limitations
- Contributing
- License
See Khoj in Action
The following screenshots show the application and its exploration experience.
How It Works
- Choose: Select an exploration duration and an interest.
- Discover: Receive a mission with prompts that encourage curiosity about your surroundings.
- Explore: Head outside and record observations and notes.
- β¦
An important distinction: The hosted demo does not run Gemma inference. It uses the curated fallback experience. Local Gemma inference is supported when running Khoj with Ollama configured, and the video above shows it.
I tested Khoj's offline behaviour using Chrome DevTools' Offline network setting. After the application had been cached, I could refresh the page and still access the field journal, including the observation saved on the device.
The screenshot below shows the application remaining accessible while the browser is offline. Some network requests fail as expected, but the cached interface and locally saved observation remain visible.
![Khoj working offline in Chrome DevTools]

For the best offline experience, open the app while online first so its app shell and required assets can be cached. Locally saved observations are stored on the device and are not automatically synced to the server.
How I Built It
I built Khoj around a simple principle: AI should help people engage with the real world, not give them another reason to stay online.
USER: Choose duration + area of interest
|
v
+-------------------------------------------+
| React + Vite + Tailwind |
| Service worker: cache app shell/assets |
| Browser storage: session + observations |
+----------------------+--------------------+
| API request
v
+-------------------------------------------+
| FastAPI Backend |
| Curated Mumbai city knowledge pack |
| Mission prompt + grounding rules |
+----------------------+--------------------+
|
v
+-------------------------------------------+
| Mission Generation |
| |
| LOCAL: Gemma 3 4B via Ollama |
| HOSTED: Curated fallback (Render) |
+----------------------+--------------------+
|
v
+-------------------------------------------+
| Validation / Fallback |
| Check generated mission against rules |
| Use curated mission when needed |
+----------------------+--------------------+
|
v
+-------------------------------------------+
| Frontend displays mission |
| |
| Field Journal |
| Observations saved in browser storage |
| Reflection based on saved observations |
| Cached app + local data available offline |
+-------------------------------------------+
A lightweight, open-source stack
- Frontend: React, Vite, and Tailwind CSS
- Backend: Python and FastAPI
- Storage: SQLite and browser-side storage
- AI: Gemma 3 4B through Ollama for local inference
- Offline support: Service worker caching and locally available city data
- Deployment: Docker and Render
Grounding AI in a real city
Generative AI can produce convincing text, but a convincing mission isn't useful if it sends someone to the wrong place.
Khoj uses a curated Mumbai city knowledge pack to ground missions in known places and local context. Generated output is validated, and unsupported place or fact references are removed or handled through curated fallback behaviour. [Add one concrete example of what the validator catches, e.g. "a place name that isn't in the city pack."]
I also refined the mission-generation prompts to reduce irrelevant locations and keep missions aligned with the selected area and duration. [Optional: add one before/after example.]
The principle is straightforward: AI can help shape the experience, but it shouldn't invent the map.
Local Gemma, with a fallback path
Khoj supports Gemma 3 4B through Ollama for local mission generation. The model receives city context to help generate relevant exploration missions.
When generation is unavailable or produces unusable output, Khoj falls back to a curated mission, so the app still works. These are separate execution modes: local inference requires Ollama and the model to be available, while the hosted demo currently uses the fallback experience.
Offline-first exploration
Connectivity isn't always reliable, especially when you're out exploring.
Khoj uses service worker caching for the app shell and static assets, alongside browser-side persistence for the active exploration session and observations. I tested the cached experience by switching the browser offline and refreshing the application, so the essential exploration flow stays resilient when the network doesn't cooperate.
Reflections grounded in real observations
An AI-generated journal can sound polished while quietly adding things a user never experienced. For an exploration companion, that defeats the purpose.
Khoj's reflection flow is designed to use the observations a person has saved as its source of truth. The intention is to help users reflect on what they noticed, rather than inventing a more interesting story on their behalf.
During development, I tested the backend, frontend build, and automated tests, and refined the generation and validation logic to improve reliability.
Why Does Open Innovation Matter?
- No mandatory hosted API. Running the open-weight Gemma model through Ollama means mission generation doesn't have to depend on a paid, remote service. That matters for a project meant to work wherever you are.
- Everything can be inspected. Because the whole stack is open, I could see and change how missions are generated, why one is accepted or rejected, and how data is stored. That made it possible to tighten grounding when the model invented details.
- Resilience. Cached data and curated fallback missions keep the experience useful when generation or connectivity isn't available.
- A city is just data. A knowledge pack is separate from the model, so anyone can add their own city without retraining anything. A longer-term direction is a community-built collection of city packs.
For me, open innovation isn't only about making the code available. It's about giving people the freedom to understand, adapt, and build on the ideas behind a project.
Current Limitations
- The hosted demo runs in curated-fallback mode; Gemma needs a machine with Ollama, so the AI part currently lives on a laptop, not a phone.
- Only Mumbai is supported right now.
- Observations are saved on the device and are not synced.
What I Learned
Building Khoj reinforced a lesson about AI products: generating text is easy compared with generating something genuinely useful.
The difficult parts include keeping missions grounded in real geography, making short explorations realistic, handling model failures, preserving observations, and making sure reflections don't claim more than users actually recorded. Those constraints shape whether the product deserves the user's trust.
For Khoj, a smaller, grounded mission is better than an impressive-sounding one that sends someone to the wrong neighbourhood.
Prize Categories
- Overall Winner: Turns city exploration into curiosity-driven missions, with an offline-first design that sends people out of the app and into the city.
- Best Use of Gemma: Gemma 3 4B through Ollama generates missions locally, with curated Mumbai data, grounding rules, validation, and fallback keeping them tied to real places.
- Best Use of Render: The live demo is deployed on Render (running curated fallback missions; local Gemma is supported through Ollama).
Final Thoughts
Khoj started with a simple question: can AI help us pay more attention to the world instead of keeping us glued to a screen?
I built it as a small step toward making everyday exploration more intentional: one area, one mission, and one observation at a time.
Khoj isn't about seeing more of your phone. It's about seeing more of your city. πΏποΈ
What's something in your city you walk past every day and have never really looked at?















Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.