Inspiration
My passion for geography started long before I wrote my first line of code.
As a child in China, I spun my globe tens of thousands of times, dreaming of the day I would walk on every continent. Whenever I took a train, I would stare out the window at the passing landscapes, endlessly wondering: How do the people here live? What are their customs? What do they eat for dinner? I was obsessed with the human stories behind the coordinates.
Climate was another obsession—born out of necessity. I live in an East Asian city with extreme seasons. The winters are freezing, and the summers are brutal, with temperatures soaring above 35°C (95°F) for sixty days straight. During those sweltering months, I desperately longed for an "anti-seasonal" escape—a place on the other side of the world where the air was cool and crisp.
When I got my first computer, I became a digital explorer, scouring every corner of Google Maps to find these climate havens. But I realized something was missing. Google Maps could tell me "Where" a place was, but it couldn't tell me the "Story." It couldn't explain the local vibe, the history, or whether it was the perfect escape for a heat-exhausted student.
I always dreamed of a "Map Encyclopedia"—an interactive guide that could narrate the world to me. For years, this was just a dream. But today, with the reasoning capabilities of Gemini 3 and the Action Era, I finally have the tools to build it.
GeoReason is not just a project; it is the realization of my childhood imagination.
What it does
GeoReason is an adaptive geospatial orchestrator that evolves based on your conversation flow. It is not a single tool, but a team of specialized AI agents working in harmony:
The Living Encyclopedia (Exploration Mode): This is the heart of the project. You don't just search for addresses; you explore stories.
Ask: "Show me the oldest castles in Europe and tell me their legends."
Ask: "Where exactly did the Allied forces land on D-Day in WWII?"
GeoReason doesn't just drop a pin; it narrates the history. It visualizes the Normandy beaches or the medieval fortresses on the map, providing rich, context-aware summaries that turn the globe into an interactive history book.
The Global Monitor (News Mode): Ask "Where is the biggest news happening right now?", and the agent uses Google Search Grounding to scan live events, extracts geolocation data, and pins them on the globe. You can see the world's pulse instantly.
The Contextual Expert (Weather & Vibe): If you complain, "Why is New York so freezing today?", the agent verifies real-time weather data to explain the polar vortex. Crucially, it uses Reasoning to detect your sentiment: frustration with the cold.
The "Magic Pivot" (Active Reasoning): Recognizing your desire for warmth, the agent proactively suggests: "Since you hate this cold, how about a trip to the Canary Islands where it's currently 25°C?" It transforms a complaint into an actionable plan.
The Autonomous Planner (Travel Mode): Once you say "Yes," the Travel Agent takes over. It generates a multi-day, multimodal itinerary—complete with flight routes, local cuisine recommendations, and "vibe checks"—visualized directly on the interactive map.
How we built it
We embraced the Gemini 3 family to build a true agentic workflow, moving beyond simple RAG.
The Brain (Gemini 3): We utilized the latest Gemini models for their superior Reasoning and Long Context capabilities. The model acts as a central router, deciding which tool to call based on user intent.
The Eyes (Google Search Grounding): To avoid hallucinations and provide real-time value, every news and weather query is grounded in live Google Search results.
The Canvas (Google Maps Platform): We used the Maps JavaScript API with Advanced Markers to render the AI's thoughts. The map isn't just a background; it's the dynamic interface where the agent's plans come to life.
The Agent Loop (ReAct Pattern): We implemented a custom Reason -> Act -> Observe loop. The backend doesn't just stream text; it streams structured JSON actions that control the frontend map camera and UI state.
Challenges we ran into
From Vague Text to Precise Coordinates: One of the hardest parts was getting the AI to map abstract concepts (like "a lonely place") to concrete lat/lng coordinates. Early versions would hallucinate locations. We solved this by implementing a Multi-Step Verification process: The Agent first searches for the place, then verifies the coordinates via Google Maps data before rendering.
The "Hallucination" of Structure: Ensuring Gemini always outputted strict JSON for our frontend to render was tricky. We utilized System Instruction Engineering and One-Shot Learning to enforce a strict schema, ensuring the map never crashes due to malformed data.
Balancing Latency vs. Intelligence: Deep reasoning takes time. We optimized the experience by implementing streaming responses, allowing the map to "fly" to a location while the detailed story was still generating.
Accomplishments that we're proud of
True Agentic Behavior: We successfully built a system that proactively suggests actions (Travel Planning) based on context, rather than just passively answering questions.
Seamless Multimodal Experience: The transition from a text conversation to a visual map flight feels magical. It turns "search" into "exploration."
Real-Time Grounding: Seeing breaking news appear on the map seconds after it happens is a powerful demonstration of the Gemini 3 era.
What we learned
Building GeoReason was a crash course in the future of AI. I moved beyond simple "prompt-response" interactions and learned how to architect a true AI Agent:
System Instruction Design: I learned that defining an Agent's "Soul" (Role, Goal, Tone) via System Instructions is just as important as the code itself.
The Art of Tool Use: I gained deep experience in defining tools (like Google Maps and Search) and teaching the model when and how to invoke them.
Reasoning & Task Decomposition: The most powerful lesson was learning how to make the Agent "Think before Acting." I implemented logic to decompose complex user requests (e.g., "Plan a warm trip") into smaller, executable steps.
The Thrill of Innovation: Working with the latest Gemini 3 family gave me a glimpse into the sheer power of the "Action Era." It has reignited my hunger for exploring fresh technologies.
What's next for GeoReason
Multimodal Input: Allowing users to upload a photo of a movie scene and ask, "Find me a place that feels like this."Direct Booking Integration: Connecting the Travel Agent to flight and hotel APIs to turn the plan into a real reservation.Personalized Memory: Remembering that the user "hates the cold" for future interactions to provide even better anti-seasonal recommendations.$$\text{GeoReason} = \text{Map} + \text{Gemini 3 Reasoning} + \text{Real-Time Action}$$
Built With
- agent
- google-ai-studio
- google-search-grounding
- multimodal
- next.js
- typescript
Log in or sign up for Devpost to join the conversation.