Zim developer docs

Everything you need to build
travel workflows on Zim

Commands, policy enforcement, preference profiles, conversation patterns, and response formats for flight, hotel, car, and full-trip booking flows.

Quick Start → Back to homepage
Quick start

Install, configure, book

1. Install: clawhub install zim
2. Configure: export ZIM_API_KEY=your_key
3. Book: "Find me a flight to Dubai"

What Zim does

Zim gives your AI agent one travel layer for flights, hotels, cars, policy rules, preferences, trip assembly, monitoring, and post-booking changes.

Flights
Hotels
Cars
Trip assembly
Policy engine
Preference memory
Commands & parameters

CLI surface area

Use direct commands when you want deterministic control, or expose them behind natural language in your agent layer.

Flights

zim flights <origin> <destination> <departure> [return] [options]

Options:
  --class economy|business|first
  --airline <preferred airline>
  --direct           Direct flights only
  --max-price <usd>  Budget cap
  --flexible         ±3 day date flexibility
  --mode business|personal

Hotels

zim hotels <location> <checkin> <checkout> [options]

Options:
  --stars <min>      Minimum star rating
  --max-price <usd>  Per night cap
  --near <address>   Location preference
  --style luxury|boutique|budget|business
  --mode business|personal

Cars

zim cars <location> <pickup> <return> [options]

Options:
  --type economy|compact|suv|luxury|van
  --provider <preferred>

Trip assembly

zim trip <destination> <start> <end> [options]

Assembles flight + hotel + car as a complete package.
Options:
  --mode business|personal
  --budget <total usd>

Preferences

zim preferences set --seat window --legroom extra --airline "Emirates,Singapore Airlines"
zim preferences set --hotel-style boutique --hotel-stars 5 --no-redeye
zim preferences show

Policy

zim policy set --max-hotel 300 --max-flight 2000 --class-domestic economy --class-intl business
zim policy set --approval-threshold 5000 --approved-airlines "Emirates,BA,Qatar"
zim policy show
Parameter behavior

How filters interact

Mode-aware ranking

business favors refundability, direct routes, calendar fit, and policy compliance. personal relaxes those rules and leans toward price and distinctive stays.

Hard caps vs soft preferences

--max-price and policy ceilings filter results out. Airline, seat, style, and vendor preferences affect ranking unless configured as hard requirements.

Trip assembly

zim trip aligns travel dates, hotel windows, airport/car timing, and can inherit company policy plus traveler preferences automatically.

Conversation examples

Five real interaction flows

1. Simple flight search
User: Find me a flight London to Dubai next Friday.
Agent: Do you want economy or business?
User: Business, direct if possible.
Agent: I found 3 strong options. Best overall is Emirates direct, departing 14:10, arriving 00:55, $2,340. Want me to hold it or show cheaper alternatives?
2. Business trip with policy
User: Book a business trip to NYC, April 10–12.
Agent: Applying company policy: flight cap $2,000, hotel cap $300/night, business class only on long-haul international. I found a compliant itinerary with a direct overnight outbound, Midtown hotel 1.1km from the office, and refundable fare. Total is $4,620. Confirm?
User: Yes.
Agent: Booked. Receipts and calendar-ready itinerary are prepared.
3. Luxury personal trip
User: Plan a romantic weekend in Paris, 5-star everything.
Agent: I prioritized luxury boutique hotels, business class flights, and a private transfer instead of standard car rental. Best fit is two nights at Cheval Blanc with direct flights and flexible return timing. Want the most elegant option or the best-value luxury option?
4. Team booking
User: Book flights for 4 people, London to Barcelona, May 1–4.
Agent: I found coordinated flights with the same schedule for all 4 travelers, a hotel with 4 rooms available, and group-rate options. Do you want everyone on the same fare class or split by budget?
5. Price alert
User: Watch flights to Tokyo, tell me when business class drops below $3,000.
Agent: Monitoring set. I’ll track business class fares on your preferred carriers and notify you when one falls below $3,000.
API response format

Structured JSON for every travel object

Flight response

{
  "type": "flight_search",
  "query": {
    "origin": "LHR",
    "destination": "DXB",
    "departure": "2026-04-17",
    "class": "business",
    "mode": "business"
  },
  "results": [
    {
      "id": "flt_ek4_2026-04-17",
      "airline": "Emirates",
      "flight_number": "EK4",
      "direct": true,
      "duration_minutes": 405,
      "depart_at": "2026-04-17T14:10:00Z",
      "arrive_at": "2026-04-17T20:55:00Z",
      "cabin": "business",
      "price_usd": 2340,
      "refundable": true,
      "policy_status": "approved"
    }
  ]
}

Hotel response

{
  "type": "hotel_search",
  "query": {
    "location": "Dubai",
    "checkin": "2026-04-17",
    "checkout": "2026-04-20",
    "near": "DIFC",
    "style": "luxury"
  },
  "results": [
    {
      "id": "htl_fs_difc",
      "name": "Four Seasons Hotel DIFC",
      "stars": 5,
      "distance_km": 0.8,
      "nightly_rate_usd": 540,
      "currency": "USD",
      "refundable": true,
      "policy_status": "out_of_policy",
      "reasons": ["hotel rate exceeds policy max of 300"]
    }
  ]
}

Car response

{
  "type": "car_search",
  "query": {
    "location": "DXB",
    "pickup": "2026-04-17T21:30:00Z",
    "return": "2026-04-20T18:00:00Z",
    "type": "suv"
  },
  "results": [
    {
      "id": "car_sixt_suv_01",
      "provider": "Sixt",
      "vehicle_class": "premium_suv",
      "price_usd_total": 564,
      "pickup_location": "Dubai International Airport",
      "free_cancellation": true,
      "policy_status": "approved"
    }
  ]
}

Trip response

{
  "type": "trip_package",
  "destination": "Dubai",
  "mode": "business",
  "dates": {
    "start": "2026-04-17",
    "end": "2026-04-20"
  },
  "traveler_profile": {
    "seat": "window",
    "legroom": "extra",
    "no_redeye": true,
    "preferred_airlines": ["Emirates", "Singapore Airlines"]
  },
  "policy": {
    "max_flight": 2000,
    "max_hotel": 300,
    "approval_threshold": 5000
  },
  "itinerary": {
    "flight": "flt_ek4_2026-04-17",
    "hotel": "htl_fs_difc",
    "car": "car_sixt_suv_01"
  },
  "status": "approval_required",
  "approval_reason": "total trip price exceeds threshold"
}
Travel policy configuration

How companies define booking rules

Supported policy dimensions

$
Budget limits per categorySet separate caps for flights, hotels, cars, or full trip totals.
Approval thresholdsTrigger routing when total or category-level cost exceeds a configured threshold.
Preferred vendorsDefine approved or preferred airlines, hotel chains, and car providers.
C
Class restrictionsApply cabin or hotel-star rules by domestic/international route type, duration, or traveler level.
📍
Location rulesLimit hotels to a radius from office, event venue, or meeting address.

Example policy workflow

zim policy set \
  --max-hotel 300 \
  --max-flight 2000 \
  --class-domestic economy \
  --class-intl business

zim policy set \
  --approval-threshold 5000 \
  --approved-airlines "Emirates,BA,Qatar"
Rule typeExampleBehavior
Hotel cap$300/nightHotels above the limit are hidden or flagged, depending on strictness.
Flight cap$2,000Flights above limit can be suppressed or routed for approval.
Approval threshold$5,000 trip totalTrip status becomes approval_required before booking.
Preferred vendorsEmirates, BA, QatarPreferred vendors rank first; unapproved vendors can be excluded.
Class restrictionBusiness on long-haul intl onlyCabin eligibility changes based on route length and geography.
Location radiusWithin 2km of meetingHotel results are filtered by geographic proximity.
Preference profiles

How traveler memory works

Supported preference categories

🪟
Seat preferencesWindow versus aisle, extra legroom, front-cabin bias, no middle seats.
🛫
Airline preferencesPreferred and blocked carriers, alliance bias, direct-flight bias, redeye avoidance.
🏨
Hotel preferencesLuxury, boutique, business, star rating minimums, chain preferences, and neighborhood bias.
Dietary and accessibilityMeal requirements, mobility constraints, room-access needs, special handling notes.
🏅
Loyalty program numbersFrequent flyer, hotel rewards, and rental memberships can be stored in the profile.

Example preference setup

zim preferences set \
  --seat window \
  --legroom extra \
  --airline "Emirates,Singapore Airlines"

zim preferences set \
  --hotel-style boutique \
  --hotel-stars 5 \
  --no-redeye

zim preferences show
Implementation notes

Recommended agent behavior

Clarify only when needed

If the user omits class, cabin, or hotel style, ask a minimal follow-up. Otherwise infer from preference profile and mode.

Show reasons, not just results

Explain why top options ranked highly: direct route, policy-compliant, preferred airline, near venue, refundable, or under budget.

Keep booking state explicit

Return structured statuses like approved, out_of_policy, approval_required, or monitoring so downstream agents stay deterministic.