diff --git a/src/Infrastructure/BotSharp.Core/Routing/RoutingContext.cs b/src/Infrastructure/BotSharp.Core/Routing/RoutingContext.cs index 6b126a370..31caa932f 100644 --- a/src/Infrastructure/BotSharp.Core/Routing/RoutingContext.cs +++ b/src/Infrastructure/BotSharp.Core/Routing/RoutingContext.cs @@ -118,6 +118,7 @@ await hook.OnAgentDequeued(agentId, currentAgentId, reason: reason) var message = new RoleDialogModel(AgentRole.User, $"Try to route to agent {agent.Name}") { + CurrentAgentId = currentAgentId, FunctionName = "route_to_agent", FunctionArgs = JsonSerializer.Serialize(new FunctionCallFromLlm {