Inspiration

We were inspired by a simple problem: people already coordinate trips, meetups, and “where should we go?” decisions inside chat apps, but map tools usually live in separate apps and tabs. We wanted to bring map intelligence directly into the conversation, so users could ask for routes, nearby places, and travel insights in natural language without leaving WhatsApp.

What it does

AskTheMap lets people ask map questions directly in WhatsApp and get instant, AI-powered replies. It understands natural-language requests, calls mapping tools when needed (Google Maps/Mapbox), and returns useful results like:

  • Directions and route options
  • Nearby places and points of interest
  • Travel-time and location insights
  • Group-friendly planning help inside chat
  • It runs as a backend gateway, so conversations stay in WhatsApp while the system handles LLM reasoning, tool calls, and reliable message processing behind the scenes.

How we built it

We built AskTheMap as a long-running Express gateway connected to WhatsApp Web. Incoming messages are processed through an LLM orchestration layer, and map-specific requests are executed through an internal MCP-style tool registry.

Core architecture:

  • WhatsApp Web client for real-time chat I/O
  • Express service with health endpoint for observability
  • Queue-based background processing for stable, ordered handling
  • Message dedupe + debounce to reduce repeated/fragmented inputs
  • Gemini-powered agent with MCP tool calls
  • Google Maps and Mapbox integrations for geocoding, routing, and isochrone-style capabilities

Challenges we ran into

  • Balancing speed vs. reliability when tool calls timeout or fail intermittently
  • Preventing duplicate replies from repeated webhook/chat events
  • Handling rapid multi-message bursts without losing user intent
  • Keeping tool usage bounded so the model doesn’t loop indefinitely
  • Managing API-key compatibility and environment differences across team setups

Accomplishments that we're proud of

  • Built a working WhatsApp-first AI mapping assistant end to end
  • Integrated LLM reasoning with real map tooling (Google Maps + Mapbox)
  • Added robust message handling with queueing, deduplication, and debounce
  • Implemented MCP tool-call guardrails (round limits, retries, fail-safe final answers)
  • Designed chat controls (/bot on, /bot off, /reset) for safer real-world use
  • Shipped operational visibility via /healthz and structured logging
  • Kept setup beginner-friendly with clear env templates and quick-start docs

What we learned

  • Reliability features (queueing, dedupe, debounce) are essential for chat UX, not optional.
  • LLM quality alone is not enough; tool orchestration and guardrails determine real usefulness.
  • Bounded MCP loops, retries, and timeout handling prevent runaway behavior in production.
  • Keeping map tools server-side improves safety, control, and observability.
  • Natural-language chat can be a practical interface for route planning and place discovery when context is preserved.

What's next for AskTheMap

  1. Per-person memory in group chats. Add individual memory so AskTheMap can remember each person’s preferences and routines (food tastes, budget, neighborhoods, typical availability, mobility constraints), while keeping those preferences separated per user in the same group chat.
  2. Turn it into a general API (not just a WhatsApp bot account). Evolve AskTheMap into a reusable service with a clean API—so it can power multiple clients (WhatsApp, web, mobile, other chat apps) instead of being tied to a single WhatsApp “secondary account” setup.
  3. More map-understanding skills. Expand the skill set beyond basic search/directions into richer “map intelligence,” like better place comparison, area recommendations, isochrone-based suggestions, multi-stop planning, and smarter context-aware local recommendations.

Built With

Share this project:

Updates