Skip to content

✅ Phase 6: AI Tools Integration - Chat-First Heritage Experience #1378

@kurosh87

Description

@kurosh87

Completed

5 AI Tools for Conversational Interface:

1. Heritage Search Tool

File: /lib/ai/tools/search-heritage-sites.ts

  • Search UNESCO sites by name, country, region, category
  • Filter by inscription year range
  • Returns site details with coordinates and images
  • No approval required (read-only)

Usage: "Show me UNESCO sites in Egypt", "Find ancient temples in Cambodia"

2. Site Details Tool

File: /lib/ai/tools/get-site-details.ts

  • Get comprehensive site information
  • Includes all POIs within the site
  • Returns opening hours, admission fees, durations
  • Provides coordinates for mapping

Usage: "Tell me about the Pyramids of Giza", "What can I see at Angkor Wat?"

3. Trip Creation Tool

File: /lib/ai/tools/create-trip.ts

  • Create trips via conversation
  • Add days and sites in one operation
  • Requires user approval (mutations)
  • Links to user session

Usage: "Create a 7-day trip to Peru visiting Cusco and Machu Picchu"

4. Circuit Discovery Tool

File: /lib/ai/tools/get-circuits.ts

  • Browse pre-planned heritage circuits
  • Filter by region, difficulty, duration
  • View full circuit itineraries with stops
  • Discover multi-day routes

Usage: "Show me circuits in the Mediterranean", "What routes cover ancient civilizations?"

5. Circuit Details Tool

File: /lib/ai/tools/get-circuits.ts

  • Get complete circuit information
  • All stops with day-by-day breakdown
  • Site details for each stop
  • Route planning information

Usage: "Show me the full itinerary for the Ancient Egypt Explorer"

Integration:

  • ✅ All tools registered in /app/(chat)/api/chat/route.ts
  • ✅ Added to experimental_activeTools array
  • ✅ Added to tools object
  • ✅ Properly typed with Zod schemas
  • ✅ Error handling and validation

Chat Capabilities:
Users can now:

  • Discover heritage sites through conversation
  • Research specific locations
  • Plan trips by talking to AI
  • Explore pre-planned routes
  • Get practical travel information

References:

  • CHATBOT_LAYER.md for architecture
  • FUNCTIONALITY_SPEC.md section 8 for full tool spec
  • CLAUDE.md for chat-first vision

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions