microsoft / microsoft/agent-framework
.NET: [Bug]: Following the Aspire DevUI Readme results in 404 Not Found
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 2.3k
- Avg merge
- 2d 45m
- Merged PRs (30d)
- 358
Description
### Description
I followed https://github.com/microsoft/agent-framework/blob/939d4d01537339ea023272c42a5a7999f4eada8a/dotnet/src/Aspire.Hosting.AgentFramework.DevUI/README.md:
- created new Aspire solution using `aspire new aspire-starter`
- added DevUI code and nuget package to apphost
- removed generated frontend project
- replaced generated backend project by agent service setup from Readme
Aspire Dashboard shows both the DevUI and Agent Service as healthy, but opening the DevUI link returns a 404.
### Code Sample
AppHost:
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var agentService = builder.AddProject("agentservice")
.WithHttpHealthCheck("/health");
var apiKey = builder.AddParameter("github-models-key",
value: "github_pat_mysecret",
secret: true);
var openai = builder.AddOpenAI("openai")
.WithApiKey(apiKey)
.WithEndpoint("https://models.github.ai/inference");
var devui = builder.AddDevUI("devui")
.WithAgentService(agentService)
.WaitFor(agentService);
builder.Build().Run();
```
AgentService:
```csharp
using Microsoft.Agents.AI.Hosting;
var builder = WebApplication.CreateBuilder(args);
// Add service defaults & Aspire client integrations.
builder.AddServiceDefaults();
// Add services to the container.
builder.Services.AddProblemDetails();
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
builder.Services.AddOpenApi();
builder.AddOpenAIClient(connectionName: "openai");
// In the agent service's Program.cs
builder.AddAIAgent("writer", "You write short stories.");
builder.Services.AddOpenAIResponses();
builder.Services.AddOpenAIConversations();
var app = builder.Build();
app.MapOpenAIResponses();
app.MapOpenAIConversations();
// Configure the HTTP request pipeline.
app.UseExceptionHandler();
if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
}
app.MapDefaultEndpoints();
app.Run();
```
### Error Messages / Stack Traces
```markdown
404 Not Found
```
### Package Versions
- `Aspire.Hosting.AgentFramework.DevU`I: `1.5.0-preview.260507.1`
- other `Microsoft.Agents.AI.*`: `1.5.0`
### .NET Version
.NET 10.0
### Additional Context
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the pinned Aspire.Hosting.AgentFramework.DevUI README and the AppHost and AgentService Program.cs shown in the report. Reproduce the setup with the listed package and .NET versions, then trace the AddDevUI and WithAgentService configuration to determine why the healthy DevUI link returns 404. Done means the README setup opens the DevUI successfully or documents the corrected setup and verifies the endpoint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100