Skip to content

.NET: Declarative Agents - #2476

Merged
Mark Wallace (markwallace-microsoft) merged 12 commits into
microsoft:mainfrom
markwallace-microsoft:users/markwallace/declarative-agents-dotnet
Dec 1, 2025
Merged

.NET: Declarative Agents#2476
Mark Wallace (markwallace-microsoft) merged 12 commits into
microsoft:mainfrom
markwallace-microsoft:users/markwallace/declarative-agents-dotnet

Conversation

@markwallace-microsoft

Copy link
Copy Markdown
Contributor

Motivation and Context

  • Update declarative agent samples
  • Add the Microsoft.Agents.AI.Declarative project

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

CopilotAI review requested due to automatic review settings November 26, 2025 15:16

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces declarative agent support to the .NET Agent Framework by adding the Microsoft.Agents.AI.Declarative project and updating sample YAML configuration files.

Key changes:

  • Added new Microsoft.Agents.AI.Declarative project with factory pattern for creating agents from YAML definitions
  • Implemented extension methods for converting between declarative object model types and runtime AI types
  • Fixed spelling errors in agent instruction texts across multiple YAML sample files

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
Microsoft.Agents.AI.Declarative.csprojNew project file defining dependencies and configuration for the declarative agents library
agent-framework-dotnet.slnxAdded the new declarative project to the solution
AgentFactory.csBase abstract factory class for creating AI agents from declarative definitions
AggregatorAgentFactory.csComposite factory that aggregates multiple agent factories
ChatClientAgentFactory.csConcrete factory implementation for creating ChatClient-based agents
AgentBotElementYaml.csHelper methods for deserializing YAML to agent definitions
YamlAgentFactoryExtensions.csExtension methods to create agents from YAML strings
PromptAgentExtensions.csExtensions for converting GptComponentMetadata to ChatOptions and tools
Extension files (RecordData*, PropertyInfo*, StringExpression*, ModelOptions*, Tool*)Type conversion extensions between declarative and runtime types
YAML sample filesUpdated instructions to fix grammar errors and standardized property names from kind to type

@crickmanChris (crickman) added enhancement agents Usage: [Issues, PRs], Target: Single agent labels Nov 26, 2025
Aris Nguyen (arisng) pushed a commit to arisng/agent-framework that referenced this pull request Feb 2, 2026
* Update the declarative agent samples
* Add the Microsoft.Agents.AI.Declarative project
* Make the package non packable
* Use the RecalcEngine when creating the ChatOptions
* Ignore VSTHRD200
* Add geting started samples
* Address code review feedback
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentsUsage: [Issues, PRs], Target: Single agent.NETUsage: [Issues, PRs], Target: .Net

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants

@markwallace-microsoft@rogerbarreto@SergeyMenshykh@crickman