diff --git a/WORKSHOP.txt b/WORKSHOP.txt index f055a97..7f78bf2 100644 --- a/WORKSHOP.txt +++ b/WORKSHOP.txt @@ -1,7 +1,7 @@ -Your first coach in DevUI -Your ChatClientAgent uses a Foundry model and answers in DevUI. +Connect the chat UI +The agent is exposed through AG-UI and the supplied chat becomes the home page. -Checkpoint: 03-first-coach +Checkpoint: 03-streaming Source tag: workshop-v3-reference.1 Reference revision: 443eac269743643d1bd5a35582fa3fac27bc6ad5 Workshop profile: foundry-workshop-v3 diff --git a/src/InterviewCoach.Agent/Program.cs b/src/InterviewCoach.Agent/Program.cs index 5d924c0..ea321a6 100644 --- a/src/InterviewCoach.Agent/Program.cs +++ b/src/InterviewCoach.Agent/Program.cs @@ -1,5 +1,6 @@ using System.Collections.Concurrent; using InterviewCoach.Agent; +using Microsoft.Agents.AI.Hosting.AGUI.AspNetCore; var builder = WebApplication.CreateBuilder(args); var config = builder.Configuration; @@ -10,12 +11,16 @@ var agentBuilder = builder.AddAIAgent("coach"); +builder.Services.AddAGUIServer(); + var app = builder.Build(); app.MapDefaultEndpoints(); app.MapWorkshopDevUI(); +app.MapAGUIServer(agentBuilder, "ag-ui"); + if (builder.Environment.IsDevelopment() == false) { app.UseHttpsRedirection(); diff --git a/src/InterviewCoach.WebUI/Components/Pages/Chat/Chat.razor b/src/InterviewCoach.WebUI/Components/Pages/Chat/Chat.razor index 2355abf..237937f 100644 --- a/src/InterviewCoach.WebUI/Components/Pages/Chat/Chat.razor +++ b/src/InterviewCoach.WebUI/Components/Pages/Chat/Chat.razor @@ -1,4 +1,4 @@ -@page "/chat" +@page "/" @using System.ComponentModel @using InterviewCoach.WebUI.Services @inject IChatClient ChatClient diff --git a/src/InterviewCoach.WebUI/Components/Pages/Home.razor b/src/InterviewCoach.WebUI/Components/Pages/Home.razor deleted file mode 100644 index bfa0b94..0000000 --- a/src/InterviewCoach.WebUI/Components/Pages/Home.razor +++ /dev/null @@ -1,8 +0,0 @@ -@page "/" -Interview Coach - workshop starter -
-

Your application shell is running.

-

Coaching is not connected to this page yet.

-

Next we'll create an agent and try a question in DevUI. Then we'll connect this chat page.

-

This shell runs locally. The next lesson connects a model in Foundry.

-