diff --git a/.github/workflows/dotnet-build-and-test.yml b/.github/workflows/dotnet-build-and-test.yml index a47d09ff7d..6454adba31 100644 --- a/.github/workflows/dotnet-build-and-test.yml +++ b/.github/workflows/dotnet-build-and-test.yml @@ -82,7 +82,7 @@ jobs: .github dotnet python - workflow-samples + declarative-agents - name: Setup dotnet uses: actions/setup-dotnet@v5.2.0 @@ -152,7 +152,7 @@ jobs: .github dotnet python - workflow-samples + declarative-agents # Start Cosmos DB Emulator for all integration tests and only for unit tests when CosmosDB changes happened) - name: Start Azure Cosmos DB Emulator diff --git a/.github/workflows/dotnet-integration-tests.yml b/.github/workflows/dotnet-integration-tests.yml index 15c2a16712..3aedbacd1a 100644 --- a/.github/workflows/dotnet-integration-tests.yml +++ b/.github/workflows/dotnet-integration-tests.yml @@ -38,7 +38,7 @@ jobs: .github dotnet python - workflow-samples + declarative-agents - name: Start Azure Cosmos DB Emulator if: runner.os == 'Windows' diff --git a/agent-samples/README.md b/declarative-agents/agent-samples/README.md similarity index 66% rename from agent-samples/README.md rename to declarative-agents/agent-samples/README.md index 953affeb08..751da7c045 100644 --- a/agent-samples/README.md +++ b/declarative-agents/agent-samples/README.md @@ -1,3 +1,3 @@ # Declarative Agents -This folder contains sample agent definitions that can be run using the declarative agent support, for python see the [declarative agent python sample folder](../python/samples/02-agents/declarative/). +This folder contains sample agent definitions that can be run using the declarative agent support, for python see the [declarative agent python sample folder](../../python/samples/02-agents/declarative/). diff --git a/agent-samples/azure/AzureOpenAI.yaml b/declarative-agents/agent-samples/azure/AzureOpenAI.yaml similarity index 100% rename from agent-samples/azure/AzureOpenAI.yaml rename to declarative-agents/agent-samples/azure/AzureOpenAI.yaml diff --git a/agent-samples/azure/AzureOpenAIAssistants.yaml b/declarative-agents/agent-samples/azure/AzureOpenAIAssistants.yaml similarity index 100% rename from agent-samples/azure/AzureOpenAIAssistants.yaml rename to declarative-agents/agent-samples/azure/AzureOpenAIAssistants.yaml diff --git a/agent-samples/azure/AzureOpenAIChat.yaml b/declarative-agents/agent-samples/azure/AzureOpenAIChat.yaml similarity index 100% rename from agent-samples/azure/AzureOpenAIChat.yaml rename to declarative-agents/agent-samples/azure/AzureOpenAIChat.yaml diff --git a/agent-samples/azure/AzureOpenAIResponses.yaml b/declarative-agents/agent-samples/azure/AzureOpenAIResponses.yaml similarity index 100% rename from agent-samples/azure/AzureOpenAIResponses.yaml rename to declarative-agents/agent-samples/azure/AzureOpenAIResponses.yaml diff --git a/agent-samples/chatclient/Assistant.yaml b/declarative-agents/agent-samples/chatclient/Assistant.yaml similarity index 100% rename from agent-samples/chatclient/Assistant.yaml rename to declarative-agents/agent-samples/chatclient/Assistant.yaml diff --git a/agent-samples/chatclient/GetWeather.yaml b/declarative-agents/agent-samples/chatclient/GetWeather.yaml similarity index 100% rename from agent-samples/chatclient/GetWeather.yaml rename to declarative-agents/agent-samples/chatclient/GetWeather.yaml diff --git a/agent-samples/foundry/FoundryAgent.yaml b/declarative-agents/agent-samples/foundry/FoundryAgent.yaml similarity index 100% rename from agent-samples/foundry/FoundryAgent.yaml rename to declarative-agents/agent-samples/foundry/FoundryAgent.yaml diff --git a/agent-samples/foundry/MicrosoftLearnAgent.yaml b/declarative-agents/agent-samples/foundry/MicrosoftLearnAgent.yaml similarity index 100% rename from agent-samples/foundry/MicrosoftLearnAgent.yaml rename to declarative-agents/agent-samples/foundry/MicrosoftLearnAgent.yaml diff --git a/agent-samples/foundry/PersistentAgent.yaml b/declarative-agents/agent-samples/foundry/PersistentAgent.yaml similarity index 100% rename from agent-samples/foundry/PersistentAgent.yaml rename to declarative-agents/agent-samples/foundry/PersistentAgent.yaml diff --git a/agent-samples/openai/OpenAI.yaml b/declarative-agents/agent-samples/openai/OpenAI.yaml similarity index 100% rename from agent-samples/openai/OpenAI.yaml rename to declarative-agents/agent-samples/openai/OpenAI.yaml diff --git a/agent-samples/openai/OpenAIAssistants.yaml b/declarative-agents/agent-samples/openai/OpenAIAssistants.yaml similarity index 100% rename from agent-samples/openai/OpenAIAssistants.yaml rename to declarative-agents/agent-samples/openai/OpenAIAssistants.yaml diff --git a/agent-samples/openai/OpenAIChat.yaml b/declarative-agents/agent-samples/openai/OpenAIChat.yaml similarity index 100% rename from agent-samples/openai/OpenAIChat.yaml rename to declarative-agents/agent-samples/openai/OpenAIChat.yaml diff --git a/agent-samples/openai/OpenAIResponses.yaml b/declarative-agents/agent-samples/openai/OpenAIResponses.yaml similarity index 100% rename from agent-samples/openai/OpenAIResponses.yaml rename to declarative-agents/agent-samples/openai/OpenAIResponses.yaml diff --git a/workflow-samples/CustomerSupport.yaml b/declarative-agents/workflow-samples/CustomerSupport.yaml similarity index 100% rename from workflow-samples/CustomerSupport.yaml rename to declarative-agents/workflow-samples/CustomerSupport.yaml diff --git a/workflow-samples/DeepResearch.yaml b/declarative-agents/workflow-samples/DeepResearch.yaml similarity index 100% rename from workflow-samples/DeepResearch.yaml rename to declarative-agents/workflow-samples/DeepResearch.yaml diff --git a/workflow-samples/Marketing.yaml b/declarative-agents/workflow-samples/Marketing.yaml similarity index 100% rename from workflow-samples/Marketing.yaml rename to declarative-agents/workflow-samples/Marketing.yaml diff --git a/workflow-samples/MathChat.yaml b/declarative-agents/workflow-samples/MathChat.yaml similarity index 100% rename from workflow-samples/MathChat.yaml rename to declarative-agents/workflow-samples/MathChat.yaml diff --git a/workflow-samples/README.md b/declarative-agents/workflow-samples/README.md similarity index 79% rename from workflow-samples/README.md rename to declarative-agents/workflow-samples/README.md index 07cbb859e2..7bb6af1943 100644 --- a/workflow-samples/README.md +++ b/declarative-agents/workflow-samples/README.md @@ -10,8 +10,8 @@ Workflow workflow = DeclarativeWorkflowBuilder.Build("Marketing.yaml", options); ``` These example workflows may be executed by the workflow -[Samples](../dotnet/samples/03-workflows/Declarative) +[Samples](../../dotnet/samples/03-workflows/Declarative) that are present in this repository. -> See the [README.md](../dotnet/samples/03-workflows/Declarative/README.md) +> See the [README.md](../../dotnet/samples/03-workflows/Declarative/README.md) associated with the samples for configuration details. diff --git a/dotnet/agent-framework-dotnet.slnx b/dotnet/agent-framework-dotnet.slnx index 748bed8017..20ea58eaeb 100644 --- a/dotnet/agent-framework-dotnet.slnx +++ b/dotnet/agent-framework-dotnet.slnx @@ -214,12 +214,12 @@ - - - - - - + + + + + + diff --git a/dotnet/samples/02-agents/DeclarativeAgents/ChatClient/Properties/launchSettings.json b/dotnet/samples/02-agents/DeclarativeAgents/ChatClient/Properties/launchSettings.json index 5ec486626c..dcb4830863 100644 --- a/dotnet/samples/02-agents/DeclarativeAgents/ChatClient/Properties/launchSettings.json +++ b/dotnet/samples/02-agents/DeclarativeAgents/ChatClient/Properties/launchSettings.json @@ -2,11 +2,11 @@ "profiles": { "GetWeather": { "commandName": "Project", - "commandLineArgs": "..\\..\\..\\..\\..\\..\\..\\..\\agent-samples\\chatclient\\GetWeather.yaml \"What is the weather in Cambridge, MA in °C?\"" + "commandLineArgs": "..\\..\\..\\..\\..\\..\\..\\..\\declarative-agents\\agent-samples\\chatclient\\GetWeather.yaml \"What is the weather in Cambridge, MA in °C?\"" }, "Assistant": { "commandName": "Project", - "commandLineArgs": "..\\..\\..\\..\\..\\..\\..\\..\\agent-samples\\chatclient\\Assistant.yaml \"Tell me a joke about a pirate in Italian.\"" + "commandLineArgs": "..\\..\\..\\..\\..\\..\\..\\..\\declarative-agents\\agent-samples\\chatclient\\Assistant.yaml \"Tell me a joke about a pirate in Italian.\"" } } } \ No newline at end of file diff --git a/dotnet/samples/03-workflows/Declarative/CustomerSupport/CustomerSupport.csproj b/dotnet/samples/03-workflows/Declarative/CustomerSupport/CustomerSupport.csproj index ec6ca6093c..80158364ae 100644 --- a/dotnet/samples/03-workflows/Declarative/CustomerSupport/CustomerSupport.csproj +++ b/dotnet/samples/03-workflows/Declarative/CustomerSupport/CustomerSupport.csproj @@ -30,7 +30,7 @@ - + Always diff --git a/dotnet/samples/03-workflows/Declarative/DeepResearch/DeepResearch.csproj b/dotnet/samples/03-workflows/Declarative/DeepResearch/DeepResearch.csproj index 60928aaa52..504b948396 100644 --- a/dotnet/samples/03-workflows/Declarative/DeepResearch/DeepResearch.csproj +++ b/dotnet/samples/03-workflows/Declarative/DeepResearch/DeepResearch.csproj @@ -30,7 +30,7 @@ - + Always diff --git a/dotnet/samples/03-workflows/Declarative/ExecuteWorkflow/Program.cs b/dotnet/samples/03-workflows/Declarative/ExecuteWorkflow/Program.cs index 0d80cb686d..f7e4dea673 100644 --- a/dotnet/samples/03-workflows/Declarative/ExecuteWorkflow/Program.cs +++ b/dotnet/samples/03-workflows/Declarative/ExecuteWorkflow/Program.cs @@ -143,7 +143,7 @@ internal sealed class Program string? repoFolder = GetRepoFolder(); if (repoFolder is not null) { - workflowFile = Path.Combine(repoFolder, "workflow-samples", workflowFile); + workflowFile = Path.Combine(repoFolder, "declarative-agents", "workflow-samples", workflowFile); workflowFile = Path.ChangeExtension(workflowFile, ".yaml"); } } diff --git a/dotnet/samples/03-workflows/Declarative/GenerateCode/Program.cs b/dotnet/samples/03-workflows/Declarative/GenerateCode/Program.cs index 54c77d4077..c9bbc3502e 100644 --- a/dotnet/samples/03-workflows/Declarative/GenerateCode/Program.cs +++ b/dotnet/samples/03-workflows/Declarative/GenerateCode/Program.cs @@ -60,7 +60,7 @@ internal sealed class Program string? repoFolder = GetRepoFolder(); if (repoFolder is not null) { - workflowFile = Path.Combine(repoFolder, "workflow-samples", workflowFile); + workflowFile = Path.Combine(repoFolder, "declarative-agents", "workflow-samples", workflowFile); workflowFile = Path.ChangeExtension(workflowFile, ".yaml"); } } diff --git a/dotnet/samples/03-workflows/Declarative/HostedWorkflow/HostedWorkflow.csproj b/dotnet/samples/03-workflows/Declarative/HostedWorkflow/HostedWorkflow.csproj index 31e88d54e7..e2062e40e4 100644 --- a/dotnet/samples/03-workflows/Declarative/HostedWorkflow/HostedWorkflow.csproj +++ b/dotnet/samples/03-workflows/Declarative/HostedWorkflow/HostedWorkflow.csproj @@ -31,7 +31,7 @@ - + Always diff --git a/dotnet/samples/03-workflows/Declarative/Marketing/Marketing.csproj b/dotnet/samples/03-workflows/Declarative/Marketing/Marketing.csproj index 23d1224a5e..ac4b61d7f3 100644 --- a/dotnet/samples/03-workflows/Declarative/Marketing/Marketing.csproj +++ b/dotnet/samples/03-workflows/Declarative/Marketing/Marketing.csproj @@ -30,7 +30,7 @@ - + Always diff --git a/dotnet/samples/03-workflows/Declarative/StudentTeacher/StudentTeacher.csproj b/dotnet/samples/03-workflows/Declarative/StudentTeacher/StudentTeacher.csproj index 2785c5930b..d8375f70cd 100644 --- a/dotnet/samples/03-workflows/Declarative/StudentTeacher/StudentTeacher.csproj +++ b/dotnet/samples/03-workflows/Declarative/StudentTeacher/StudentTeacher.csproj @@ -30,7 +30,7 @@ - + Always diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/README.md b/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/README.md index 4408f0febd..2a50b6045d 100644 --- a/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/README.md +++ b/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/README.md @@ -4,9 +4,9 @@ Declarative Workflows is a no-code platform for orchestrating AI agents to accom It allows users to design, execute, and monitor workflows using simple declarative configurations—no coding required. By connecting multiple AI agents and services, it enables automation of sophisticated processes that traditionally require custom engineering. -We've provided a set of [Sample Workflows](../../../workflow-samples/) within the `agent-framework` repository. +We've provided a set of [Sample Workflows](../../../declarative-agents/workflow-samples/) within the `agent-framework` repository. -Please refer to the [README](../../../workflow-samples/README.md) for setup instructions to run the sample workflows in your environment. +Please refer to the [README](../../../declarative-agents/workflow-samples/README.md) for setup instructions to run the sample workflows in your environment. As part of our [Getting Started with Declarative Workflows](../../samples/03-workflows/Declarative/README.md), we've provided a console application that is able to execute any declarative workflow. diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs index 0efb0c19c4..921fafb61d 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs @@ -29,11 +29,11 @@ public sealed class DeclarativeCodeGenTest(ITestOutputHelper output) : WorkflowT [InlineData("MathChat.yaml", "MathChat.json", true)] [InlineData("DeepResearch.yaml", "DeepResearch.json", Skip = "Long running")] public Task ValidateScenarioAsync(string workflowFileName, string testcaseFileName, bool externalConveration = false) => - this.RunWorkflowAsync(Path.Combine(GetRepoFolder(), "workflow-samples", workflowFileName), testcaseFileName, externalConveration); + this.RunWorkflowAsync(Path.Combine(GetRepoFolder(), "declarative-agents", "workflow-samples", workflowFileName), testcaseFileName, externalConveration); [Fact(Skip = "Needs template support")] public Task ValidateMultiTurnAsync() => - this.RunWorkflowAsync(Path.Combine(GetRepoFolder(), "workflow-samples", "HumanInLoop.yaml"), "HumanInLoop.json", useJsonCheckpoint: true); + this.RunWorkflowAsync(Path.Combine(GetRepoFolder(), "declarative-agents", "workflow-samples", "HumanInLoop.yaml"), "HumanInLoop.json", useJsonCheckpoint: true); protected override async Task RunAndVerifyAsync(Testcase testcase, string workflowPath, DeclarativeWorkflowOptions workflowOptions, TInput input, bool useJsonCheckpoint) { diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs index eb1d0f55a2..ea260949fc 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs @@ -41,7 +41,7 @@ public sealed class DeclarativeWorkflowTest(ITestOutputHelper output) : Workflow private static string GetWorkflowPath(string workflowFileName, bool isSample) => isSample - ? Path.Combine(GetRepoFolder(), "workflow-samples", workflowFileName) + ? Path.Combine(GetRepoFolder(), "declarative-agents", "workflow-samples", workflowFileName) : Path.Combine(Environment.CurrentDirectory, "Workflows", workflowFileName); protected override async Task RunAndVerifyAsync(Testcase testcase, string workflowPath, DeclarativeWorkflowOptions workflowOptions, TInput input, bool useJsonCheckpoint) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs index 43e64bbb35..85e133a023 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs @@ -94,7 +94,7 @@ public abstract class WorkflowTest(ITestOutputHelper output) : IntegrationTest(o while (current is not null) { - if (Directory.Exists(Path.Combine(current.FullName, "workflow-samples"))) + if (Directory.Exists(Path.Combine(current.FullName, "declarative-agents", "workflow-samples"))) { return current.FullName; } diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj index bc503de675..01caa7c1e9 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj @@ -27,7 +27,7 @@ Always - + Never diff --git a/python/packages/declarative/tests/test_declarative_loader.py b/python/packages/declarative/tests/test_declarative_loader.py index 02485b9e9c..db78d33315 100644 --- a/python/packages/declarative/tests/test_declarative_loader.py +++ b/python/packages/declarative/tests/test_declarative_loader.py @@ -439,10 +439,10 @@ properties: def _get_agent_sample_yaml_files() -> list[tuple[Path, Path]]: - """Helper function to collect all YAML files from agent-samples directory.""" + """Helper function to collect all YAML files from declarative-agents/agent-samples directory.""" current_file = Path(__file__) repo_root = current_file.parent.parent.parent.parent # tests -> declarative -> packages -> python - agent_samples_dir = repo_root.parent / "agent-samples" + agent_samples_dir = repo_root.parent / "declarative-agents" / "agent-samples" if not agent_samples_dir.exists(): return [] @@ -457,7 +457,7 @@ def _get_agent_sample_yaml_files() -> list[tuple[Path, Path]]: ids=lambda x: x[0].name if isinstance(x, tuple) else str(x), ) def test_agent_schema_dispatch_agent_samples(yaml_file: Path, agent_samples_dir: Path): - """Test that agent_schema_dispatch successfully loads a YAML file from agent-samples directory.""" + """Test that agent_schema_dispatch loads a YAML file from declarative-agents/agent-samples directory.""" with open(yaml_file) as f: content = f.read() result = agent_schema_dispatch(yaml.safe_load(content)) diff --git a/python/packages/declarative/tests/test_workflow_samples_integration.py b/python/packages/declarative/tests/test_workflow_samples_integration.py index d5ad65caab..9655f0772e 100644 --- a/python/packages/declarative/tests/test_workflow_samples_integration.py +++ b/python/packages/declarative/tests/test_workflow_samples_integration.py @@ -2,7 +2,7 @@ """Integration tests for workflow samples. -These tests verify that the workflow samples from workflow-samples/ directory +These tests verify that the workflow samples from declarative-agents/workflow-samples/ directory can be parsed and validated by the WorkflowFactory. """ @@ -13,7 +13,7 @@ import yaml # Path to workflow samples - navigate from tests dir up to repo root # tests/test_*.py -> packages/declarative/tests/ -> packages/declarative/ -> packages/ -> python/ -> repo root -WORKFLOW_SAMPLES_DIR = Path(__file__).parent.parent.parent.parent.parent / "workflow-samples" +WORKFLOW_SAMPLES_DIR = Path(__file__).parent.parent.parent.parent.parent / "declarative-agents" / "workflow-samples" def get_workflow_sample_files(): diff --git a/python/samples/02-agents/declarative/README.md b/python/samples/02-agents/declarative/README.md index 8cb6eadcd8..8e6f796081 100644 --- a/python/samples/02-agents/declarative/README.md +++ b/python/samples/02-agents/declarative/README.md @@ -28,7 +28,7 @@ Demonstrates how to create an agent with custom function tools using the declara - Uses Azure OpenAI Responses client - Shows how to bind Python functions to the agent using the `bindings` parameter -- Loads agent configuration from `agent-samples/chatclient/GetWeather.yaml` +- Loads agent configuration from `declarative-agents/agent-samples/chatclient/GetWeather.yaml` - Implements a simple weather lookup function tool **Key concepts**: Function binding, Azure OpenAI integration, tool usage @@ -39,7 +39,7 @@ Shows how to create an agent that can search and retrieve information from Micro - Uses Azure AI Foundry client with MCP server integration - Demonstrates async context managers for proper resource cleanup -- Loads agent configuration from `agent-samples/foundry/MicrosoftLearnAgent.yaml` +- Loads agent configuration from `declarative-agents/agent-samples/foundry/MicrosoftLearnAgent.yaml` - Uses Azure CLI credentials for authentication - Leverages MCP to access Microsoft documentation tools @@ -63,7 +63,7 @@ Illustrates a basic agent using Azure OpenAI with structured responses. - Uses Azure OpenAI Responses client - Shows how to pass credentials via `client_kwargs` -- Loads agent configuration from `agent-samples/azure/AzureOpenAIResponses.yaml` +- Loads agent configuration from `declarative-agents/agent-samples/azure/AzureOpenAIResponses.yaml` - Demonstrates accessing structured response data **Key concepts**: Azure OpenAI integration, credential management, structured outputs @@ -74,18 +74,18 @@ Demonstrates the simplest possible agent using OpenAI directly. - Uses OpenAI API (requires `OPENAI_API_KEY` environment variable) - Shows minimal configuration needed for basic agent creation -- Loads agent configuration from `agent-samples/openai/OpenAIResponses.yaml` +- Loads agent configuration from `declarative-agents/agent-samples/openai/OpenAIResponses.yaml` **Key concepts**: OpenAI integration, minimal setup, environment-based configuration ## Agent Samples Repository -All the YAML configuration files referenced in these samples are located in the [`agent-samples`](../../../../agent-samples/) folder at the repository root. This folder contains declarative agent specifications organized by provider: +All the YAML configuration files referenced in these samples are located in the [`declarative-agents/agent-samples`](../../../../declarative-agents/agent-samples/) folder at the repository root. This folder contains declarative agent specifications organized by provider: -- **`agent-samples/azure/`** - Azure OpenAI agent configurations -- **`agent-samples/chatclient/`** - Chat client agent configurations with tools -- **`agent-samples/foundry/`** - Azure AI Foundry agent configurations -- **`agent-samples/openai/`** - OpenAI agent configurations +- **`declarative-agents/agent-samples/azure/`** - Azure OpenAI agent configurations +- **`declarative-agents/agent-samples/chatclient/`** - Chat client agent configurations with tools +- **`declarative-agents/agent-samples/foundry/`** - Azure AI Foundry agent configurations +- **`declarative-agents/agent-samples/openai/`** - OpenAI agent configurations **Important**: These YAML files are **platform-agnostic** and work with both Python and .NET implementations of the Agent Framework. You can use the exact same YAML definition to create agents in either language, making it easy to share agent configurations across different technology stacks. @@ -261,12 +261,12 @@ python openai_responses_agent.py ## Learn More - [Agent Framework Declarative Package](../../../packages/declarative/) - Main declarative package documentation -- [Agent Samples](../../../../agent-samples/) - Additional declarative agent YAML specifications +- [Agent Samples](../../../../declarative-agents/agent-samples/) - Additional declarative agent YAML specifications - [Agent Framework Core](../../../packages/core/) - Core agent framework documentation ## Next Steps -1. Explore the YAML files in the `agent-samples` folder to understand the configuration format +1. Explore the YAML files in the `declarative-agents/agent-samples` folder to understand the configuration format 2. Try modifying the samples to use different models or instructions 3. Create your own declarative agent configurations 4. Build custom function tools and bind them to your agents diff --git a/python/samples/02-agents/declarative/azure_openai_responses_agent.py b/python/samples/02-agents/declarative/azure_openai_responses_agent.py index a8988e8311..020399daa5 100644 --- a/python/samples/02-agents/declarative/azure_openai_responses_agent.py +++ b/python/samples/02-agents/declarative/azure_openai_responses_agent.py @@ -14,7 +14,7 @@ async def main(): """Create an agent from a declarative yaml specification and run it.""" # get the path current_path = Path(__file__).parent - yaml_path = current_path.parent.parent.parent.parent / "agent-samples" / "azure" / "AzureOpenAIResponses.yaml" + yaml_path = current_path.parent.parent.parent.parent / "declarative-agents" / "agent-samples" / "azure" / "AzureOpenAIResponses.yaml" # load the yaml from the path with yaml_path.open("r") as f: yaml_str = f.read() diff --git a/python/samples/02-agents/declarative/get_weather_agent.py b/python/samples/02-agents/declarative/get_weather_agent.py index 30a85de83d..a5ee2e3670 100644 --- a/python/samples/02-agents/declarative/get_weather_agent.py +++ b/python/samples/02-agents/declarative/get_weather_agent.py @@ -22,7 +22,7 @@ async def main(): """Create an agent from a declarative yaml specification and run it.""" # get the path current_path = Path(__file__).parent - yaml_path = current_path.parent.parent.parent.parent / "agent-samples" / "chatclient" / "GetWeather.yaml" + yaml_path = current_path.parent.parent.parent.parent / "declarative-agents" / "agent-samples" / "chatclient" / "GetWeather.yaml" # load the yaml from the path with yaml_path.open("r") as f: yaml_str = f.read() diff --git a/python/samples/02-agents/declarative/microsoft_learn_agent.py b/python/samples/02-agents/declarative/microsoft_learn_agent.py index 53415ed55d..59d603886c 100644 --- a/python/samples/02-agents/declarative/microsoft_learn_agent.py +++ b/python/samples/02-agents/declarative/microsoft_learn_agent.py @@ -28,7 +28,7 @@ async def main(): """Create an agent from a declarative yaml specification and run it.""" # get the path current_path = Path(__file__).parent - yaml_path = current_path.parent.parent.parent.parent / "agent-samples" / "foundry" / "MicrosoftLearnAgent.yaml" + yaml_path = current_path.parent.parent.parent.parent / "declarative-agents" / "agent-samples" / "foundry" / "MicrosoftLearnAgent.yaml" # create the agent from the yaml async with ( AzureCliCredential() as credential, diff --git a/python/samples/02-agents/declarative/openai_agent.py b/python/samples/02-agents/declarative/openai_agent.py index 741e886a09..0bb9a91e72 100644 --- a/python/samples/02-agents/declarative/openai_agent.py +++ b/python/samples/02-agents/declarative/openai_agent.py @@ -13,7 +13,7 @@ async def main(): """Create an agent from a declarative yaml specification and run it.""" # get the path current_path = Path(__file__).parent - yaml_path = current_path.parent.parent.parent.parent / "agent-samples" / "openai" / "OpenAIResponses.yaml" + yaml_path = current_path.parent.parent.parent.parent / "declarative-agents" / "agent-samples" / "openai" / "OpenAIResponses.yaml" # create the agent from the yaml agent = AgentFactory(safe_mode=False).create_agent_from_yaml_path(yaml_path) # use the agent diff --git a/python/samples/03-workflows/declarative/customer_support/main.py b/python/samples/03-workflows/declarative/customer_support/main.py index 374825871d..d67adebf1b 100644 --- a/python/samples/03-workflows/declarative/customer_support/main.py +++ b/python/samples/03-workflows/declarative/customer_support/main.py @@ -243,9 +243,9 @@ async def main() -> None: # Load workflow from YAML samples_root = Path(__file__).parent.parent.parent.parent.parent.parent.parent - workflow_path = samples_root / "workflow-samples" / "CustomerSupport.yaml" + workflow_path = samples_root / "declarative-agents" / "workflow-samples" / "CustomerSupport.yaml" if not workflow_path.exists(): - # Fall back to local copy if workflow-samples doesn't exist + # Fall back to local copy if declarative-agents/workflow-samples doesn't exist workflow_path = Path(__file__).parent / "workflow.yaml" workflow = factory.create_workflow_from_yaml_path(workflow_path) diff --git a/python/samples/03-workflows/declarative/deep_research/main.py b/python/samples/03-workflows/declarative/deep_research/main.py index 49e9b86b8a..2eccb44da0 100644 --- a/python/samples/03-workflows/declarative/deep_research/main.py +++ b/python/samples/03-workflows/declarative/deep_research/main.py @@ -190,9 +190,9 @@ async def main() -> None: # Load workflow from YAML samples_root = Path(__file__).parent.parent.parent.parent.parent.parent - workflow_path = samples_root / "workflow-samples" / "DeepResearch.yaml" + workflow_path = samples_root / "declarative-agents" / "workflow-samples" / "DeepResearch.yaml" if not workflow_path.exists(): - # Fall back to local copy if workflow-samples doesn't exist + # Fall back to local copy if declarative-agents/workflow-samples doesn't exist workflow_path = Path(__file__).parent / "workflow.yaml" workflow = factory.create_workflow_from_yaml_path(workflow_path)