.Net: Bug: ChatCompletionAgent without Description hangs indefinitely
Describe the bug When used in an Orchestration (tested with Parallel and Sequential), a ChatCompletionAgent without a description will hang indefinitely or time out (if timeout specified) without a response.
Log output when hung:
trce: Microsoft.SemanticKernel.Agents.Orchestration.Sequential.SequentialOrchestration[0]
REGISTER SequentialOrchestration Start: SequentialOrchestration_5b2f6297ec9549a98ebb7c47cb21e1e2/default
info: Microsoft.SemanticKernel.Agents.Orchestration.Sequential.SequentialOrchestration[0]
REGISTER ACTOR SequentialOrchestration MEMBER #2: SequentialOrchestration_5b2f6297ec9549a98ebb7c47cb21e1e2_Agent_2
info: Microsoft.SemanticKernel.Agents.Orchestration.Sequential.SequentialOrchestration[0]
REGISTER ACTOR SequentialOrchestration MEMBER #1: SequentialOrchestration_5b2f6297ec9549a98ebb7c47cb21e1e2_Agent_1
trce: Microsoft.SemanticKernel.Agents.Orchestration.Sequential.SequentialOrchestration[0]
REGISTER SequentialOrchestration Complete: SequentialOrchestration_5b2f6297ec9549a98ebb7c47cb21e1e2/default
info: Microsoft.SemanticKernel.Agents.Orchestration.Sequential.SequentialOrchestration[0]
INVOKE SequentialOrchestration: SequentialOrchestration_5b2f6297ec9549a98ebb7c47cb21e1e2/default
trce: Microsoft.SemanticKernel.Agents.Orchestration.Sequential.SequentialOrchestration[0]
YIELD SequentialOrchestration: SequentialOrchestration_5b2f6297ec9549a98ebb7c47cb21e1e2/default
info: Microsoft.SemanticKernel.Agents.Orchestration.AgentOrchestration.RequestActor[0]
INIT SequentialOrchestration: SequentialOrchestration_5b2f6297ec9549a98ebb7c47cb21e1e2_Boot/default
info: Microsoft.SemanticKernel.Agents.Orchestration.AgentOrchestration.RequestActor[0]
START SequentialOrchestration: SequentialOrchestration_5b2f6297ec9549a98ebb7c47cb21e1e2_Boot/default
To Reproduce Use https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/GettingStartedWithAgents/Orchestration/Step01_Concurrent.cs and remove the description from one or both of the agents.
Expected behavior
If description is a required field of ChatCompletionAgent, it should either ideally be a non-nullable constructor parameter, or at the very least a clear exception should be thrown upon invocation if description has not been provided.
Platform
- Language: C#
- Source: NuGet package 1.62.0
- AI model: o4-mini
- IDE: repro in LinqPad
- OS: repro on Mac
I get the same issue even if I have the Description
Same for me, even with Description. AzureOpenAI agent worked when I set Description, but ChatCompletionClient doesn't. I used SequentialOrchestrator
To me, it seems that some exception is hiddenly caught that causes the orchestration to hang forever. I played around with various IChatCompletionServices registered for Dependency Injection.
In general, orchestration works with 'OpenAIChatCompletion' and also with 'GoogleAIGeminiChatCompletion' (only tested with handoff). However, it seems that if you make any mistake that is discovered only at runtime, the orchestration gets stuck. For example, I used the wrong API key and there was no error, no log output, nothing: The 'await orchestrationResult.GetValueAsync(..)'-call is just stuck forever.
I agree description should be validated early. Looking...
Agreed, same here hangs on starting without description.
Confirmed hang without description; successfully tested ChatCompletionAgent with a populated Description.
Damn, it was the field decription the issue, how come they don't document that clearly ? Or do they ? Thanks guys I was able to solve my Orchestration (for now)