Skip to content

Python: Move workflow-samples and agent-samples under declarative-agents directory - #5011

Merged
Shawn Henry (sphenry) merged 3 commits into
mainfrom
copilot/move-workflow-and-agent-samples
Apr 2, 2026
Merged

Python: Move workflow-samples and agent-samples under declarative-agents directory#5011
Shawn Henry (sphenry) merged 3 commits into
mainfrom
copilot/move-workflow-and-agent-samples

Conversation

Copilot AI commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

Consolidate workflow-samples/ and agent-samples/ under a new declarative-agents/ directory at the repo root for better organizational clarity.

Description

Moves both sample directories and updates all hardcoded path references across the codebase:

  • CI workflows: Sparse-checkout entries in dotnet-build-and-test.yml (2 locations) and dotnet-integration-tests.yml
  • Solution file: 6 file path entries in agent-framework-dotnet.slnx
  • .NET csproj files: MSBuild Include paths in 6 project files (5 sample projects + integration test project)
  • .NET source: Path.Combine calls in ExecuteWorkflow/Program.cs, GenerateCode/Program.cs, 3 test files, and repo-root detection in WorkflowTest.cs
  • .NET config: launchSettings.json relative paths for ChatClient sample
  • Python source: Path construction in 4 declarative agent samples, 2 workflow samples, and 2 test files
  • Markdown: Relative links in 4 READMEs (workflow-samples/README.md, agent-samples/README.md, declarative workflows README, Python declarative samples README)

New directory structure:

declarative-agents/
├── agent-samples/
│   ├── azure/
│   ├── chatclient/
│   ├── foundry/
│   └── openai/
└── workflow-samples/
    ├── CustomerSupport.yaml
    ├── DeepResearch.yaml
    ├── Marketing.yaml
    └── MathChat.yaml

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.

Comment thread .github/workflows/dotnet-build-and-test.yml
@markwallace-microsoft Mark Wallace (markwallace-microsoft) added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows labels Mar 31, 2026
@github-actions github-actions Bot changed the title Move workflow-samples and agent-samples under declarative-agents directory .NET: Move workflow-samples and agent-samples under declarative-agents directory Mar 31, 2026
@github-actions github-actions Bot changed the title .NET: Move workflow-samples and agent-samples under declarative-agents directory Python: Move workflow-samples and agent-samples under declarative-agents directory Mar 31, 2026
@sphenry
Shawn Henry (sphenry) marked this pull request as ready for review April 2, 2026 03:49
Copilot AI review requested due to automatic review settings April 2, 2026 03:49

Copilot AI 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 consolidates the repo-root declarative YAML assets by moving workflow-samples/ and agent-samples/ under a new top-level declarative-agents/ directory, and updates hardcoded references across Python, .NET, and CI to match.

Changes:

  • Move sample YAML directories under declarative-agents/ at the repo root.
  • Update path references in .NET projects/tests/samples, Python samples/tests, and GitHub Actions sparse-checkout.
  • Update Markdown links to point at the new locations.

Reviewed changes

Copilot reviewed 27 out of 44 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
python/samples/03-workflows/declarative/deep_research/main.py Update workflow YAML lookup path to declarative-agents/workflow-samples.
python/samples/03-workflows/declarative/customer_support/main.py Update workflow YAML lookup path to declarative-agents/workflow-samples.
python/samples/02-agents/declarative/README.md Update referenced YAML locations and repo-root links for declarative agent samples.
python/samples/02-agents/declarative/openai_responses_agent.py Update YAML path to declarative-agents/agent-samples/openai.
python/samples/02-agents/declarative/microsoft_learn_agent.py Update YAML path to declarative-agents/agent-samples/foundry.
python/samples/02-agents/declarative/get_weather_agent.py Update YAML path to declarative-agents/agent-samples/chatclient.
python/samples/02-agents/declarative/azure_openai_responses_agent.py Update YAML path to declarative-agents/agent-samples/azure.
python/packages/declarative/tests/test_workflow_samples_integration.py Point integration tests at declarative-agents/workflow-samples.
python/packages/declarative/tests/test_declarative_loader.py Point agent-sample YAML collection at declarative-agents/agent-samples.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj Update MSBuild includes to pull workflow setup YAMLs from declarative-agents/workflow-samples/Setup.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs Update repo-root detection to look for declarative-agents/workflow-samples.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs Update workflow sample path composition to include declarative-agents/workflow-samples.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs Update workflow sample paths to include declarative-agents/workflow-samples.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/README.md Update docs to link to the moved workflow samples directory.
dotnet/samples/03-workflows/Declarative/StudentTeacher/StudentTeacher.csproj Update workflow YAML include path to declarative-agents/workflow-samples.
dotnet/samples/03-workflows/Declarative/Marketing/Marketing.csproj Update workflow YAML include path to declarative-agents/workflow-samples.
dotnet/samples/03-workflows/Declarative/HostedWorkflow/HostedWorkflow.csproj Update workflow YAML include path to declarative-agents/workflow-samples.
dotnet/samples/03-workflows/Declarative/GenerateCode/Program.cs Update CLI workflow path resolution to use declarative-agents/workflow-samples.
dotnet/samples/03-workflows/Declarative/ExecuteWorkflow/Program.cs Update CLI workflow path resolution to use declarative-agents/workflow-samples.
dotnet/samples/03-workflows/Declarative/DeepResearch/DeepResearch.csproj Update workflow YAML include path to declarative-agents/workflow-samples.
dotnet/samples/03-workflows/Declarative/CustomerSupport/CustomerSupport.csproj Update workflow YAML include path to declarative-agents/workflow-samples.
dotnet/samples/02-agents/DeclarativeAgents/ChatClient/Properties/launchSettings.json Update launch args to point at moved agent-sample YAMLs under declarative-agents/agent-samples.
dotnet/agent-framework-dotnet.slnx Update solution virtual folder file entries for moved workflow sample assets.
declarative-agents/workflow-samples/README.md Update links to .NET samples now that README moved under declarative-agents/.
declarative-agents/workflow-samples/MathChat.yaml Add/move workflow sample under consolidated directory.
declarative-agents/workflow-samples/Marketing.yaml Add/move workflow sample under consolidated directory.
declarative-agents/workflow-samples/DeepResearch.yaml Add/move workflow sample under consolidated directory.
declarative-agents/workflow-samples/CustomerSupport.yaml Add/move workflow sample under consolidated directory.
declarative-agents/agent-samples/README.md Update link to Python declarative samples now that README moved under declarative-agents/.
declarative-agents/agent-samples/openai/OpenAIResponses.yaml Add/move OpenAI Responses prompt definition under consolidated directory.
declarative-agents/agent-samples/openai/OpenAIChat.yaml Add/move OpenAI Chat prompt definition under consolidated directory.
declarative-agents/agent-samples/openai/OpenAIAssistants.yaml Add/move OpenAI Assistants prompt definition under consolidated directory.
declarative-agents/agent-samples/openai/OpenAI.yaml Add/move generic OpenAI prompt definition under consolidated directory.
declarative-agents/agent-samples/foundry/PersistentAgent.yaml Add/move Foundry persistent agent definition under consolidated directory.
declarative-agents/agent-samples/foundry/MicrosoftLearnAgent.yaml Add/move Foundry MCP-based sample under consolidated directory.
declarative-agents/agent-samples/foundry/FoundryAgent.yaml Add/move Foundry prompt definition under consolidated directory.
declarative-agents/agent-samples/chatclient/GetWeather.yaml Add/move ChatClient tool sample YAML under consolidated directory.
declarative-agents/agent-samples/chatclient/Assistant.yaml Add/move ChatClient assistant YAML under consolidated directory.
declarative-agents/agent-samples/azure/AzureOpenAIResponses.yaml Add/move Azure OpenAI Responses prompt definition under consolidated directory.
declarative-agents/agent-samples/azure/AzureOpenAIChat.yaml Add/move Azure OpenAI Chat prompt definition under consolidated directory.
declarative-agents/agent-samples/azure/AzureOpenAIAssistants.yaml Add/move Azure OpenAI Assistants prompt definition under consolidated directory.
declarative-agents/agent-samples/azure/AzureOpenAI.yaml Add/move generic Azure OpenAI prompt definition under consolidated directory.
.github/workflows/dotnet-integration-tests.yml Update sparse-checkout to fetch declarative-agents instead of workflow-samples.
.github/workflows/dotnet-build-and-test.yml Update sparse-checkout to fetch declarative-agents instead of workflow-samples.

Comment thread python/samples/03-workflows/declarative/deep_research/main.py
Comment thread python/samples/03-workflows/declarative/customer_support/main.py
Comment thread dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/README.md
Comment thread python/samples/02-agents/declarative/README.md
@markwallace-microsoft

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
TOTAL26994318788% 
report-only-changed-files is enabled. No files were changed during this commit :)

Python Unit Test Overview

Tests Skipped Failures Errors Time
5341 20 💤 0 ❌ 0 🔥 1m 24s ⏱️

@sphenry
Shawn Henry (sphenry) added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit fd253c0 Apr 2, 2026
37 checks passed
Ben Thomas (alliscode) pushed a commit to alliscode/agent-framework that referenced this pull request Apr 3, 2026
…nts directory (microsoft#5011)

* Move workflow-samples and agent-samples under declarative-agents and update all references

Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/f70f7d19-9256-4eec-b7db-28007d74440c

Co-authored-by: sphenry <6749825+sphenry@users.noreply.github.com>

* Fix relative paths in README files inside moved directories

Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/f70f7d19-9256-4eec-b7db-28007d74440c

Co-authored-by: sphenry <6749825+sphenry@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sphenry <6749825+sphenry@users.noreply.github.com>
Co-authored-by: Shawn Henry <shahen@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net python Usage: [Issues, PRs], Target: Python workflows Usage: [Issues, PRs], Target: Workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants