Skip to main content

Travel: Search & Reservation

Problem Statement​

Travel search involves querying availability across hotels, flights, or rental cars with dates, locations, guest counts, and preferences. Booking creates a reservation with financial commitment.

Why Human-Only Semantics Fail​

  • Travel search forms have tightly coupled date pickers, location autocompletes, and guest counters
  • Search results display pricing grids that vary by room type, fare class, etc.
  • "Book Now" buttons don't declare the financial commitment amount
  • Rate cards show "from $X" prices that differ from actual totals

Why Scraping Fails Here​

  • Date pickers are calendar widgets with event-driven state
  • Location autocompletes require typing and waiting for suggestions
  • Pricing is dynamically calculated based on availability
  • Booking requires session state (selected room, fare class, add-ons)
  • Anti-bot protections on travel sites are extremely aggressive

How AXAG Eliminates Scraping​

travel.search and travel.book are separate intents. Search is read-only; booking is a write with financial side-effects and confirmation requirements.

Annotated UI Example​

Travel — search & book actions
<!-- Search -->
<button
axag-intent="travel.search"
axag-entity="travel_listing"
axag-action-type="read"
axag-required-parameters='["destination","check_in","check_out","guests"]'
axag-optional-parameters='["property_type","price_max","amenities","sort_by"]'
axag-risk-level="none"
axag-idempotent="true"
axag-description="Search for available travel accommodations"
>Search</button>

<!-- Book -->
<button
axag-intent="travel.book"
axag-entity="reservation"
axag-action-type="write"
axag-required-parameters='["listing_id","check_in","check_out","guests","payment_method_id"]'
axag-optional-parameters='["special_requests","add_ons"]'
axag-preconditions='["listing must be available for requested dates","payment method must be valid"]'
axag-postconditions='["reservation created","payment authorized","confirmation email sent"]'
axag-risk-level="critical"
axag-confirmation-required="true"
axag-approval-required="false"
axag-idempotent="false"
axag-side-effects='["payment_authorization","email_notification","availability_update"]'
axag-description="Book a travel accommodation"
>Book Now</button>

Semantic Manifest Excerpt​

Manifest — travel search + book
{
"actions": [
{
"intent": "travel.search",
"entity": "travel_listing",
"action_type": "read",
"operation_id": "travel_search",
"description": "Search for available travel accommodations",
"required_parameters": [
{ "name": "destination", "type": "string" },
{ "name": "check_in", "type": "string", "format": "date" },
{ "name": "check_out", "type": "string", "format": "date" },
{ "name": "guests", "type": "integer", "min": 1 }
],
"optional_parameters": [
{
"name": "property_type",
"type": "string",
"enum": ["hotel", "apartment", "villa", "hostel"]
},
{ "name": "price_max", "type": "number", "min": 0 },
{ "name": "amenities", "type": "array", "items": { "type": "string" } },
{
"name": "sort_by",
"type": "string",
"enum": ["price_asc", "price_desc", "rating", "distance"]
}
],
"risk_level": "none",
"idempotent": true
},
{
"intent": "travel.book",
"entity": "reservation",
"action_type": "write",
"operation_id": "travel_book",
"description": "Book a travel accommodation",
"required_parameters": [
{ "name": "listing_id", "type": "string" },
{ "name": "check_in", "type": "string", "format": "date" },
{ "name": "check_out", "type": "string", "format": "date" },
{ "name": "guests", "type": "integer", "min": 1 },
{ "name": "payment_method_id", "type": "string" }
],
"optional_parameters": [
{ "name": "special_requests", "type": "string" },
{ "name": "add_ons", "type": "array", "items": { "type": "string" } }
],
"risk_level": "critical",
"confirmation_required": true,
"idempotent": false,
"side_effects": ["payment_authorization", "email_notification", "availability_update"],
"preconditions": [
"listing must be available for requested dates",
"payment method must be valid"
],
"postconditions": ["reservation created", "payment authorized", "confirmation email sent"]
}
]
}

Constraints & Safety Notes​

  • Search is safe: read-only, idempotent, no risk
  • Booking is critical: involves financial authorization
  • Booking MUST require confirmation — agent cannot autonomously spend money
  • check_out must be after check_in
  • Booking is NOT idempotent — double-booking creates two reservations