.NET: API to manage AgentThreads in hosting scenarios (#1520)

* skeleton

* wip

* rename + fix tests

* implement workflow tests

* fix comments

* Update dotnet/src/Microsoft.Agents.AI.Hosting/HostApplicationBuilderWorkflowExtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fixes

* proto

* fix worfklow build logic

* build it / no reflection / no generics / extensions on aiagent

* rollback + new overload on workflow builder

* address PR comments

* fix build

* take from main

* correct based on latest API

* apply suggestion

* address PR comments x1

* address PR comments 2

* renames

* *With*

* refactor api a bit

* refactor + merge main + apply suggestions

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Korolev Dmitry
2025-10-24 11:17:25 +00:00
committed by GitHub
co-authored by Copilot
parent 31701dbb92
commit 73eb00b37b
9 changed files with 369 additions and 30 deletions
@@ -104,7 +104,10 @@ else
throw new ArgumentException("Either A2AServer:ApiKey or A2AServer:ConnectionString & agentId must be provided");
}
var a2aTaskManager = app.MapA2A(hostA2AAgent, path: "/", agentCard: hostA2AAgentCard);
app.MapWellKnownAgentCard(a2aTaskManager, "/");
var a2aTaskManager = app.MapA2A(
hostA2AAgent,
path: "/",
agentCard: hostA2AAgentCard,
taskManager => app.MapWellKnownAgentCard(taskManager, "/"));
await app.RunAsync();