Skip to content
← All AI workflows

OpenAI: test airline-agent handoffs with synthetic requests

OpenAI's Agents SDK customer-service example passes shared conversation context between specialist agents and calls mock tools. It demonstrates local routing and state changes, not real airline bookings. Test missing state, repeated requests and unauthorized actions with synthetic data.

From the source

Public repository page from OpenAI
OpenAI · Captured 2026-10-14Read the original

How it works

  • The context contains optional passenger, confirmation, seat and flight fields.
  • The FAQ tool returns fixed keyword-selected answers rather than querying a live airline policy service.
  • The seat tool changes local confirmation and seat context and asserts that a flight number exists. It does not call a reservation API or verify seat availability.
  • The handoff callback generates a random FLT identifier. A confirmation message does not prove a real booking changed.
  • The public main-branch file is not a pinned release. Use synthetic requests to test missing state, mistaken intent and repeated requests.
  • The source was inspected without executing code or model calls. No passenger data or reservation system was accessed.

Workflow guide

  1. Pin the example version. Review documented Python and SDK dependencies before local setup.

  2. Prepare a fixed synthetic conversation set covering itinerary, FAQ and seat-change requests.

  3. Plan expected specialist routes and shared-context changes before authorizing isolated execution.

  4. After approval, inspect tool calls, the flight-number precondition and the demonstration-only random flight number.

  5. Verify missing-state failures, mistaken intent, repeated requests and unauthorized-action blocking against expected results.

  6. Require a separate approved design for authenticated reservation services, verified booking state, audit logs and human-approved consequential actions before production adaptation.

Sources and downloads

Discuss this workflow →

Book a call

A free 30 minute call. Tell us where you are with AI, what your IT allows, and what management needs to see. We'll tell you honestly what we would do first.