You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
.NET: Error running an Azure Function following samples and using NuGet packages for Microsoft.Agents.AI.Hosting.AzureFunctions and Microsoft.Agents.AI.OpenAi #2327
I'm working with the dotnet samples for Azure Functions. I created a new solution with a new function setting it up just like one of the samples referencing the NuGet packages for Microsoft.Agents.AI.OpenAi and Microsoft.Agents.AI.Hosting.AzureFunctions and I'm getting an error consistently.
I took my new function, added it to the agent-framework-dotnet sample solution and changed the package references for Microsoft.Agents.AI.OpenAi and Microsoft.Agents.AI.Hosting.AzureFunctions to use the projects in that solution and my function started to work.
I tried the reverse as well and took one of the sample function apps, put it in my solution and had it get those two packages from NuGet and the sample started to fail with the same error as my function app.
Is there an issue with the NuGet packages? Has anyone else had an issue? Here is the error I see running referencing the NuGet packages.
Microsoft.DurableTask.Entities.EntityOperationFailedException: 'Operation 'RunAgentAsync' of entity '@dafx-@e86fd2952ea25d8787b81c9e14acffbd' failed: Invocation of function 'dafx-' failed with an exception.'
changed the title [-]Error running an Azure Function following samples and using NuGet packages for Microsoft.Agents.AI.Hosting.AzureFunctions and Microsoft.Agents.AI.OpenAi[/-][+].NET: Error running an Azure Function following samples and using NuGet packages for Microsoft.Agents.AI.Hosting.AzureFunctions and Microsoft.Agents.AI.OpenAi[/+]on Nov 19, 2025
I too can't get the Azure Durable Functions to work... It can get it to work, but get this error when trying to call it as described in the sample (if called with ):
[2025-11-27T19:51:37.307Z] Function 'dafx-MyAgent', Invocation id 'f40315a0-a3a7-42a7-a360-b2a36f88a2ba': An exception was thrown by the invocation. [2025-11-27T19:51:37.308Z] Result: Function 'dafx-MyAgent', Invocation id 'f40315a0-a3a7-42a7-a360-b2a36f88a2ba': An exception was thrown by the invocation. Type: Exception: Microsoft.Azure.Functions.Worker.FunctionInputConverterException: Error converting 1 input parameters for Function 'dafx-MyAgent': Cannot convert input parameter 'dispatcher' to type 'Microsoft.Azure.Functions.Worker.TaskEntityDispatcher' from type 'System.String'. Error:System.Text.Json.JsonException: 'C' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
Based on that it looks like it expect JSON, but if some random JSON is sent you just get:
400 Bad Request:
Run request cannot be empty.
Also, in 01_SingleAgent, there are no normal Azure Functions defined, but when I try that in my Azure Function I get this error:
[2025-11-27T19:55:54.857Z] Worker failed to index functions [2025-11-27T19:55:54.858Z] Result: Failure Type: Exception: System.IO.FileNotFoundException: Function metadata file not found. File path used:X:\MicrosoftAgentFrameworkSamples\src\FunctionApp.HelloAI\bin\Debug\net10.0\functions.metadata
I was able to reproduce the FunctionInputConverterException issue locally. It looks like it might be a regression in the latest version(s) of the Durable Task dependencies, which are newer than the ones used by the samples in the agent framework repo.
Can you try pinning to the following nuget package versions and see if that resolves the issue?
The problem appears to be in the 1.11.0 version of Microsoft.Azure.Functions.Worker.Extensions.DurableTask. I tested and both 1.9.0 and 1.10.0 work as expected.
Hi @FMERI001 and @rwjdk. Would it be possible for you to share your reproducer project so we can try it locally? Alternatively, can you share your csproj file contents?
A fix for this issue has been merged. The next release of Microsoft.Agents.AI.Hosting.AzureFunctions should be compatible with the newer Durable Functions packages.
Activity
[-]Error running an Azure Function following samples and using NuGet packages for Microsoft.Agents.AI.Hosting.AzureFunctions and Microsoft.Agents.AI.OpenAi[/-][+].NET: Error running an Azure Function following samples and using NuGet packages for Microsoft.Agents.AI.Hosting.AzureFunctions and Microsoft.Agents.AI.OpenAi[/+]alliscode commentedon Nov 20, 2025
Chris Gillum (@cgillum) could someone from your team take a look at this?
rwjdk commentedon Nov 27, 2025
I too can't get the Azure Durable Functions to work... It can get it to work, but get this error when trying to call it as described in the sample (if called with ):
[2025-11-27T19:51:37.307Z] Function 'dafx-MyAgent', Invocation id 'f40315a0-a3a7-42a7-a360-b2a36f88a2ba': An exception was thrown by the invocation. [2025-11-27T19:51:37.308Z] Result: Function 'dafx-MyAgent', Invocation id 'f40315a0-a3a7-42a7-a360-b2a36f88a2ba': An exception was thrown by the invocation. Type: Exception: Microsoft.Azure.Functions.Worker.FunctionInputConverterException: Error converting 1 input parameters for Function 'dafx-MyAgent': Cannot convert input parameter 'dispatcher' to type 'Microsoft.Azure.Functions.Worker.TaskEntityDispatcher' from type 'System.String'. Error:System.Text.Json.JsonException: 'C' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.Based on that it looks like it expect JSON, but if some random JSON is sent you just get:
400 Bad Request:
Run request cannot be empty.
Also, in 01_SingleAgent, there are no normal Azure Functions defined, but when I try that in my Azure Function I get this error:
[2025-11-27T19:55:54.857Z] Worker failed to index functions [2025-11-27T19:55:54.858Z] Result: Failure Type: Exception: System.IO.FileNotFoundException: Function metadata file not found. File path used:X:\MicrosoftAgentFrameworkSamples\src\FunctionApp.HelloAI\bin\Debug\net10.0\functions.metadataCan you confirm that these Samples work?
cgillum commentedon Nov 28, 2025
Hi Francisco Merizalde (@FMERI001) and Rasmus Wulff Jensen (@rwjdk). Would it be possible for you to share your reproducer project so we can try it locally? Alternatively, can you share your csproj file contents?
/cc Shyju Krishnankutty (@kshyju)
cgillum commentedon Nov 28, 2025
I was able to reproduce the
FunctionInputConverterExceptionissue locally. It looks like it might be a regression in the latest version(s) of the Durable Task dependencies, which are newer than the ones used by the samples in the agent framework repo.Can you try pinning to the following nuget package versions and see if that resolves the issue?
The problem appears to be in the
1.11.0version ofMicrosoft.Azure.Functions.Worker.Extensions.DurableTask. I tested and both1.9.0and1.10.0work as expected./cc Tomer Rosenthal (@torosent)
cgillum commentedon Nov 28, 2025
To prevent further users from running into this, I've unlisted Microsoft.Azure.Functions.Worker.Extensions.DurableTask v1.11.0. You should be able to use v1.10.0 until we have a fix.
rwjdk commentedon Nov 28, 2025
Chris Gillum (@cgillum) Works for me after the nuget package downgrade
rwjdk commentedon Nov 28, 2025
My version of the code if still interested; https://github.com/rwjdk/MicrosoftAgentFrameworkSamples/tree/main/src/FunctionApp.HelloAI
cgillum commentedon Dec 19, 2025
A fix for this issue has been merged. The next release of Microsoft.Agents.AI.Hosting.AzureFunctions should be compatible with the newer Durable Functions packages.