microsoft / microsoft/agent-framework-durable-extension

.NET: [Bug]: DurableAIAgentProxy silently drops AG-UI frontend tools

Open
#31 2 comments 0 reactions 1 assignee View on GitHub

@javiercn is already working on this.

Since May 28, 2026.

bug
Dominant language
Python
Stars
16
Forks
10
Avg merge
3d 9h
Merged PRs (30d)
9

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.