Open
Conversation
4 tasks
- Add 'Async' suffix to async test methods in FilteringAgentSkillsSourceTests, DeduplicatingAgentSkillsSourceTests, and AgentInMemorySkillsSourceTests - Use pragma to suppress false-positive IDE0004 on casts needed for overload disambiguation in AgentInlineSkillTests and AgentInlineSkillResourceTests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new “inline skills” surface area to the .NET Agent Skills system, enabling code-defined skills with delegate-backed resources and scripts, plus builder/provider integration and accompanying tests/samples.
Changes:
- Introduces programmatic skill types:
AgentInlineSkill,AgentInlineSkillResource,AgentInlineSkillScript. - Adds inline-skill integration points in
AgentSkillsProviderandAgentSkillsProviderBuilder(plus an internalAgentInMemorySkillsSource). - Updates unit tests and adds a new sample demonstrating code-defined skills.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI/Skills/Programmatic/AgentInlineSkill.cs | New code-defined skill type that synthesizes skill content and registers resources/scripts. |
| dotnet/src/Microsoft.Agents.AI/Skills/Programmatic/AgentInlineSkillResource.cs | New resource implementation backed by a static value or delegate. |
| dotnet/src/Microsoft.Agents.AI/Skills/Programmatic/AgentInlineSkillScript.cs | New script implementation backed by a delegate via AIFunctionFactory. |
| dotnet/src/Microsoft.Agents.AI/Skills/AgentInMemorySkillsSource.cs | New internal skills source to serve in-memory AgentSkill instances. |
| dotnet/src/Microsoft.Agents.AI/Skills/AgentSkillsProvider.cs | Adds provider constructors accepting inline skills; adjusts file-based constructor behavior. |
| dotnet/src/Microsoft.Agents.AI/Skills/AgentSkillsProviderBuilder.cs | Adds UseInlineSkill(s) APIs for composing inline skills into a provider. |
| dotnet/src/Microsoft.Agents.AI/Skills/AgentSkill.cs | Updates documentation to mention inline skills and synthesized content. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/AgentInlineSkillTests.cs | New unit tests for inline skill frontmatter/content/resource/script behavior. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/AgentInlineSkillResourceTests.cs | New unit tests for inline resource behavior. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/AgentInlineSkillScriptTests.cs | New unit tests for inline script delegate invocation and schema. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/AgentInMemorySkillsSourceTests.cs | New unit tests for in-memory skills source. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/AgentSkillsProviderTests.cs | Adds tests exercising mixed sources / inline constructor usage. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/FilteringAgentSkillsSourceTests.cs | Updates tests to use AgentInMemorySkillsSource + inline skills. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/DeduplicatingAgentSkillsSourceTests.cs | Updates tests to use inline skills / in-memory source. |
| dotnet/samples/02-agents/AgentSkills/README.md | Documents file-based vs code-defined skills and links new sample. |
| dotnet/samples/02-agents/AgentSkills/Agent_Step02_CodeDefinedSkills/* | New sample demonstrating inline skills with resources and scripts. |
| dotnet/agent-framework-dotnet.slnx | Adds the new sample project; also removes some unrelated projects/solution items. |
dotnet/src/Microsoft.Agents.AI/Skills/Programmatic/AgentInlineSkill.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Microsoft.Agents.AI/Skills/Programmatic/AgentInlineSkill.cs
Outdated
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/AgentSkillsProviderTests.cs
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the inline skills API — code-defined skills with resources (static values or delegates) and scripts (delegates).
New types
AgentInlineSkill— Skill defined entirely in code with XML content generation, resources, and scriptsAgentInlineSkillResource— Skill resource backed by a static value or delegateAgentInlineSkillScript— Skill script backed by a delegate with automatic parameter marshalingIntegration
AgentSkillsProviderconstructors accepting inline skillsAgentSkillsProviderBuilder.UseInlineSkill(s)methods