SeaPay: AI-Powered Hotel Booking with Crypto Payments

💡 Inspiration

AI agents are transforming how people plan trips and shop online, but traditional booking platforms charge up to 15% in fees. We saw an opportunity to combine the convenience of conversational AI with the cost-efficiency of cryptocurrency payments.

SeaPay demonstrates that AI agents can handle the entire booking workflow - from searching hotels to completing payments - while drastically reducing transaction costs through blockchain technology. By eliminating intermediaries and using USDC on Base Sepolia, we reduce fees from 15% to near-zero.

🏗️ How We Built It

SeaPay is a full-stack application combining conversational AI, blockchain payments, and the Model Context Protocol (MCP).

Architecture

Frontend (React + ChatKit)

  • Built with React 19 and Vite for a responsive, modern interface
  • Integrated OpenAI's ChatKit React SDK for seamless conversational UI
  • Custom widgets for displaying hotel cards and approval requests
  • Dark mode support with Tailwind CSS styling

Backend (Python + FastAPI + OpenAI Agents SDK)

  • FastAPI server implementing ChatKit's server interface
  • Multi-agent orchestration using OpenAI's Agents SDK:
    • seapay_agent (Supervisor) - Orchestrates the entire booking workflow
    • check_availability_agent - Searches hotels via MCP tools
    • reserve_agent - Handles reservations and HTTP 402 responses
    • payment_agent - Processes x402 cryptocurrency payments
  • Custom approval workflow with interactive widgets
  • Thread-based conversation management with persistent storage

Hotel API Server (Express + TypeScript)

  • RESTful API for hotel availability and reservations
  • x402 payment integration - Implements the HTTP 402 payment protocol
  • MCP server - Exposes tools (check_availability, reserve) for AI agents
  • Dynamic pricing based on hotel selection and stay duration
  • Base Sepolia testnet integration for USDC payments

Key Technologies

  • OpenAI Agents SDK - Multi-agent workflows with handoffs and tool calling
  • ChatKit - Conversational AI framework for thread management and streaming
  • x402 Protocol - HTTP 402 payment standard for crypto payments
  • Model Context Protocol (MCP) - Standardized tool interfaces for AI agents
  • Base Sepolia - Layer 2 blockchain testnet for fast, low-cost transactions
  • USDC - Stablecoin for predictable pricing
  • Ethereum Account - Wallet integration for signing transactions

🎯 What It Does

SeaPay provides a complete hotel booking experience through natural conversation:

  1. Search Hotels - "Find me hotels in New York for Dec 12-14, 4 guests"
  2. Browse Results - AI displays hotel cards with images, pricing, and details
  3. Select & Reserve - User selects a hotel by name or number (#1, #2, etc.)
  4. Approve Tools - User approves MCP tool calls via interactive widgets
  5. Process Payment - Automatic crypto payment via x402 (0.02 USDC for a 2-night stay!)
  6. Confirmation - Receive reservation ID and booking details

All of this happens in a conversational interface - no forms, no page refreshes, just natural language.

🚧 Challenges We Faced

Multi-Agent Memory Loss: The supervisor agent would forget previous handoffs between API calls, causing infinite loops. We solved this with HiddenContextItem messages that preserve workflow state across conversations without cluttering the UI.

Asyncio Event Management: Shared approval events caused task lifecycle conflicts. We fixed this by creating fresh events for each approval request and accessing them through module references.

User Trust & Approval: Building a secure approval flow for MCP tool calls required balancing user control with conversational fluidity. We implemented interactive widgets that pause agent execution until users explicitly approve sensitive operations.

🎓 What We Learned

  • Multi-agent orchestration requires careful context management across API boundaries
  • Blockchain payments can be seamlessly integrated into conversational workflows
  • MCP (Model Context Protocol) provides a powerful abstraction for tool-calling
  • User approval flows are critical for building trustworthy AI agents
  • x402 protocol makes crypto payments feel as simple as any other API call
  • Streaming responses create a responsive, engaging user experience

🚀 What's Next for SeaPay

  • Integrate real hotel inventory APIs (Booking.com, Expedia)
  • Deploy on Base mainnet with real USDC payments
  • Add flight + hotel bundles for complete trip planning
  • Implement smart contract escrow for cancellations and refunds

💰 The Impact

For Travelers:

  • Save up to 15% on every booking (no platform fees)
  • Transparent, on-chain payment records
  • Fast settlement (seconds vs. days)
  • Control your data and payment flow

For Hotels:

  • Receive payments directly, instantly
  • Eliminate chargebacks (blockchain-verified payments)
  • Lower operational costs
  • Access to crypto-native travelers

For the Industry:

  • Demonstrates practical AI + crypto integration
  • Proves conversational commerce is ready for real-world use
  • Shows MCP as a viable standard for agent tools
  • Validates x402 as a payment protocol
Share this project:

Updates