{"id":41510222,"url":"https://github.com/jongalloway/travel-booking-agents","last_synced_at":"2026-01-23T19:43:38.859Z","repository":{"id":320286486,"uuid":"1076504081","full_name":"jongalloway/travel-booking-agents","owner":"jongalloway","description":"AI agent workflow for travel booking and approval process","archived":false,"fork":false,"pushed_at":"2025-10-22T23:20:25.000Z","size":862,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-23T01:05:43.698Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jongalloway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-15T00:42:23.000Z","updated_at":"2025-10-22T23:20:28.000Z","dependencies_parsed_at":"2025-10-23T01:17:26.900Z","dependency_job_id":null,"html_url":"https://github.com/jongalloway/travel-booking-agents","commit_stats":null,"previous_names":["jongalloway/travel-booking-agents"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/jongalloway/travel-booking-agents","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongalloway%2Ftravel-booking-agents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongalloway%2Ftravel-booking-agents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongalloway%2Ftravel-booking-agents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongalloway%2Ftravel-booking-agents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jongalloway","download_url":"https://codeload.github.com/jongalloway/travel-booking-agents/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongalloway%2Ftravel-booking-agents/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28699291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-23T19:43:37.998Z","updated_at":"2026-01-23T19:43:38.844Z","avatar_url":"https://github.com/jongalloway.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌍 Travel Booking Agents\n\nAn intelligent corporate travel booking and approval system powered by AI agents and .NET 9. This application demonstrates complex multi-agent orchestration with real business value, showcasing automated travel planning, policy compliance, budget management, itinerary optimization, and booking workflows.\n\n## What This Sample Does\n\nThis sample is designed as a realistic showcase for multi‑agent coordination in a corporate scenario. It intentionally balances clarity (for conference/demo settings) with production-minded patterns (service composition, resilience, extensibility). At a glance it provides:\n\n| Capability | What You See | Implementation Highlights |\n|------------|--------------|---------------------------|\n| Multi‑Agent Orchestration | 5 domain agents run in sequence (research → policy → budget → optimize → booking) | Agents built with Microsoft Agents Framework; sequential orchestration path for deterministic streaming |\n| Real‑Time Streaming UI | Live “agent is working” updates + final consolidated transcript | Server-Sent Events (`/agent/chat/stream`) consumed by Blazor Server component |\n| Tool / Function Calling | Agents call flight \u0026 hotel search + booking tools (mock) | Functions exposed with `AIFunctionFactory` wrapped into ChatOptions |\n| Policy \u0026 Budget Logic | Automatic validation \u0026 cost assessment | Mock policy \u0026 budget data (extensible to real services) |\n| Offline / Token Fallback | Works even without a valid `GITHUB_TOKEN` | Detects missing token → deterministic simulated outputs |\n| Debug Diagnostics | Optional timing / timeout tracing | `debug=true` query emits per‑agent timing markers |\n| Timeout Resilience | Long model calls won’t freeze UI | Per‑agent timeout + heuristic fallback output |\n| Aspire Orchestration | Unified AppHost + service discovery | `TravelBookingAgents.AppHost` wires Web + API + defaults |\n| Extensibility Surface | Easy to add agents, tools, real APIs | Clear separation of agents, mock data, and transport |\n\n### Demo Storyline\n\n1. User submits a natural language travel request.\n2. Each agent contributes its specialization; progress is streamed live.\n3. A final aggregated itinerary / rationale is returned (or a policy violation explanation).\n4. Optional debug mode shows timing and fallback behavior.\n\n### Two Execution Modes\n\n| Mode | Trigger | Behavior |\n|------|---------|----------|\n| Online (LLM) | Valid `GITHUB_TOKEN` present | Actual model calls per agent (sequential or legacy group chat when `sequential=false`) |\n| Offline (Simulated) | Missing / invalid token | Deterministic scripted outputs for reliable demos |\n\n### Quick Links\n\n* Primary streaming endpoint: `GET /agent/chat/stream?prompt=...\u0026sequential=true`\n* Legacy round‑robin workflow: `?sequential=false`\n* Debug instrumentation: append `\u0026debug=true`\n* Console demo: run `TravelBookingAgents.Console` project\n\n\u003e TIP: For conference demos, the offline mode guarantees consistent timings while still showing realistic agent progression.\n\n## Overview\n\nThis system replaces manual travel booking processes with an automated workflow featuring 5 specialized AI agents that collaborate to:\n\n* Research travel options (flights, hotels, cars)\n* Validate against corporate policies\n* Check budgets and determine approval requirements\n* Optimize itineraries for cost and convenience\n* Finalize bookings with confirmation numbers\n\n## Architecture\n\n### Technology Stack\n\n* **.NET 9** - Modern C# with latest features\n* **Microsoft Agents Framework** - Multi-agent orchestration\n* **Aspire** - Cloud-native orchestration and service discovery\n* **Blazor Server** - Interactive web UI with real-time streaming\n* **GitHub Models** - AI model integration (GPT-4o-mini)\n\n### AI Agents\n\n#### 1. **Travel Research Agent** 🔍\n\nSearches for and compares travel options:\n\n* Finds flights between origin and destination\n* Searches hotels at destination  \n* Locates rental car options\n* Compares prices and presents top recommendations\n\n**Tools:** `SearchFlights`, `SearchHotels`, `SearchRentalCars`\n\n#### 2. **Policy Compliance Agent** ✅\n\nValidates travel requests against company policies:\n\n* Checks if destination is approved\n* Verifies 14-day advance booking requirement\n* Ensures flight/hotel costs within limits\n* Validates preferred vendor usage\n\n**Tools:** `GetTravelPolicy`, `ValidateDestinationAndTiming`\n\n#### 3. **Budget Approval Agent** 💰\n\nManages travel spending and approvals:\n\n* Retrieves department budget information\n* Calculates total trip cost (flights + hotels + meals/incidentals)\n* Determines if manager approval needed (\u003e$2,500)\n* Checks budget availability\n\n**Tools:** `GetBudgetInfo`, `CheckBudgetAndApproval`\n\n#### 4. **Itinerary Optimizer Agent** 📊\n\nOptimizes travel plans for efficiency:\n\n* Minimizes layover times\n* Finds cost-saving opportunities\n* Balances cost vs. convenience\n* Ensures meeting schedule requirements\n\n#### 5. **Booking Coordinator Agent** 📝\n\nFinalizes reservations:\n\n* Creates bookings for approved options\n* Generates confirmation numbers\n* Assembles complete itinerary\n* Handles booking failures gracefully\n\n**Tools:** `CreateBooking`\n\n## Workflow\n\nThe agents work together in a round-robin group chat pattern:\n\n```text\nUser Request\n    ↓\nTravel Research Agent → Finds 3 flight/hotel options\n    ↓\nPolicy Compliance Agent → Validates against policies\n    ↓\nBudget Approval Agent → Checks budget, determines if approval needed\n    ↓\nItinerary Optimizer Agent → Suggests optimizations\n    ↓\nBooking Coordinator Agent → Finalizes and confirms bookings\n```\n\n**Maximum iterations:** 5 (one per agent in round-robin)\n\n## Sample Travel Policies\n\nThe system enforces these corporate policies:\n\n* **Approved Destinations:** Seattle, San Francisco, New York, Austin, Chicago, Boston, Denver, Portland, Atlanta, Dallas\n* **Advance Booking:** Minimum 14 days before travel\n* **Flight Limits:** $800 domestic, $2,000 international\n* **Hotel Limit:** $300 per night\n* **Preferred Airlines:** United, Delta, American\n* **Preferred Hotels:** Marriott, Hilton, Hyatt\n* **Manager Approval:** Required for trips over $2,500\n\n## Sample Departments \u0026 Budgets\n\n| Department  | Project Code    | Available Budget | Already Spent |\n|-------------|-----------------|------------------|---------------|\n| Engineering | PROJ-2026-001   | $50,000          | $12,000       |\n| Marketing   | PROJ-2026-002   | $30,000          | $8,000        |\n| Sales       | PROJ-2026-003   | $75,000          | $25,000       |\n\n## Getting Started\n\n### Prerequisites\n\n* [.NET 9 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)\n* [GitHub Token](https://github.com/settings/tokens) for GitHub Models access\n* Visual Studio 2022 or VS Code\n\n### Setup\n\n1. **Clone the repository**\n\n   ```bash\n   git clone https://github.com/jongalloway/travel-booking-agents.git\n   cd travel-booking-agents\n   ```\n\n2. **Set GitHub Token**\n\n   ```bash\n   # Windows (PowerShell)\n   $env:GITHUB_TOKEN=\"your_github_token\"\n   \n   # macOS/Linux\n   export GITHUB_TOKEN=\"your_github_token\"\n   ```\n\n3. **Run with Aspire**\n\n   ```bash\n   cd src/TravelBookingAgents.AppHost\n   dotnet run\n   ```\n\n4. **Access the applications**\n    * **Blazor Web UI:** \u003chttp://localhost:5xxx\u003e (check Aspire dashboard)\n    * **Aspire Dashboard:** \u003chttp://localhost:15xxx\u003e (shown in console)\n\n### Run Console App\n\nFor a command-line demo:\n\n```bash\ncd src/TravelBookingAgents.Console\ndotnet run\n```\n\n## Usage Examples\n\n### Example 1: Conference Travel\n\n**Request:**\n\n```text\nBook travel to Microsoft Build in Seattle, May 19-21, 2026\n```\n\n**Workflow:**\n\n1. ✈️ Research finds 3 flight options ($395-$520) and 3 hotel options ($195-$285/night)\n2. ✅ Policy confirms Seattle is approved, dates meet 14-day requirement\n3. 💰 Budget calculates ~$1,200 total, no manager approval needed\n4. 📊 Optimizer suggests Delta flight with 2hr layover saves $90\n5. 📝 Booking confirms reservation with confirmation number\n\n### Example 2: Office Visit\n\n**Request:**\n\n```text\nI need to visit the Austin office next month for 3 days\n```\n\n**Workflow:**\n\n1. ✈️ Research presents flight/hotel options\n2. ✅ Policy validates Austin is approved destination\n3. 💰 Budget checks Engineering department has sufficient funds\n4. 📊 Optimizer recommends optimal departure times\n5. 📝 Booking finalizes 3-night reservation\n\n### Example 3: Policy Violation\n\n**Request:**\n\n```text\nBook last-minute trip to Miami tomorrow\n```\n\n**Expected Response:**\n\n* ❌ Policy Agent flags:\n  * Miami not in approved destinations\n  * Less than 14-day advance booking requirement\n* 💡 Suggests alternative approved destinations\n* 🔒 Workflow stops without booking\n\n## Project Structure\n\n```text\nsrc/\n├── TravelBookingAgents.API/          # Backend API with agents\n│   ├── Program.cs                     # Agent definitions \u0026 workflow\n│   ├── Models/                        # Data models\n│   │   └── TravelModels.cs           # Flight, Hotel, Policy, etc.\n│   └── Services/\n│       └── MockTravelDataService.cs  # Mock travel data \u0026 APIs\n│\n├── TravelBookingAgents.Web/          # Blazor web frontend\n│   ├── Components/\n│   │   └── Pages/\n│   │       └── Chat.razor            # Main booking interface\n│   └── Services/\n│       └── ChatService.cs            # API communication\n│\n├── TravelBookingAgents.Console/      # Console demo app\n│   └── Program.cs                    # Standalone workflow demo\n│\n├── TravelBookingAgents.AppHost/      # Aspire orchestration\n│   └── AppHost.cs                    # Service configuration\n│\n└── TravelBookingAgents.ServiceDefaults/ # Shared configurations\n    └── Extensions.cs\n```\n\n## Key Features\n\n### 🎯 Multi-Agent Orchestration\n\nFive specialized agents collaborate using round-robin group chat pattern with tool calling\n\n### 📊 Real-Time Streaming\n\nBlazor UI shows live updates as each agent processes the request\n\n### 🔧 Function Calling\n\nAgents use tools to search travel options, check policies, and create bookings\n\n### 🏢 Business Logic\n\nRealistic policies, budgets, and approval workflows mirror real corporate systems\n\n### 🎨 Modern UI\n\nClean, responsive Blazor interface with agent status indicators\n\n### ☁️ Cloud-Native\n\nAspire orchestration with service discovery, health checks, and telemetry\n\n## Conference Demo Tips\n\n### Quick Demo Flow (5 minutes)\n\n1. Show Blazor UI with sample requests\n2. Submit \"Microsoft Build in Seattle\" request\n3. Watch agents work in sequence with live status\n4. Show final booking confirmation\n5. Explain business value and agent coordination\n\n### Deep Dive (15 minutes)\n\n1. Walk through each agent's role and tools\n2. Show code for one agent (TravelResearch)\n3. Explain workflow orchestration\n4. Demo policy violation scenario\n5. Show Console app for technical audience\n6. Discuss extensibility (add agents, integrate real APIs)\n\n### Key Talking Points\n\n* ✨ **Real Business Value:** Automates manual travel booking process\n* 🤖 **Complex Coordination:** 5 agents with different responsibilities\n* 🔐 **Policy Enforcement:** Automated compliance checking\n* 💼 **Human-in-Loop:** Budget approvals for high-cost trips\n* 🚀 **Production Ready:** Error handling, state management\n* 📈 **Extensible:** Easy to add agents or integrate real APIs\n\n## Extending the System\n\n### Add New Agents\n\n```csharp\nbuilder.AddAIAgent(\"ExpenseReporter\", (sp, key) =\u003e\n{\n    return new ChatClientAgent(\n        sp.GetRequiredService\u003cIChatClient\u003e(),\n        name: key,\n        instructions: \"Generate expense reports from bookings...\",\n        tools: [\n            AIFunctionFactory.Create(GenerateExpenseReport)\n        ]\n    );\n});\n```\n\n### Integrate Real APIs\n\nReplace mock services in `MockTravelDataService.cs` with:\n\n* **Flights:** Amadeus API, Skyscanner API\n* **Hotels:** Booking.com API, Expedia API\n* **Cars:** Turo API, Enterprise API\n\n### Add Authentication\n\nIntegrate Azure AD B2C or Auth0 to:\n\n* Track user department/budget\n* Implement real manager approval workflows\n* Audit booking history\n\n## Troubleshooting\n\n**Issue:** Agents not responding\n\n* **Solution:** Check `GITHUB_TOKEN` environment variable is set\n\n**Issue:** Build errors about missing packages\n\n* **Solution:** Restore NuGet packages: `dotnet restore`\n\n**Issue:** Aspire dashboard not accessible\n\n* **Solution:** Check firewall settings, run as administrator\n\n**Issue:** Model rate limits\n\n* **Solution:** GitHub Models has rate limits; wait or use different account\n\n## Contributing\n\nContributions welcome! Areas for improvement:\n\n* Real travel API integrations\n* Additional agents (Expense reporting, Trip modifications)\n* Enhanced UI with approval workflows\n* Database for booking history\n* Email notifications\n\n## License\n\nMIT License - see [LICENSE](LICENSE)\n\n## Acknowledgments\n\nBuilt with:\n\n* [Microsoft Agents Framework](https://github.com/microsoft/agents)\n* [.NET Aspire](https://learn.microsoft.com/dotnet/aspire/)\n* [GitHub Models](https://github.com/marketplace/models)\n* [Blazor](https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor)\n\n## Contact\n\nFor questions or demo requests:\n\n* **Repository:** \u003chttps://github.com/jongalloway/travel-booking-agents\u003e\n* **Issues:** \u003chttps://github.com/jongalloway/travel-booking-agents/issues\u003e\n\n---\n\n**Ready to revolutionize corporate travel booking with AI agents!** ✈️🤖\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongalloway%2Ftravel-booking-agents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjongalloway%2Ftravel-booking-agents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongalloway%2Ftravel-booking-agents/lists"}