Skip to content

open-agreements/hotel-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Accord Hotel Agent Demo

Standalone Next.js demo for an agentic hotel-booking flow:

  • user enters natural-language travel constraints
  • backend searches LiteAPI hotel rates
  • backend validates a Concerto-shaped booking constraint payload
  • backend evaluates obligations and violations
  • Gemini summarizes the real provider results
  • user can confirm a recommended offer, which calls LiteAPI prebook only

No final booking or payment is performed.

Run

npm install
cp .env.example .env.local
npm run dev

Open:

http://localhost:3000/demo/hotel-agent

Environment

LITEAPI_API_KEY=...
GEMINI_API_KEY=...
GEMINI_MODEL=gemini-3.1-flash-lite

If LITEAPI_API_KEY is missing, the demo uses deterministic sample offers. If GEMINI_API_KEY is missing, the demo still evaluates offers but uses a deterministic summary.

Agent Endpoints

GET  /api/agent/card
POST /api/agent/tasks
POST /api/liteapi/prebook

/api/agent/tasks accepts:

{
  "taskId": "demo-1",
  "input": {
    "message": "Find me a hotel under $250/night, refundable until 24 hours before check-in.",
    "constraints": {
      "maxNightlyRateUsd": 250,
      "refundableUntilHoursBeforeCheckIn": 24,
      "requireNoCookiePricing": true,
      "requireUserConfirmationBeforePayment": true
    }
  }
}

Models

The demo includes two small Concerto model files under models/:

  • payment.cto
  • hotel.cto

The runtime validates the generated booking object against the expected model shape. It does not embed a full Concerto parser.

About

Standalone hotel booking agent demo with Accord-style constraints, LiteAPI rates, and Gemini summaries

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors