TravelAI.Core 1.0.0

dotnet add package TravelAI.Core --version 1.0.0
                    
NuGet\Install-Package TravelAI.Core -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TravelAI.Core" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TravelAI.Core" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="TravelAI.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TravelAI.Core --version 1.0.0
                    
#r "nuget: TravelAI.Core, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TravelAI.Core@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TravelAI.Core&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=TravelAI.Core&version=1.0.0
                    
Install as a Cake Tool

TravelAI.Core

CI Deploy NuGet License: MIT .NET

A .NET 10 library for building AI-native travel platforms. It wraps Azure OpenAI, Azure AI Search, and AKS into clean, testable domain services — drop it into any ASP.NET Core app and you've got intelligent itinerary generation, semantic destination search, and real-time price anomaly detection out of the box.

Live APIhttp://51.11.45.147 (deployed on Azure Kubernetes Service)


What it does

Service Description
IItineraryGenerationService Generates day-by-day travel itineraries using GPT-4o, with cost estimates tailored to the traveller's preferences
IPriceAnomalyDetector Flags flight price anomalies — surges, unexpected deals, seasonal deviations — using statistical analysis against historical baselines
IDestinationSearchService Semantic + vector search over destinations via Azure AI Search. Understands queries like "warm with beaches and good food, not too touristy"
IBookingAutomationService Orchestrates end-to-end bookings with retry logic, partial booking handling, and automatic rollback on failure

Installation

dotnet add package TravelAI.Core

Quick start

// Program.cs
builder.Services.AddTravelAI(builder.Configuration);
builder.Services.AddTravelAIHealthChecks();
app.UseTravelAIObservability();
// appsettings.json
{
  "TravelAI": {
    "AzureOpenAI": {
      "Endpoint": "https://your-resource.openai.azure.com/",
      "ApiKey": "YOUR_KEY"
    },
    "AzureSearch": {
      "Endpoint": "https://your-search.search.windows.net",
      "ApiKey": "YOUR_KEY"
    },
    "ItineraryGeneration": { "DeploymentName": "gpt-4o" },
    "DestinationSearch": { "IndexName": "destinations" }
  }
}
// Generate a personalised itinerary
var itinerary = await generator.GenerateAsync(
    new TravellerProfile { Name = "Aftab", Email = "a@example.com", Tier = TravelTier.Premium },
    destination: "Rome, Italy",
    departure: DateOnly.Parse("2025-08-01"),
    returnDate: DateOnly.Parse("2025-08-08"),
    additionalInstructions: "Avoid tourist traps, focus on local food");

// Semantic destination search
var results = await search.SearchAsync("warm Mediterranean with history and local food");

// Detect price anomalies in flight results
await foreach (var flight in detector.AnalyseBatchAsync(flights))
{
    if (flight.PriceAnomaly?.Type == AnomalyType.UnexpectedDeal)
        Console.WriteLine($"Great deal: {flight.Origin}→{flight.Destination} at £{flight.PriceGbp}");
}

Architecture

TravelAI.Core
├── Interfaces/       # Clean contracts for all services
├── Models/           # Domain models — Itinerary, FlightOption, PriceAnomaly, BookingResult
├── Services/         # Azure AI-backed implementations
├── Middleware/       # Observability (correlation IDs, structured logging) + AI rate limiting
├── HealthChecks/     # Azure OpenAI and AI Search health probes
└── Extensions/       # One-line DI registration

samples/TravelAI.Api  # Full ASP.NET Core 10 minimal API
tests/                # xUnit + FluentAssertions — unit and WebApplicationFactory integration tests
deploy/               # Dockerfile, Kubernetes manifests, GitHub Actions CI/CD, provisioning scripts

Azure services used:

  • Azure OpenAI (GPT-4o) — itinerary generation and natural language refinement
  • Azure AI Search — semantic + hybrid vector search
  • Azure Kubernetes Service — container orchestration with HPA (2–10 replicas)
  • Azure Container Registry — image storage

API endpoints

Method Endpoint Description
POST /api/itinerary/generate Generate a personalised itinerary
POST /api/itinerary/refine Refine an itinerary with natural language feedback
GET /api/destinations/search?q=... Semantic destination search
POST /api/flights/analyse Detect price anomalies in flight results
POST /api/bookings Execute automated booking
DELETE /api/bookings/{reference} Cancel a booking
GET /health/live Liveness probe
GET /health/ready Readiness probe (checks Azure OpenAI + Search)

Deployment

The API is deployed to AKS via GitHub Actions. Every push to main builds, tests, pushes the Docker image, and deploys — with a manual approval gate before production.

# Provision all Azure resources from scratch
bash deploy/scripts/provision-azure.sh

# Push to main to trigger the pipeline
git push origin main

See deploy/DEPLOYMENT.md for the full step-by-step guide.


Running tests

dotnet test --configuration Release

Tests cover the price anomaly detector (including edge cases and cabin class multipliers), booking automation orchestration, domain model validation, and API integration tests via WebApplicationFactory with fake Azure service dependencies — no Azure credentials needed.


Tech stack

.NET 10 · Azure OpenAI · Azure AI Search · AKS · Helm · Docker · GitHub Actions · xUnit · FluentAssertions


License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 87 3/31/2026