Development¶
Adding an AI function (tool)¶
- Add a static method decorated as an
AIFunctioninLibraryTemplateAITools(or a new tools class). - Register it on the agent via
AddAISkillsLibraryTemplateAgent()wiring. - Add a Reqnroll feature + step definitions under
tests/<Name>.AcceptanceTests(seeLibraryTemplateAIToolsStepDefinitions.cs).
Embeddings¶
Implement or extend IEmbeddingPipeline. Use ContentItem for inputs and VectorRecord for stored vectors; back it with a Microsoft.Extensions.VectorData store of your choice.
MCP clients¶
MicrosoftLearnMcpClient shows the pattern (SearchDocsAsync, FetchDocsAsync, SearchCodeSamplesAsync) over ModelContextProtocol.Core. Add new clients alongside it and register via AddAISkillsLibraryTemplateMcpTools().
Options and validation¶
Add an options class under Options/, validate it in ValidateLibraryTemplateOptions, and bind it from the consuming host's configuration. Respect --useOptions/--useDI/--useMetrics conditionals if you contribute back to the template.
Observability and compliance¶
Emit activities through LibraryTemplateTelemetry (ActivitySource "ConnectSoft.AISkillsLibraryTemplate") and counters via LibraryTemplateMetrics/AgentFrameworkMetrics. Apply redaction through RedactionExtensions for sensitive content.
Testing¶
- Unit: MSTest across the configured TFMs (
LibraryTemplateAgentContractTests,DtoSerializationTests,DIRegistrationTests,PolicyAndErrorTests,TelemetryHookTests, metrics tests). - Acceptance: MSTest + Reqnroll Gherkin features (
Validate Template Feature.feature,Summarize Results Feature.feature,Resolve Flags Feature.feature).