Why this is worth building
You already have the two things a travel business spends years trying to buy: a community that trusts you, and a point of view about where they should go. What you don't have is a way to turn "you should really go to Nosara in October" into a booked trip that pays you, without hiring developers, registering as a travel seller, or handing your members off to a generic booking site that knows nothing about them.
That's the gap this build closes. Picture a member of your surf-travel group asking, "Where should four of us go in October, mid-budget, somewhere with good intermediate breaks?" A generic AI travel planner gives a generic answer. Yours answers in your voice, using your vetted picks, tuned to that specific member's past trips and budget - and then books the flights, hotels, and cars in one step. You earn commission on the booking. The member gets a trip that feels hand-picked, because in a sense it was.
By the end of this walkthrough, you'll have that running as a branded web app, on your own domain, in an afternoon.
What you'll build
A branded web travel agent — a travel chatbot your community talks to — that does three things generic planners can't:
- Recommends inside your niche, drawing on a knowledge base of your own curated content.
- Personalizes per member, using each person's stored travel profile.
- Actually books the trip — flights, hotels, and cars through a single endpoint, with checkout handled.
The rag-travel-profile starter ships the web app, the retrieval layer, and the RouteStack connection wired together. You bring your content and your brand.
Prerequisites
You'll need a free RouteStack account and an API key, the rag-travel-profile starter, and basic comfort running a web app locally (Node installed, a terminal open). No travel-industry experience required, and no prior RAG knowledge — the starter handles the retrieval plumbing. Grab a key at the signup page; it comes with 100 API credits and an unlimited sandbox, so you can build the whole thing before you spend anything.
The build, step by step
Each step below is purpose, then code, then what you should see. The code is illustrative to show the shape of the flow — the exact function signatures live in the starter repo and the RouteStack docs, so copy from there when you build.
1. Clone the starter and add your key.
This gets the web app running locally.
git clone https://github.com/routestack/rag-travel-profile
cd rag-travel-profile && npm install
echo "ROUTESTACK_API_KEY=rk_live_..." >> .env
npm run dev # → http://localhost:30002. Load your niche knowledge base.
This is what makes the agent sound like you. Feed it your guides, destination notes, and vetted stays.
// ingest/knowledge-base.js — your curated niche content
import { kb } from "./rag";
await kb.add([
{ title: "Intermediate-friendly surf breaks", body: "..." },
{ title: "Our vetted eco-stays in Costa Rica", body: "..." },
]);
// → Indexed 24 documents into the niche knowledge base3. Store a member travel profile.
This is what makes a recommendation feel personal rather than generic.
// profiles.js
await profiles.set("member_482", {
homeAirport: "LAX",
budget: "mid",
style: ["surf", "eco", "small-group"],
pastTrips: ["Nosara 2025", "Ericeira 2024"],
});
// → Stored travel profile for member_4824. Blend both into the prompt.
Retrieval pulls your niche content and the member's profile as context before the model answers.
const context = await rag.retrieve({
query: userMessage,
profileId: "member_482",
sources: ["knowledge_base", "profile"],
});
// context now blends your curated picks with this member's preferences5. Connect RouteStack and search all three verticals.
One endpoint returns live, bookable inventory.
import { RouteStack } from "@routestack/mcp";
const rs = new RouteStack(process.env.ROUTESTACK_API_KEY);
const trip = await rs.search({
flights: { from: profile.homeAirport, to: suggestion.destination },
hotels: { area: suggestion.area, nights: 5 },
cars: { pickup: suggestion.destination },
});
// → live availability across 950+ airlines, 3M+ hotels, 20,000+ car models6. Set your markup per vertical.
This is how you earn. You keep 100% of it.
await rs.markup.set({ flights: "8%", hotels: "12%", cars: "10%" });
// your margin, kept in full, paid weekly via ACH7. Return the checkout link.
The member pays through a deep link; the booking confirms back to the session.
const booking = await rs.book(trip.id); // RouteStack = merchant of record
return { reply: suggestion.summary, checkoutUrl: booking.checkoutUrl };That's the full loop: a member asks, your agent answers on-brand and personalized, and the trip is bookable.
What's happening under the hood
When a member sends a message, three things happen in sequence. First, the retrieval layer fetches the two kinds of context that make your agent yours — relevant entries from your niche knowledge base, and that member's travel profile. The model uses both to form a recommendation that fits your point of view and their preferences, not a lowest-common-denominator answer.
Second, that recommendation becomes a structured search. The destination, dates, and traveler details get passed to RouteStack's MCP endpoint, which returns live, bookable inventory across flights, hotels, and cars in a single call — direct from supplier APIs, so the prices and availability are real, not cached estimates.
Third, the booking closes. The member clicks the checkout deep link, pays through Stripe-powered checkout, and the confirmation returns to the agent's session. RouteStack is the merchant of record on that transaction, which is the part that keeps the regulated, payments-heavy side of selling travel off your plate. You built an interface and set a margin; RouteStack carried the inventory, the payment, and the compliance.
Going live
Moving from your local sandbox to production is mostly pointing the app at your domain and switching your key to live mode. The one place builders stall is checkout: a real booking needs a real card on file at the moment of purchase, so make sure your production checkout flow surfaces the deep link clearly rather than burying it.
The reason a solo operator can ship this at all is the merchant-of-record model. Because RouteStack is the seller of record, you launch without travel-industry licensing, without your own merchant account, and without a finance team to reconcile payouts. You keep 100% of the markup you set, and it settles to you weekly via ACH. Your job is the community and the curation; the back office isn't yours to run.
Next steps
Start free, take your 100 credits, and fork the rag-travel-profile starter to get the whole flow running before you commit a line of your own. Then load your content, set your markup, and put it in front of your community.