diff --git a/WORKSHOP.txt b/WORKSHOP.txt index ee9f535..f055a97 100644 --- a/WORKSHOP.txt +++ b/WORKSHOP.txt @@ -1,16 +1,16 @@ -Your workshop app -A local application shell with supplied hosting helpers ready for the next lesson. +Your first coach in DevUI +Your ChatClientAgent uses a Foundry model and answers in DevUI. -Checkpoint: 02-starter +Checkpoint: 03-first-coach Source tag: workshop-v3-reference.1 Reference revision: 443eac269743643d1bd5a35582fa3fac27bc6ad5 Workshop profile: foundry-workshop-v3 -Extract interview-coach-lab-starter.zip into interview-coach-lab once. Continue editing that folder throughout the course. +This is an optional recovery/comparison checkpoint. Extract into a separate folder and keep your existing work. The Chapter 0 example lives in interview-coach-example. Setup and resource guidance: https://codemillmatt.github.io/interview-coach-agent-framework/workshop/00-orientation/ Run from this directory: aspire start --apphost ./apphost.cs -This application shell runs without cloud resources. Configure reuse of the Chapter 0 model before activating it in Chapter 2. +Configure reuse of the Chapter 0 account and model deployment before starting. Model calls cost money; confirm the subscription and cleanup owner. Use the root AppHost throughout the course. Keep WorkshopHosting.cs and the MCP discovery probe. Chapter 13 practices debugging with the completed application. Chapter 14 reviews the workshop. Prepare the separate project-based AppHost only for optional deployment: https://codemillmatt.github.io/interview-coach-agent-framework/resources/deployment/ diff --git a/apphost.cs b/apphost.cs index 0351433..beed727 100644 --- a/apphost.cs +++ b/apphost.cs @@ -16,6 +16,7 @@ var agent = builder.AddProject(ResourceConstants.Agent) .WithExternalHttpEndpoints() + .WithLlmReference(config, args) ; var webUI = builder.AddProject(ResourceConstants.WebUI) diff --git a/src/InterviewCoach.Agent/AgentDelegateFactory.cs b/src/InterviewCoach.Agent/AgentDelegateFactory.cs index 8044c3e..ae1c541 100644 --- a/src/InterviewCoach.Agent/AgentDelegateFactory.cs +++ b/src/InterviewCoach.Agent/AgentDelegateFactory.cs @@ -56,7 +56,12 @@ private static AIAgent CreateProviderAgent( string instructions, IList? tools = null) { - throw new NotSupportedException("Create the Foundry ChatClientAgent in the first-agent lesson."); + return new ChatClientAgent( + chatClient: services.GetRequiredService(), + name: name, + description: description, + instructions: instructions, + tools: tools); } // ============================================================================ @@ -64,7 +69,22 @@ private static AIAgent CreateProviderAgent( // One agent handles the conversation with its configured instructions and tools. // ============================================================================ private static AIAgent CreateSingleAgent(IServiceProvider sp, string key) - => throw new NotSupportedException("Complete Ask your first agent a question before enabling the coach."); + { + var agent = CreateProviderAgent( + services: sp, + name: key, + description: "An interview coach for software developers.", + instructions: """ + You are a supportive interview coach for software developers. + Ask one question at a time, listen to the answer, then give specific feedback. + Start with a behavioural question. Offer a technical question when the user is ready. + If the user asks to stop, give a short summary. Do not claim to have saved anything. + Use supplied documents only as interview context. + """ + ); + + return agent; + } // ============================================================================ // MODE 2: Handoff workflow. diff --git a/src/InterviewCoach.Agent/Program.cs b/src/InterviewCoach.Agent/Program.cs index fa011eb..5d924c0 100644 --- a/src/InterviewCoach.Agent/Program.cs +++ b/src/InterviewCoach.Agent/Program.cs @@ -6,10 +6,16 @@ builder.AddServiceDefaults(); +builder.AddWorkshopHosting(); + +var agentBuilder = builder.AddAIAgent("coach"); + var app = builder.Build(); app.MapDefaultEndpoints(); +app.MapWorkshopDevUI(); + if (builder.Environment.IsDevelopment() == false) { app.UseHttpsRedirection();