Skip to content

Python: GroupChatManager Lacks Chat History for Follow-up Questions #12402

Closed
@MarekFabinski

Description

@MarekFabinski

I am working with the GroupChatManager in Python, following the official documentation on Agent Orchestration with Group Chat.

My goal is to create a multi-turn conversation where agents can respond to follow-up questions by retaining the context of the preceding conversation.

Expected Behavior

  • User asks an initial question: "Give me a list of 5 products from Contoso."
  • The GroupChatManager selects the appropriate agent to answer.
  • The selected agent answers: "Here are 5 products from Contoso: [Product A, Product B, Product C, Product D, Product E]."
  • User asks a follow-up question: "Provide me with 2 more."
  • The GroupChatManager understands the conversational context and re-engages the same agent.
  • The agent answers by recalling the previous turn: "Here are two more products: [Product F, Product G]."

Actual Behavior
The GroupChatManager and the selected agent do not appear to retain the chat history. When the user asks a follow-up question ("Provide me with 2 more"), the agent fails to understand the context and asks for clarification, such as, "What products are you referring to?". The history of the conversation is lost.

What I've Tried
Managing the conversation in a while loop and attempting to pass the chat history back to the manager on each turn.
Investigating the use of Azure AI Foundry threads to maintain a persistent conversation state, but I could not find a clear implementation path for integrating this with the GroupChatManager.

Question
Is there a standard method for preserving and passing chat history to the GroupChatManager to enable contextual follow-up conversations? Could this be a potential bug, or am I missing a step in the implementation?

Any guidance on how to properly manage conversation history in this scenario would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonPull requests for the Python Semantic Kerneltriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions