Description
When using AsDurableAgentProxy() with MapAGUI, any tools passed by the frontend via RunAgentInput.Tools are silently ignored - the LLM never receives their schemas and cannot call them.
This happens because DurableAIAgentProxy.RunCoreAsync() only extracts ResponseFormat from ChatClientAgentRunOptions, dropping ChatOptions.Tools entirely. Additionally, RunRequest has no field to carry tool definitions across the DTS signal boundary.
The same frontend call works correctly with a non-durable agent on MapAGUI - making this a regression specific to the durable proxy.
Impact: Frontend-defined tools are completely non-functional when using durable agents, with no error or warning to indicate why.
Frontend call (AG-UI):
{
"runId": "abc-123",
"threadId": "thread-001",
"messages": [{ "role": "user", "content": "Show me the location of Seattle on a map." }],
"tools": [
{
"name": "renderMap",
"description": "Renders a map in the UI centered on a given location",
"parameters": {
"type": "object",
"properties": {
"latitude": { "type": "number", "description": "Latitude of the location" },
"longitude": { "type": "number", "description": "Longitude of the location" },
"zoom": { "type": "integer", "description": "Zoom level (1-20)", "default": 12 },
"label": { "type": "string", "description": "Pin label shown on the map" }
},
"required": ["latitude", "longitude"]
}
}
]
}
Code Sample
using Microsoft.Agents.AI;
using Microsoft.Agents.AI.DurableTask;
using Microsoft.Agents.AI.Hosting.AGUI.AspNetCore;
using Microsoft.Extensions.AI;
using OpenAI;
using System.ClientModel;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddAGUI();
IChatClient chatClient = new OpenAIClient(
new ApiKeyCredential("ollama"),
new OpenAIClientOptions { Endpoint = new Uri("http://localhost:11434/v1") })
.GetChatClient("llama3.2")
.AsIChatClient();
AIAgent agent = chatClient.AsAIAgent(
name: "TestAgent",
instructions: "Use the available tools to answer questions.");
builder.Services.ConfigureDurableAgents(
options => options.AddAIAgent(agent),
workerBuilder: b => b.UseDurableTaskScheduler("Endpoint=http://localhost:8080;TaskHub=default;Authentication=None"),
clientBuilder: b => b.UseDurableTaskScheduler("Endpoint=http://localhost:8080;TaskHub=default;Authentication=None"));
var app = builder.Build();
// ✅ Works — frontend tools ARE passed to agent
app.MapAGUI("/chat-regular", agent);
// ❌ Broken — frontend tools are SILENTLY DROPPED
AIAgent durableAgent = agent.AsDurableAgentProxy(app.Services);
app.MapAGUI("/chat-durable", durableAgent);
await app.RunAsync();
Error Messages / Stack Traces
Package Versions
Microsoft.Agents.AI: 1.6.2, Microsoft.Agents.AI.Hosting.AGUI.AspNetCore: 1.6.2-preview.260521.1, Microsoft.Agents.AI.DurableTask: 1.6.2-preview.260521.1
.NET Version
.NET 10
Additional Context
No response
Description
When using AsDurableAgentProxy() with MapAGUI, any tools passed by the frontend via RunAgentInput.Tools are silently ignored - the LLM never receives their schemas and cannot call them.
This happens because DurableAIAgentProxy.RunCoreAsync() only extracts ResponseFormat from ChatClientAgentRunOptions, dropping ChatOptions.Tools entirely. Additionally, RunRequest has no field to carry tool definitions across the DTS signal boundary.
The same frontend call works correctly with a non-durable agent on MapAGUI - making this a regression specific to the durable proxy.
Impact: Frontend-defined tools are completely non-functional when using durable agents, with no error or warning to indicate why.
Frontend call (AG-UI):
{ "runId": "abc-123", "threadId": "thread-001", "messages": [{ "role": "user", "content": "Show me the location of Seattle on a map." }], "tools": [ { "name": "renderMap", "description": "Renders a map in the UI centered on a given location", "parameters": { "type": "object", "properties": { "latitude": { "type": "number", "description": "Latitude of the location" }, "longitude": { "type": "number", "description": "Longitude of the location" }, "zoom": { "type": "integer", "description": "Zoom level (1-20)", "default": 12 }, "label": { "type": "string", "description": "Pin label shown on the map" } }, "required": ["latitude", "longitude"] } } ] }Code Sample
using Microsoft.Agents.AI; using Microsoft.Agents.AI.DurableTask; using Microsoft.Agents.AI.Hosting.AGUI.AspNetCore; using Microsoft.Extensions.AI; using OpenAI; using System.ClientModel; var builder = WebApplication.CreateBuilder(args); builder.Services.AddAGUI(); IChatClient chatClient = new OpenAIClient( new ApiKeyCredential("ollama"), new OpenAIClientOptions { Endpoint = new Uri("http://localhost:11434/v1") }) .GetChatClient("llama3.2") .AsIChatClient(); AIAgent agent = chatClient.AsAIAgent( name: "TestAgent", instructions: "Use the available tools to answer questions."); builder.Services.ConfigureDurableAgents( options => options.AddAIAgent(agent), workerBuilder: b => b.UseDurableTaskScheduler("Endpoint=http://localhost:8080;TaskHub=default;Authentication=None"), clientBuilder: b => b.UseDurableTaskScheduler("Endpoint=http://localhost:8080;TaskHub=default;Authentication=None")); var app = builder.Build(); // ✅ Works — frontend tools ARE passed to agent app.MapAGUI("/chat-regular", agent); // ❌ Broken — frontend tools are SILENTLY DROPPED AIAgent durableAgent = agent.AsDurableAgentProxy(app.Services); app.MapAGUI("/chat-durable", durableAgent); await app.RunAsync();Error Messages / Stack Traces
Package Versions
Microsoft.Agents.AI: 1.6.2, Microsoft.Agents.AI.Hosting.AGUI.AspNetCore: 1.6.2-preview.260521.1, Microsoft.Agents.AI.DurableTask: 1.6.2-preview.260521.1
.NET Version
.NET 10
Additional Context
No response