.NET: document Azure Functions trigger discovery#5946
Conversation
There was a problem hiding this comment.
Pull request overview
Documents and mitigates an Azure Functions (.NET isolated) Durable Functions trigger discovery limitation that can prevent hosted agent HTTP routes from being indexed unless at least one durable trigger exists in the app assembly.
Changes:
- Added a note to the AzureFunctions hosting package README explaining the need for a local
[OrchestrationTrigger]for trigger discovery in hosting-only apps. - Added a minimal no-op orchestrator (
DurableTriggerDiscovery) to the06_host_your_agentAzure Functions sample to ensure Durable Functions indexing occurs. - Added troubleshooting guidance to the Durable Agents Azure Functions samples README for missing hosted agent routes.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI.Hosting.AzureFunctions/README.md | Documents the trigger discovery requirement and provides a minimal orchestrator example. |
| dotnet/samples/04-hosting/DurableAgents/AzureFunctions/README.md | Adds a troubleshooting note for when hosted agent routes don’t appear. |
| dotnet/samples/01-get-started/06_host_your_agent/DurableTriggerDiscovery.cs | Introduces a local no-op orchestrator to force Durable trigger discovery/indexing. |
| By default, each agent can be invoked via a built-in HTTP trigger function at the route `http[s]://[host]/api/agents/{agentName}/run`. | ||
|
|
||
| > [!NOTE] | ||
| > In .NET isolated Azure Functions apps, the worker SDK discovers Durable Functions triggers from the app assembly. If your app only hosts agents through `ConfigureDurableAgents(...)` and does not define any Durable orchestrator functions, add a small `[OrchestrationTrigger]` function in your app assembly so the Durable extension is indexed. |
a6344b3 to
53b6127
Compare
|
Refreshed on current main. Local validation passed: dotnet build dotnet\samples\01-get-started\06_host_your_agent\06_host_your_agent.csproj --tl:off, dotnet format ... --verify-no-changes, and git diff --check. |
53b6127 to
bb219ae
Compare
|
Rebased this branch onto current Validation run locally from
The build log had transient NuGet EOF download messages, but restore retried/resolved and the project built successfully. |
bb219ae to
6623a53
Compare
|
Rebased this branch onto the latest Validation from
The sample build completes with 0 warnings / 0 errors on the rebased head ( |
60b95e3 to
f289c32
Compare
f289c32 to
020facb
Compare
Summary
06_host_your_agentAzure Functions sample so the isolated worker indexes Durable Functions[OrchestrationTrigger]for discoveryRefs #5927.
To verify
dotnet build dotnet\samples\01-get-started\06_host_your_agent\06_host_your_agent.csproj --tl:offdotnet format dotnet\samples\01-get-started\06_host_your_agent\06_host_your_agent.csproj --include dotnet\samples\01-get-started\06_host_your_agent\DurableTriggerDiscovery.cs --verify-no-changes --no-restore --verbosity minimalgit diff --check