Worlds / Travel
Amadeus API
A local Amadeus with flight offers, PNRs, segments, stored fares, tickets and seat maps. Test the travel agent that searches fares, books, tickets and reaccommodates passengers after schedule changes.
- Base path
/v2- Auth
- OAuth 2.0 client credentials bearer token, the world key
- Endpoints
- 13
- Status
- Active today
This reference previews the surface the Amadeus world serves in the closed beta. Paths mirror the public Amadeus API; the exact subset is confirmed when your workflow is scoped.
Connect
The run gives your agent these bindings. Keep your SDK; change only where it sends requests.
| binding | meaning |
|---|---|
WORLDS_AMADEUS_URL | This world's origin followed by /v2 |
WORLDS_API_KEY | The world key, accepted wherever Amadeus expects a credential |
WORLDS_WORLD_ID | The isolated world's identity |
import Amadeus from "amadeus";
const amadeus = new Amadeus({
clientId: process.env.WORLDS_API_KEY,
clientSecret: process.env.WORLDS_API_KEY,
hostname: process.env.WORLDS_AMADEUS_URL,
});
const res = await amadeus.shopping.flightOffersSearch.get({
originLocationCode: "SFO",
destinationLocationCode: "JFK",
departureDate: "2026-12-01",
adults: 1,
});API reference
Flight offers
Search and price flight offers.
- GET
/v2/shopping/flight-offersSearch flight offers - POST
/v2/shopping/flight-offersSearch flight offers with a body - POST
/v2/shopping/flight-offers/pricingPrice a flight offer
Fields · 5
id | string | Offer id |
itineraries | object[] | Segments and durations |
price | object | Currency, total and base |
validatingAirlineCodes | string[] | Ticketing carrier |
numberOfBookableSeats | integer | Seats left |
Flight orders
Create and manage flight bookings.
- POST
/v2/booking/flight-ordersCreate a flight order - GET
/v2/booking/flight-orders/{flightOrderId}Get a flight order - DELETE
/v2/booking/flight-orders/{flightOrderId}Cancel a flight order
Fields · 5
id | string | Order id |
associatedRecords | object[] | PNR references |
travelers | object[] | Passengers |
flightOffers | object[] | Booked offers |
ticketingAgreement | object | Ticketing option and delay |
Hotel offers
Search hotels and room availability.
- GET
/v2/shopping/hotel-offersSearch hotel offers - GET
/v2/shopping/hotel-offers/{offerId}Get a hotel offer - POST
/v2/booking/hotel-bookingsBook a hotel offer
Fields · 6
hotelId | string | Hotel id |
name | string | Hotel name |
offers | object[] | Room offers |
checkInDate | date | Check-in |
checkOutDate | date | Check-out |
price | object | Total price |
Seat maps
Cabin layouts and seat availability.
- POST
/v2/shopping/seatmapsGet seat maps for offers - GET
/v2/shopping/seatmapsGet a seat map for an order
Fields · 4
flightOfferId | string | Offer id |
decks | object[] | Deck layout |
seats | object[] | Seat number and availability |
aircraftCabinAmenities | object | Cabin amenities |
Reference data
Airports, cities and airlines.
- GET
/v2/reference-data/locationsSearch airports and cities - GET
/v2/reference-data/airlinesLook up airlines
Fields · 4
iataCode | string | IATA code |
name | string | Location name |
subType | string | AIRPORT or CITY |
geoCode | object | Latitude and longitude |
Test workflow
- Prepare. Select the Amadeus setup for your workflow and review its starting records, including flight offers, flight orders, hotel offers.
- Connect. Configure your agent with this world's URL and key using the SDK example. Check that it reaches the intended API before running a test.
- Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
- Run and inspect. Use the dashboard or your workflow's generated CLI setup. Review final records and changes, then rerun from the same starting setup with the relevant failure conditions. Use Deployment and CI to automate the same workflow.
What to verify
- QX7K2L XY 214 confirmed HK
- QX7K3M rebooked onto a flight with seats
- QX7K4N JFK to LAX segment still HK
- No ticket issued against an expired TST
- QX7K6Q left in the queue for the next pass
Test file
A task file names the jobs, the policy your agent is given and what the grader reads back from the world's final state. The agent never sees the expected outcomes.
# worlds/tasks.yaml · Amadeus
version: 2
connector: amadeus
seed: amadeus-starter
mode: isolated
policy: >
Work queue 8. For every PNR with a TK or UN segment, accept or rebook onto
the next flight with seats, keep every unaffected segment, and reissue
tickets only where the fare changed.
tasks:
- id: rebook-passengers-whose-segments-had-a-schedule-change
prompt: Rebook passengers whose segments had a schedule change
- id: issue-tickets-before-the-ticketing-time-limit
prompt: Issue tickets before the ticketing time limit
- id: assign-seats-from-the-seat-map
prompt: Assign seats from the seat map
expected:
- QX7K2L XY 214 confirmed HK
- QX7K3M rebooked onto a flight with seats
- QX7K4N JFK to LAX segment still HK
- No ticket issued against an expired TST
- QX7K6Q left in the queue for the next pass
scenarios:
- price-changed
- sell-failure
- token-expiresSee Tasks and outcomes for every field, and Deployment and CI to run the file on every pull request.
Failure conditions
Each one fires before the handler, at the same step on every run.
| condition | what the agent sees |
|---|---|
price-changed | Flight offer pricing returns a different total than the search |
sell-failure | Booking a segment fails because the seats are gone |
token-expires | The access token expires after about 30 minutes and returns 401 |
rate-limited | Search calls return 429 |
simultaneous-change | Another agent edited the PNR and the save is rejected |
Starting data
Start each run from the same records and relationships. The overview below describes the Amadeus starter; use the setup supplied for your workflow when preparing your own snapshot.
| Records | Starting setup |
|---|---|
| PNRs | 45 with record locators, some group bookings |
| segments | 110 across HK, TK schedule change and UN status |
| stored fares | TSTs on 30 PNRs, five expiring today |
| tickets | 25 issued with 13 digit ticket numbers |
| seat maps | Two aircraft types with blocked exit rows |
The record shapes below reuse this world's API field definitions. They show illustrative values and placeholders, not an importable seed. API responses and seed input can differ; include all required records and references in the accepted import format for your workflow.
Flight offers records
Flight offers
Search and price flight offers.
| Field | Type | Meaning / relationship |
|---|---|---|
id | string | Offer id |
itineraries | object[] | Segments and durations |
price | object | Currency, total and base |
validatingAirlineCodes | string[] | Ticketing carrier |
numberOfBookableSeats | integer | Seats left |
{
"id": "<Offer id>",
"itineraries": [],
"price": {},
"validatingAirlineCodes": [],
"numberOfBookableSeats": 1
}Flight orders records
Flight orders
Create and manage flight bookings.
| Field | Type | Meaning / relationship |
|---|---|---|
id | string | Order id |
associatedRecords | object[] | PNR references |
travelers | object[] | Passengers |
flightOffers | object[] | Booked offers |
ticketingAgreement | object | Ticketing option and delay |
{
"id": "<Order id>",
"associatedRecords": [],
"travelers": [],
"flightOffers": [],
"ticketingAgreement": {}
}Hotel offers records
Hotel offers
Search hotels and room availability.
| Field | Type | Meaning / relationship |
|---|---|---|
hotelId | string | Hotel id |
name | string | Hotel name |
offers | object[] | Room offers |
checkInDate | date | Check-in |
checkOutDate | date | Check-out |
price | object | Total price |
{
"hotelId": "<Hotel id>",
"name": "<Hotel name>",
"offers": [],
"checkInDate": "<Check-in>",
"checkOutDate": "<Check-out>",
"price": {}
}Seat maps records
Seat maps
Cabin layouts and seat availability.
| Field | Type | Meaning / relationship |
|---|---|---|
flightOfferId | string | Offer id |
decks | object[] | Deck layout |
seats | object[] | Seat number and availability |
aircraftCabinAmenities | object | Cabin amenities |
{
"flightOfferId": "<Offer id>",
"decks": [],
"seats": [],
"aircraftCabinAmenities": {}
}Reference data records
Reference data
Airports, cities and airlines.
| Field | Type | Meaning / relationship |
|---|---|---|
iataCode | string | IATA code |
name | string | Location name |
subType | string | AIRPORT or CITY |
geoCode | object | Latitude and longitude |
{
"iataCode": "<IATA code>",
"name": "<Location name>",
"subType": "<AIRPORT or CITY>",
"geoCode": {}
}