diff --git a/WORKSHOP.txt b/WORKSHOP.txt index 7f78bf2..d013c24 100644 --- a/WORKSHOP.txt +++ b/WORKSHOP.txt @@ -1,7 +1,7 @@ -Connect the chat UI -The agent is exposed through AG-UI and the supplied chat becomes the home page. +A coach with a tool +A deterministic practice-guidance function that the agent can call. -Checkpoint: 03-streaming +Checkpoint: 04-tools Source tag: workshop-v3-reference.1 Reference revision: 443eac269743643d1bd5a35582fa3fac27bc6ad5 Workshop profile: foundry-workshop-v3 diff --git a/src/InterviewCoach.Agent/AgentDelegateFactory.cs b/src/InterviewCoach.Agent/AgentDelegateFactory.cs index ae1c541..0d87a3c 100644 --- a/src/InterviewCoach.Agent/AgentDelegateFactory.cs +++ b/src/InterviewCoach.Agent/AgentDelegateFactory.cs @@ -70,6 +70,23 @@ private static AIAgent CreateProviderAgent( // ============================================================================ private static AIAgent CreateSingleAgent(IServiceProvider sp, string key) { + static string GetPracticeGuidance([Description("One of: behavioural, technical")] string category) + => category.ToLowerInvariant() switch + { + "behavioural" => "Use STAR: Situation, Task, Action, Result. Describe your own contribution.", + "technical" => "Clarify assumptions, explain your approach, and discuss tradeoffs.", + _ => throw new ArgumentException("Choose behavioural or technical.", nameof(category)) + }; + + var tools = new List + { + AIFunctionFactory.Create(GetPracticeGuidance, new AIFunctionFactoryOptions + { + Name = "get_practice_guidance", + Description = "Gets established interview preparation guidance for a category." + }) + }; + var agent = CreateProviderAgent( services: sp, name: key, @@ -80,7 +97,9 @@ private static AIAgent CreateSingleAgent(IServiceProvider sp, string key) 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. - """ + Call get_practice_guidance when the user asks for preparation tips. + """, + tools: tools ); return agent;