Skip to content

.NET: document Azure Functions trigger discovery#5946

Open
he-yufeng wants to merge 1 commit into
microsoft:mainfrom
he-yufeng:docs/azurefunctions-trigger-discovery
Open

.NET: document Azure Functions trigger discovery#5946
he-yufeng wants to merge 1 commit into
microsoft:mainfrom
he-yufeng:docs/azurefunctions-trigger-discovery

Conversation

@he-yufeng

Copy link
Copy Markdown
Contributor

Summary

  • add a small local orchestration trigger to the 06_host_your_agent Azure Functions sample so the isolated worker indexes Durable Functions
  • document why hosting-only apps may need one local [OrchestrationTrigger] for discovery
  • add a troubleshooting note for missing hosted agent routes in the Azure Functions samples README

Refs #5927.

To verify

  • dotnet build dotnet\samples\01-get-started\06_host_your_agent\06_host_your_agent.csproj --tl:off
  • dotnet 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 minimal
  • git diff --check

Copilot AI review requested due to automatic review settings May 19, 2026 05:07
@moonbox3 moonbox3 added documentation Improvements or additions to documentation .NET labels May 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the 06_host_your_agent Azure 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.

Comment on lines 62 to +65
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.
@he-yufeng he-yufeng force-pushed the docs/azurefunctions-trigger-discovery branch from a6344b3 to 53b6127 Compare May 20, 2026 05:26
@he-yufeng

Copy link
Copy Markdown
Contributor Author

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.

@he-yufeng he-yufeng force-pushed the docs/azurefunctions-trigger-discovery branch from 53b6127 to bb219ae Compare June 12, 2026 03:35
@he-yufeng

Copy link
Copy Markdown
Contributor Author

Rebased this branch onto current main and pushed the updated head bb219ae8.

Validation run locally from dotnet/:

  • dotnet build .\samples\01-get-started\06_host_your_agent\06_host_your_agent.csproj -f net10.0 --tl:off -> passed, 0 warnings/errors
  • git diff --check upstream/main..HEAD -> passed

The build log had transient NuGet EOF download messages, but restore retried/resolved and the project built successfully.

@he-yufeng he-yufeng force-pushed the docs/azurefunctions-trigger-discovery branch from bb219ae to 6623a53 Compare June 12, 2026 11:54
@he-yufeng

Copy link
Copy Markdown
Contributor Author

Rebased this branch onto the latest upstream/main.

Validation from dotnet/:

  • dotnet build .\samples\01-get-started\06_host_your_agent\06_host_your_agent.csproj -f net10.0 --tl:off
  • git diff --check upstream/main..HEAD

The sample build completes with 0 warnings / 0 errors on the rebased head (6623a534).

@he-yufeng he-yufeng force-pushed the docs/azurefunctions-trigger-discovery branch 2 times, most recently from 60b95e3 to f289c32 Compare June 12, 2026 16:56
@he-yufeng he-yufeng force-pushed the docs/azurefunctions-trigger-discovery branch from f289c32 to 020facb Compare June 12, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation .NET

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants