Workflow Orchestration · Python SDK harness

Airline Customer-Service Triage with FAQ and Seat-Change Handoffs

An OpenAI Agents SDK example routes airline customer questions to a keyword-based FAQ agent and seat-change requests to a booking agent that updates example conversation context.

Evidence DocumentedAgent OpenAI Agents SDKHarness Python SDK harnessAdded 30 Nov 2026

What This Workflow Does

A triage agent can hand off to an FAQ agent or a seat-booking agent; the specialist agents can hand back to triage.

The FAQ tool uses keyword matching and fixed sample answers for baggage, seating, and Wi-Fi questions, and returns an unknown-answer response otherwise.

The seat-booking routine asks for a confirmation number and desired seat, then calls a tool that updates those values in the example's context; a handoff hook sets a flight number.

The async conversation loop carries forward input history and context, runs the current agent with tracing, and prints messages, tool events, and handoffs.

Written for Airline customer-service triage assistant. Goal: Workflow Orchestration.

Agent, Harness & Requirements

The workflow runs on OpenAI Agents SDK inside a Python SDK harness. You embed the agent loop in Python and own the tools, state, and deployment.

  • A Python runtime for the asynchronous example, the OpenAI Agents SDK and Pydantic imports used in the file, and the repository-local examples.auto_mode helpers it imports.

How It Works

  1. Create a typed airline context with passenger, confirmation, seat, and flight fields.
  2. Define the FAQ lookup and seat-update tools, plus a handoff hook that assigns a sample flight number.
  3. Configure FAQ and seat-booking agents with their respective routines, and a triage agent with handoffs to both specialists.
  4. Run the async loop from the triage agent, preserve context and conversation input between turns, and display the run events.

Illustrative excerpt from the source example

triage_agent = Agent[AirlineAgentContext](
    name="Triage Agent",
    handoffs=[
        handoff(agent=faq_agent, tool_name_override="transfer_to_faq_agent"),
        handoff(
            agent=seat_booking_agent,
            on_handoff=on_seat_booking_handoff,
            tool_name_override="transfer_to_seat_booking_agent",
        ),
    ],
)

Evidence & Source

Documented OpenAI's SDK example code documents the agents, handoffs, tools, and conversation loop for this sample workflow; it is provider documentation, not independent validation.

Customer service example — OpenAI Agents SDK (examples/customer_service/main.py)

OpenAI Agents SDK GitHub repository · checked 30 Nov 2026

Open the source

Limitations

  • The FAQ tool is a hard-coded keyword matcher with fixed sample responses, not a general FAQ retrieval system.
  • The seat tool updates example in-memory context, and the handoff hook assigns a random sample flight number; the source does not show integration with or verification against an airline booking service.

This record describes what the source states. It is not a review, a benchmark, or a recommendation. If the tool has changed since the check date, report it.