AI & Agents · Intermediate

LLM Trip Planner With Live Tools

Build an agent that plans a trip by calling real flight, weather, and maps APIs through function calling and streaming the itinerary.

Intermediate8-14 hoursTypeScriptPythonAI

You build a conversational trip-planning agent that orchestrates real external APIs through LLM function calling: Amadeus for flights, Open-Meteo for forecasts, and Mapbox for route geometry. The agent receives a natural-language trip request, decides which tools to invoke and in what order, then streams a structured day-by-day itinerary back to the user. This project teaches you exactly how production agentic systems work, because every piece of data the model uses comes from a live API call rather than its training weights.

What you build

  • Natural-language trip requests parsed and fulfilled by an LLM agent without hand-coded routing logic
  • Real flight search via Amadeus API returning actual routes, prices, and departure times
  • Live 7-day weather forecast per destination from Open-Meteo, injected into itinerary recommendations
  • Mapbox route geometry rendered on an interactive map showing the day-by-day travel path
  • Streamed itinerary output so users see results as the agent assembles them, not after a long wait
  • Multi-turn conversation so users can refine the plan (change dates, add stops, swap flights)

What it teaches

  • LLM tool calling and multi-step agentic loops using the Vercel AI SDK `streamText` with `maxSteps`
  • Designing Zod-typed tool schemas that give the model precise, safe interfaces to external APIs
  • Streaming partial results to the client so UI stays responsive during multi-tool orchestration
  • Integrating third-party REST APIs (Amadeus, Open-Meteo, Mapbox) as agent capabilities rather than direct UI calls
  • Handling tool execution errors gracefully so the model can retry or fall back without crashing the session
  • Rendering geospatial data from an LLM-driven tool call onto an interactive map in a React app

How it works

  1. 1

    User Prompt

    • Natural-language trip request
    • Budget + date constraints

    parsed by

  2. 2

    LLM Agent

    • Tool selection
    • Parameter extraction
    • Zod validation

    calls

  3. 3

    External APIs

    • Amadeus flights
    • Open-Meteo weather
    • Mapbox route

    returns JSON

  4. 4

    Tool Results

    • Flight options
    • Forecast data
    • Route geometry

    fed back to

  5. 5

    Itinerary Generation

    • Model synthesizes plan
    • Streamed tokens

    renders on

  6. 6

    Client UI

    • Streamed itinerary text
    • Interactive map
fig. 01 — user prompt triggers sequential llm tool calls across three live apis before the itinerary streams to the client.

Sign in to open the build guide

Free account. Get the step-by-step build and every resource link.

Sign in to continue

Take it further

  • Add a budget-optimization loop where the agent re-calls `searchFlights` with adjusted dates if the first result exceeds the user's stated budget, demonstrating multi-step planning with feedback.
  • Persist itineraries to a database and add a share link so users can send a read-only view of their AI-generated plan to travel companions.
  • Replace single-city weather with per-day forecasts keyed to each destination stop, then have the model adjust outdoor activity recommendations based on rain probability.

More like this

All projects