diff --git a/src/Infrastructure/BotSharp.Core/Routing/RoutingService.InvokeAgent.cs b/src/Infrastructure/BotSharp.Core/Routing/RoutingService.InvokeAgent.cs index feb75ef6..8d5f18de 100644 --- a/src/Infrastructure/BotSharp.Core/Routing/RoutingService.InvokeAgent.cs +++ b/src/Infrastructure/BotSharp.Core/Routing/RoutingService.InvokeAgent.cs @@ -32,6 +32,7 @@ public partial class RoutingService role: AgentRole.Function); message.FunctionName = response.FunctionName; message.FunctionArgs = response.FunctionArgs; + message.CurrentAgentId = agent.Id; await InvokeFunction(agent, message, dialogs); } else