Inspiration

Travel recovery is a good stress test for WebMCP because it is multi-step, stateful, and involves consequential actions.

The scenario behind Replan is simple: imagine a nonstop flight to Miami being canceled the day before a cruise departure from PortMiami. The traveler needs to recover quickly while balancing constraints such as timing, hotel availability, ground transportation, and budget.

I wanted to explore what happens when the website exposes its capabilities directly to an AI agent instead of requiring a custom conversational layer inside the application.

What it does

Replan is an agentic travel recovery app where a traveler sets goals and constraints in natural language while an AI agent discovers and operates the site's capabilities directly.

The traveler can ask the agent to search for replacement flights, update constraints, hold a reservation, confirm a booking, rebook a hotel, arrange ground transportation, notify a contact, track the running trip cost, and generate an itinerary summary.

The app exposes 12 WebMCP tools:

  • ping
  • search_flights
  • search_flights_semantic
  • update_constraints
  • hold_reservation
  • confirm_booking
  • search_hotels
  • update_hotel_reservation
  • book_ground_transport
  • notify_contact
  • calculate_total_cost
  • generate_itinerary_summary

The human remains in control of consequential actions through explicit confirmation gates, while the agent handles the multi-step coordination.

How we built it

Replan is built with React, Vite, and TypeScript, deployed on Vercel. Convex powers the one live backend piece—the semantic-search vector index, reached from the browser tool through an HTTP endpoint, so no Convex client code ships in the runtime bundle.

The key integration is WebMCP. The page registers its capabilities through the WebMCP API using document.modelContext.registerTool(). ChatGPT, in its in-app browser, discovers those tools and calls them from natural-language requests.

There is no custom LLM, NLU, voice layer, or custom agent in the Replan codebase. The application exposes structured capabilities and lets the agent decide how to compose them.

The 12 tools are registered statically at page load. Each tool validates its inputs and returns structured JSON, including structured errors that allow the agent to understand failed operations and recover.

One of the tools, search_flights_semantic, uses natural-language semantic ranking backed by a live vector index with embeddings rather than simple keyword matching.

I verified the complete interaction flow manually: 12/12 tools registered, 36/36 demo turns passed, 0 failures.

Challenges we ran into

One of the main challenges was designing tool validation and error responses so that an AI agent could recover from invalid or conflicting requests. Structured errors turned out to be especially important because the agent needs actionable information rather than only human-readable error messages.

Another challenge was designing confirmation boundaries. Search and other reversible operations can be performed speculatively, but consequential actions such as confirming a booking need an explicit human confirmation step.

The final challenge was compressing a 36-turn recovery workflow into a clear demonstration under three minutes without losing the important WebMCP interactions.

Accomplishments that we're proud of

I successfully exposed the complete travel recovery workflow through WebMCP without building a custom agent or natural-language processing layer.

The final implementation has 12 WebMCP tools, and the complete human verification covered 36/36 turns with 0 failures.

Most importantly, the entire recovery chain can be driven from natural language: the agent discovers the capabilities exposed by the webpage, composes multiple tools, handles state and constraints, and stops for human confirmation when an action becomes consequential.

What we learned

WebMCP changes the design boundary between a website and an AI agent.

The website does not need to understand how the agent reasons. It needs to expose clear, reliable capabilities that an agent can discover and compose.

I also learned that confirmation gates are not just a UI concern. They shape the tool design itself by separating safe, reversible operations from consequential actions.

Finally, structured JSON responses and meaningful errors are critical when tools are being operated by an agent. They provide the information needed for the agent to adapt instead of simply failing.

What's next for Replan - Agentic Travel Recovery

The next step is to make the recovery workflow more realistic and flexible.

Potential extensions include partial availability, multi-leg itineraries, more complex constraint conflicts, and broader use of live vector search across additional travel capabilities.

The goal is to continue exploring how far a website can go when it exposes reliable, composable capabilities directly to an AI agent through WebMCP.

Built With

Share this project:

Updates

Submission history