Plan a trip
anywayr_plan_tripSaves a private trip and returns its real trip_url immediately; completed means saved, not itinerary ready. Before calling, confirm a city or named stay destination (not a country) and its exact local arrival/check-out dates; ask one combined question if those are missing or an overseas departure day is ambiguous. Do not save a placeholder draft first. Use one destination_ref or confirmed segments for 2–5 contiguous cities. Dates and travelers are required; budget is optional. Keep the wider journey and undecided stops in planning_context; never save guesses as preferences. A whole-trip budget is a ceiling, not a hotel rate: use wider_journey when it covers the wider trip, even if only Japan is saved; do not narrow it to saved_trip without the traveler saying so. Private context and ceiling metadata have no edit operation or website editor. Share trip_url and saved_scope first. Poll only if the host can actually wait planning_progress.poll_after_ms, for at most 60 seconds; otherwise return the current phase. Stop on ready, failed or unknown. Never promise a completion time or a later callback. It does not invite, hold inventory or spend money. Effects: Creates one private draft trip per request key and runs trip research (model and provider cost).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| brief | Yes | ||
| party | No | ||
| budget | No | ||
| segments | No | Confirmed cities in travel order with contiguous local check-in/check-out dates. Unchosen stops belong in planning_context.undecided_stops. | |
| arrival_at | No | ||
| date_range | No | Confirmed local first-night/check-out dates at the destination, not an unconfirmed overseas departure date. Ask before calling when arrival day is ambiguous. | |
| request_key | Yes | Any unique string of 16-128 characters you generate (letters, digits and . _ : -). Reuse the same key only to retry the exact same request. | |
| departure_at | No | ||
| planning_budget | No | ||
| destination_refs | No | One confirmed city or named stay destination from anywayr_resolve_destination, never a country placeholder. For multiple cities use segments. | |
| planning_context | No |