Skip to content

Maintain State for Multi-Turn Slot Filling in a Multi-Agent Handoff Scenario #1815

@tnduyh5

Description

@tnduyh5

Hi,

I’m building a multi-agent workflow with the OpenAI Agents SDK and am running into a routing/state issue during slot filling after a handoff.

Setup

  • Main (Orchestrator) Agent
    Role: Classifies the user’s intent and delegates via handoff to the right specialist.

  • Rental Car Agent (Specialist)
    Role: Handles rental car bookings.
    Tool: make_car_reservation(location: str, date: str)
    Behavior: If location or date is missing, the agent asks follow-ups until all required slots are filled, then calls its tool.

Problem (Current vs. Expected)

  • Current (Incorrect)

    1. User: “Hi, I’d like to book a rental car.”
    2. Main Agent routes via handoff to rental_car_agent.
    3. Rental Car Agent: “Where would you like to pick up the car?”
    4. User: “I’ll be in San Francisco.”
    5. Bug: The Main Agent treats this as a fresh query and replies itself (breaking the flow), instead of letting the Rental Car Agent continue slot filling.
  • Expected (Correct)
    After the initial handoff, subsequent user replies in this session should be sticky to the Rental Car Agent until it either:
    a) completes the slot filling and calls make_car_reservation(...), or
    b) explicitly hands back control to the Main Agent.
    In other words, routing should bypass general intent detection while a specialist-led slot-filling routine is in progress.

My Questions

  1. Forced Routing During Slot Filling
    What is the recommended pattern to guarantee that user replies are routed back to the same specialist agent after a handoff—until that agent finishes or explicitly returns control?

Thanks!

Debug information

  • Agents SDK version: 0.2.11
  • Python version: 3.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:coreneeds-more-infoWaiting for a reply/more info from the authorquestionQuestion about using the SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions