Wayfarer: An AI Travel Companion That Actually Picks Up the Phone

By bridging the gap between LLM reasoning and the global telephone network, Wayfarer transforms the travel assistant from a search engine into a functional concierge.

8 min read · <a href="https://github.com/nicolotognoni/Wayfarer">nicolotognoni/Wayfarer</a>

A vintage telephone switchboard operated by a glowing mechanical brain, plugging wires into a city map.
Wayfarer connects modern LLM reasoning directly to the legacy Public Switched Telephone Network.

Key Takeaways

The Glass-Box Concierge

Most travel applications treat communication as an exercise left to the reader. They present a static phone number and a call button, immediately shifting the burden of language barriers and timezone math onto the user. Wayfarer takes a dramatically different approach. It uses a low-latency voice engine and automated telephony to actually perform the real-world chore of calling a restaurant or hotel.

The iOS client provides a window into this autonomous action. As the Node.js backend negotiates a reservation in Italian via Twilio and ElevenLabs, the SwiftUI interface renders a live transcript over a WebSocket connection. The user watches the conversation unfold in real time, transforming a black-box AI operation into a transparent, glass-box experience.

Beyond the Knowledge Cutoff

An AI calling a restaurant is only useful if it knows what to ask. Standard LLMs suffer from training data cutoffs, making them oblivious to today's weather, local holidays, or temporary closures. Wayfarer solves this through aggressive context injection.

Before a call begins, the backend extracts the user's GPS coordinates and feeds them into Google Places and Firecrawl. Firecrawl scrapes local news and event pages, compiling an ephemeral snapshot of the destination. This data is injected into the AI's system prompt, ensuring the digital concierge speaks with immediate, local relevance rather than relying on stale training weights.

An inline SVG diagram showing a 'waterfall' flow of data. At the top

The Low-Latency Dial Tone

The architectural core of Wayfarer is its WebSocket proxy. To maintain the sub-second latency required for a natural phone conversation, the backend cannot afford to intercept and process every audio frame sequentially. Instead, it establishes a direct WebRTC connection between the telephony provider and the ElevenLabs Conversational AI API.

The Node.js server sits in the middle as a stateful observer. It intercepts the initial handshake to inject the payload containing current city, country, and latitude. From that point on, the proxy simply monitors the stream, forwarding ping and pong frames to keep the connection alive and translating complex AI events into simplified JSON for the mobile client.

A hand holding a smartphone with a mechanical funnel emerging from the screen, receiving tiny icons of weather, maps, and news.
Context injection provides the AI agent with real-time local awareness before it dials out.

When APIs Fail: The Scraper Waterfall

The physical world is messy, and official APIs often fail to capture it. Google Places frequently hides direct phone numbers or restricts access to reservation links. To ensure the AI agent always has a valid target, Wayfarer implements a multi-strategy discovery layer.

The backend utilizes a prioritized fallback system. It begins with high-confidence sources like the Google Places API. If contact information is missing, the system cascades down to specialized scrapers targeting TripAdvisor, Yelp, and regional directories like PagineGialle for Italy. Each source returns a hardcoded confidence score, allowing the orchestration layer to select the most reliable phone number before initiating the outbound call.

FeatureTraditional Travel AppWayfarer
Data SourceStatic database or single APILive scraped data with fallback waterfall
Call ActionOpens dialer for the userTriggers an autonomous AI agent
Language BarrierUser must speak local languageAgent speaks 15+ local languages automatically
Context AwarenessRelies on manual searchInjects real-time weather and local events

A New Interface for the Physical World

Wayfarer represents a shift in how we interact with software. The 'Call' button is no longer a terminal endpoint where the app's responsibility ends and the user's begins. Instead, it becomes an implementation detail of a broader orchestration engine.

By seamlessly integrating web scraping, low-latency text-to-speech, and automated telephony, the project demonstrates that an AI assistant can be more than a chatbot. It can be a functional actor in the physical world, navigating legacy communication networks so the user does not have to.