Relay Engine — how Relay keeps a booked trip true

Engineering detail, for people who want it. Relay is a shared AI agent for group travel.

Relay V3 & V4 · Monitor and Adapt

Booked doesn't mean
it still holds.

Once a group has decided and booked, the trip starts drifting. A flight moves, a fare re-prices, a charge lands twice, a hotel never confirms. This is the engine that watches for it and repairs it — the Monitor and Adapt halves of Relay. It runs on the shared trip that coordination creates, which is why we are building that first.

order streamreconciling…
The problem

A trip is a dependency graph. Every confirmation email thinks it stands alone.

SEA → SFO→ SFO → NRT→ airport transfer→ hotel check-in→ dinner for 5

Delay the first leg three hours and the connection is at risk, the transfer pickup is wrong, check-in is late and the dinner table is gone. Five reservations, five suppliers, five emails — and not one of them knows about the other four. Today the organiser is the integrity layer: they notice, they work out what else just broke, they ring round. That is the job this engine takes over. It can only do it because Relay already holds the trip as one object, with every booking and every dependency in one place.

✕
Charged, never ticketedthe payment cleared but the booking failed downstream
✕
Duplicate chargea retried call after a timeout books once, charges twice
✕
Price driftthe amount charged doesn't match what the customer agreed to
✕
Terms changeda refundable fare quietly books as non-refundable
✕
One traveller breaks the groupfour itineraries still work; the fifth no longer meets them
✕
Refund that never landsmarked "processed" on one side, absent on the other
How it works

Detect, propose, and only then act.

01

Three views of every booking

What the group agreed to, what was actually charged, and what the supplier actually confirmed. Relay holds all three because it was in the room when the decision was made.

02

Reconciled continuously

Compared across amount, currency, dates, route, passengers, fare rules and completeness — and against the rest of the trip, so one delay surfaces everything downstream of it.

03

A fix the group approves

Not an alert. A priced, specific proposal — rebook, refund, re-time the transfer — that goes to the people who have to agree, and executes once, within a ceiling they already set.

The interface

One endpoint. One verdict. One tool an agent can call.

The thing that needs this isn't a person watching a dashboard — it's the agent that just booked. Relay calls it after every booking and on every supplier update, and registers it as a tool the agent can invoke itself when a traveller asks whether something came through.

POST /v1/reconcile
{
  "order_id": "ord_9F2k",
  "agreed": { "amount": 2480.00, "currency": "USD",
              "route": "SFO-NRT", "refundable": true },
  "charged": { "amount": 2480.00, "processor": "stripe",
               "charge_id": "ch_1P..." },
  "confirmed": { "supplier": "duffel", "status": "failed" }
}

// → 200 OK
{
  "verdict": "flagged",
  "flags": [{ "code": "unissued_after_charge",
              "severity": "critical" }],
  "remediation": { "action": "stripe.refund_full",
                   "status": "proposed" }
}
agent tool definition
{
  "name": "check_order_integrity",
  "description": "Verify a travel order
    after checkout by comparing payment,
    booking request, and supplier confirmation.",
  "parameters": {
    "order_id": "string",
    "agreed": "object",
    "charged": "object",
    "confirmed": "object"
  }
}

// any agent that can call a tool
// can call Relay after it books.
What Relay catches

Ten ways a booked trip stops being true.

Fulfilment

unissued_after_charge

The card was charged; the ticket was never issued.

Payment

duplicate_charge

A retried call after a timeout books once and charges twice.

Pricing

price_drift

The amount charged doesn't match what the group agreed to.

Pricing

currency_mismatch

Charged in a different currency than the one quoted.

Terms

fare_rule_drift

A refundable fare quietly books as non-refundable.

Record

route_mismatch

The confirmed flight isn't the route that was chosen.

Record

date_mismatch

Confirmed dates don't match the dates the group approved.

Record

passenger_mismatch

A name on the ticket isn't the traveller it was booked for.

Completeness

partial_order

The flight books; the hotel fails — or the reverse.

Recovery

refund_not_landed

Marked processed upstream, never arrives for the traveller.

Everyone owns a piece

Everyone owns a piece of the trip. Nobody owns the trip.

Muse, ChatGPT, Gemini
Intent, planning, and now booking.
One person, one session. No shared state to monitor.
Expedia, Booking, Airbnb
Inventory, price, the transaction.
One payer, one reservation. Blind to the other four bookings.
TripIt, itinerary apps
A tidy record after booking.
Read-only. It decides nothing and repairs nothing.
Where this sits

V1 has to work before any of this does.

Each version of Relay runs on the state the last one created. Coordination comes first, because without a real shared trip there is nothing to monitor and nothing to repair. This page describes V3 and V4. The engine is built and tested; what it is waiting for is the trip object that V1 produces.

V1

Coordinate

Understand each traveller; help the group decide what to book. Shipping now.

V2

Execute

Complete the bookings and hold the shared trip state.

V3

Monitor

Track reservations, prices, schedules and dependencies. This page.

V4

Adapt

Handle disruptions, coordinate approvals, execute the fix. This page.

Three things Relay has to own before Adapt works: the right to change a booking — almost every agent can place an order, almost none can amend one; group-shaped supply — adjacent rooms, five seats together, a table that survives a time change; and standing authority — who may act for whom, up to what amount, with how many yeses.

Planning a trip with friends right now? Join the waitlist.