Trip Planner
Plan a trip from one plain-English sentence. Claude Haiku extracts the requirements, Google Flights (via SearchApi.io or SerpApi) and hotelist.com are searched in parallel, a deterministic picker chooses the best-fit flight and hotel within budget, and a day-by-day itinerary is rendered from it. Only the extraction step uses an LLM; picking and rendering are deterministic.
Behaviors
| Behavior | Type | Methods |
|---|---|---|
| Anthropic | @adam/trip-planner/anthropic |
extract — request → structured requirements (the only LLM call) |
| Hotel | @keeb/hotelist |
search_hotels — rated hotels with nightly prices |
| Flight | @adam/trip-planner/flights |
search — priced Google Flights options (SerpApi or SearchApi.io) |
| Itinerary | @adam/trip-planner/itinerary |
pick — best fit within budget; generate — Markdown itinerary (both deterministic) |
Usage
swamp extension pull @adam/trip-planner
swamp vault create local_encryption trip-planner
swamp vault put trip-planner ANTHROPIC_API_KEY
swamp vault put trip-planner FLIGHTS_API_KEY # SearchApi.io (default) or SerpApi
swamp workflow run @adam/plan-trip \
--input request="plan a comfortable trip to japan, 10 days in april, \$4000, from SFO"The workflow creates its own models; there is nothing else to set up.
Global Arguments
| Argument | Type | Description |
|---|---|---|
| apiKey | string | Anthropic API key. |
| model | string | Claude model that extracts the requirements. |
| maxTokens | number | Maximum tokens for the extracted requirements. |
| Argument | Type | Description |
|---|---|---|
| request | string | The trip request in plain English, e.g. "plan a trip to japan". |
| name | string | Suffix for the stored requirements instance. |
Resources
Global Arguments
| Argument | Type | Description |
|---|---|---|
| provider | enum | Which Google Flights API the key belongs to: searchapi (SearchApi.io) or serpapi. |
| apiKey | string | API key for the chosen provider. |
| currency | string | Currency for prices. |
| hl | string | Result language. |
| gl | string | Country to search from. |
| Argument | Type | Description |
|---|---|---|
| departureIds | string | Comma-separated origin IATA codes, e.g. SFO or JFK,EWR. |
| arrivalIds | string | Comma-separated destination IATA codes, e.g. HND,NRT. |
| outboundDate | string | YYYY-MM-DD departure date. |
| returnDate? | string | YYYY-MM-DD return date; omit for one-way. |
| adults | number | |
| cabin | enum | |
| maxStops | enum | |
| name | string | Suffix for the stored flights instance. |
Resources
| Argument | Type | Description |
|---|---|---|
| flights | array | Flight options from the flight behavior's search. |
| hotels | array | Hotels from the hotel behavior's search. |
| budgetUsd | number | |
| nights | number | |
| travelers | number | |
| rooms? | number | Hotel rooms; defaults to one per two travelers. |
| priority | enum | |
| city? | string | Prefer hotels actually in this city (searches can return nearby ones). |
| Argument | Type | Description |
|---|---|---|
| destinationCity | string | |
| destinationCountry | string | |
| startDate | string | |
| endDate | string | |
| travelers | number | |
| interests | array | Each free day takes the next interest as its focus. |
| assumptions | array | Values inferred from the request, listed so the reader can check them. |
| request | string | The original trip request. |
Resources
Files
Plan a trip from a plain-English request: Claude Haiku extracts the requirements, flights and hotels are searched in parallel, the itinerary behavior picks the best-fit pair within budget, then renders a day-by-day itinerary. Only extraction uses an LLM; pick and generate are deterministic.
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License1/2partial
no SPDX license declared
- Verified public repository2/2earned