diff --git a/python/packages/azurefunctions/tests/integration_tests/testutils.py b/python/packages/azurefunctions/tests/integration_tests/testutils.py index 75deb352bd..9186b45339 100644 --- a/python/packages/azurefunctions/tests/integration_tests/testutils.py +++ b/python/packages/azurefunctions/tests/integration_tests/testutils.py @@ -234,7 +234,7 @@ def get_sample_path_from_marker(request) -> tuple[Path | None, str | None]: sample_name = marker.args[0] repo_root = _resolve_repo_root() - sample_path = repo_root / "samples" / "getting_started" / "azure_functions" / sample_name + sample_path = repo_root / "samples" / "durable" / "azure_functions" / sample_name if not sample_path.exists(): return None, f"Sample directory does not exist: {sample_path}" diff --git a/python/packages/durabletask/tests/integration_tests/conftest.py b/python/packages/durabletask/tests/integration_tests/conftest.py index 2cd045f291..6aca273fab 100644 --- a/python/packages/durabletask/tests/integration_tests/conftest.py +++ b/python/packages/durabletask/tests/integration_tests/conftest.py @@ -169,7 +169,7 @@ class TestSingleAgent: pytest.fail("Test class must have @pytest.mark.sample() marker") sample_name: str = cast(str, sample_marker.args[0]) # type: ignore[union-attr] - sample_path: Path = Path(__file__).parents[4] / "samples" / "getting_started" / "durabletask" / sample_name + sample_path: Path = Path(__file__).parents[4] / "samples" / "durable" / "console_apps" / sample_name worker_file: Path = sample_path / "worker.py" if not worker_file.exists(): diff --git a/python/packages/durabletask/tests/integration_tests/test_03_dt_single_agent_streaming.py b/python/packages/durabletask/tests/integration_tests/test_03_dt_single_agent_streaming.py index d127a87356..ab360a81f3 100644 --- a/python/packages/durabletask/tests/integration_tests/test_03_dt_single_agent_streaming.py +++ b/python/packages/durabletask/tests/integration_tests/test_03_dt_single_agent_streaming.py @@ -29,7 +29,7 @@ from dt_testutils import OrchestrationHelper, create_agent_client # Add sample directory to path to import RedisStreamResponseHandler -SAMPLE_DIR = Path(__file__).parents[4] / "samples" / "getting_started" / "durabletask" / "03_single_agent_streaming" +SAMPLE_DIR = Path(__file__).parents[4] / "samples" / "durable" / "console_apps" / "03_single_agent_streaming" sys.path.insert(0, str(SAMPLE_DIR)) from redis_stream_response_handler import RedisStreamResponseHandler # type: ignore[reportMissingImports] # noqa: E402 diff --git a/python/samples/README.md b/python/samples/README.md index a2c539be02..de1b35e82a 100644 --- a/python/samples/README.md +++ b/python/samples/README.md @@ -242,32 +242,36 @@ The recommended way to use Ollama is via the native `OllamaChatClient` from the | [`getting_started/multimodal_input/openai_chat_multimodal.py`](./getting_started/multimodal_input/openai_chat_multimodal.py) | OpenAI Chat with multimodal (image) input example | -## Azure Functions +## Durable + +These samples demonstrate durable agent hosting patterns using the Durable Task Scheduler and Azure Functions with Durable Extension. + +### Azure Functions | Sample | Description | |--------|-------------| -| [`getting_started/azure_functions/01_single_agent/`](./getting_started/azure_functions/01_single_agent/) | Host a single agent in Azure Functions with Durable Extension HTTP endpoints and per-session state. | -| [`getting_started/azure_functions/02_multi_agent/`](./getting_started/azure_functions/02_multi_agent/) | Register multiple agents in one function app with dedicated run routes and a health check endpoint. | -| [`getting_started/azure_functions/03_reliable_streaming/`](./getting_started/azure_functions/03_reliable_streaming/) | Implement reliable streaming for durable agents using Redis Streams with cursor-based resumption. | -| [`getting_started/azure_functions/04_single_agent_orchestration_chaining/`](./getting_started/azure_functions/04_single_agent_orchestration_chaining/) | Chain sequential agent executions inside a durable orchestration while preserving the shared thread context. | -| [`getting_started/azure_functions/05_multi_agent_orchestration_concurrency/`](./getting_started/azure_functions/05_multi_agent_orchestration_concurrency/) | Run two agents concurrently within a durable orchestration and combine their domain-specific outputs. | -| [`getting_started/azure_functions/06_multi_agent_orchestration_conditionals/`](./getting_started/azure_functions/06_multi_agent_orchestration_conditionals/) | Route orchestration logic based on structured agent responses for spam detection and reply drafting. | -| [`getting_started/azure_functions/07_single_agent_orchestration_hitl/`](./getting_started/azure_functions/07_single_agent_orchestration_hitl/) | Implement a human-in-the-loop approval loop that iterates on agent output inside a durable orchestration. | -| [`getting_started/azure_functions/08_mcp_server/`](./getting_started/azure_functions/08_mcp_server/) | Configure agents as both HTTP endpoints and MCP tools for flexible integration patterns. | +| [`durable/azure_functions/01_single_agent/`](./durable/azure_functions/01_single_agent/) | Host a single agent in Azure Functions with Durable Extension HTTP endpoints and per-session state. | +| [`durable/azure_functions/02_multi_agent/`](./durable/azure_functions/02_multi_agent/) | Register multiple agents in one function app with dedicated run routes and a health check endpoint. | +| [`durable/azure_functions/03_reliable_streaming/`](./durable/azure_functions/03_reliable_streaming/) | Implement reliable streaming for durable agents using Redis Streams with cursor-based resumption. | +| [`durable/azure_functions/04_single_agent_orchestration_chaining/`](./durable/azure_functions/04_single_agent_orchestration_chaining/) | Chain sequential agent executions inside a durable orchestration while preserving the shared thread context. | +| [`durable/azure_functions/05_multi_agent_orchestration_concurrency/`](./durable/azure_functions/05_multi_agent_orchestration_concurrency/) | Run two agents concurrently within a durable orchestration and combine their domain-specific outputs. | +| [`durable/azure_functions/06_multi_agent_orchestration_conditionals/`](./durable/azure_functions/06_multi_agent_orchestration_conditionals/) | Route orchestration logic based on structured agent responses for spam detection and reply drafting. | +| [`durable/azure_functions/07_single_agent_orchestration_hitl/`](./durable/azure_functions/07_single_agent_orchestration_hitl/) | Implement a human-in-the-loop approval loop that iterates on agent output inside a durable orchestration. | +| [`durable/azure_functions/08_mcp_server/`](./durable/azure_functions/08_mcp_server/) | Configure agents as both HTTP endpoints and MCP tools for flexible integration patterns. | -## Durable Task +### Console Apps These samples demonstrate durable agent hosting using the Durable Task Scheduler with a worker-client architecture pattern, enabling distributed agent execution with persistent conversation state. | Sample | Description | |--------|-------------| -| [`getting_started/durabletask/01_single_agent/`](./getting_started/durabletask/01_single_agent/) | Host a single conversational agent with worker-client architecture and agent state management. | -| [`getting_started/durabletask/02_multi_agent/`](./getting_started/durabletask/02_multi_agent/) | Host multiple domain-specific agents and route requests based on question topic. | -| [`getting_started/durabletask/03_single_agent_streaming/`](./getting_started/durabletask/03_single_agent_streaming/) | Implement reliable streaming using Redis Streams with cursor-based resumption for durable agents. | -| [`getting_started/durabletask/04_single_agent_orchestration_chaining/`](./getting_started/durabletask/04_single_agent_orchestration_chaining/) | Chain multiple agent invocations using durable orchestration while preserving conversation context. | -| [`getting_started/durabletask/05_multi_agent_orchestration_concurrency/`](./getting_started/durabletask/05_multi_agent_orchestration_concurrency/) | Run multiple agents concurrently within an orchestration and aggregate their responses. | -| [`getting_started/durabletask/06_multi_agent_orchestration_conditionals/`](./getting_started/durabletask/06_multi_agent_orchestration_conditionals/) | Implement conditional branching with spam detection using structured outputs and activity functions. | -| [`getting_started/durabletask/07_single_agent_orchestration_hitl/`](./getting_started/durabletask/07_single_agent_orchestration_hitl/) | Human-in-the-loop pattern with external event handling, timeouts, and iterative refinement. | +| [`durable/console_apps/01_single_agent/`](./durable/console_apps/01_single_agent/) | Host a single conversational agent with worker-client architecture and agent state management. | +| [`durable/console_apps/02_multi_agent/`](./durable/console_apps/02_multi_agent/) | Host multiple domain-specific agents and route requests based on question topic. | +| [`durable/console_apps/03_single_agent_streaming/`](./durable/console_apps/03_single_agent_streaming/) | Implement reliable streaming using Redis Streams with cursor-based resumption for durable agents. | +| [`durable/console_apps/04_single_agent_orchestration_chaining/`](./durable/console_apps/04_single_agent_orchestration_chaining/) | Chain multiple agent invocations using durable orchestration while preserving conversation context. | +| [`durable/console_apps/05_multi_agent_orchestration_concurrency/`](./durable/console_apps/05_multi_agent_orchestration_concurrency/) | Run multiple agents concurrently within an orchestration and aggregate their responses. | +| [`durable/console_apps/06_multi_agent_orchestration_conditionals/`](./durable/console_apps/06_multi_agent_orchestration_conditionals/) | Implement conditional branching with spam detection using structured outputs and activity functions. | +| [`durable/console_apps/07_single_agent_orchestration_hitl/`](./durable/console_apps/07_single_agent_orchestration_hitl/) | Human-in-the-loop pattern with external event handling, timeouts, and iterative refinement. | ## Observability diff --git a/python/samples/durable/README.md b/python/samples/durable/README.md new file mode 100644 index 0000000000..ec0f7915e6 --- /dev/null +++ b/python/samples/durable/README.md @@ -0,0 +1,52 @@ +# Durable Agent Samples + +This directory contains samples demonstrating durable agent hosting patterns for the Microsoft Agent Framework. + +## Directory Structure + +- **[azure_functions/](./azure_functions/)** - Samples for hosting durable agents in Azure Functions with the Durable Extension +- **[console_apps/](./console_apps/)** - Samples for hosting durable agents using the Durable Task Scheduler in console applications + +## Overview + +Durable agent hosting enables distributed agent execution with persistent conversation state, orchestration capabilities, and reliable streaming. These patterns are essential for building scalable, production-ready agent applications. + +### Azure Functions + +The Azure Functions samples demonstrate how to host agents in Azure Functions using the Durable Extension. These samples show HTTP endpoints for agent interaction, durable orchestrations, and integration with Azure services. + +Key features: +- HTTP-triggered agent endpoints +- Durable orchestrations for multi-step workflows +- Per-session state management +- Reliable streaming with Redis +- Human-in-the-loop patterns + +See the [Azure Functions README](./azure_functions/README.md) for detailed setup instructions. + +### Console Apps + +The Console Apps samples demonstrate the worker-client architecture pattern using the Durable Task Scheduler. These samples run locally or in any hosting environment that supports Python applications. + +Key features: +- Worker-client architecture +- Distributed agent execution +- Persistent conversation state +- Orchestration patterns (chaining, concurrency, conditionals) +- Reliable streaming + +See the [Console Apps README](./console_apps/README.md) for detailed setup instructions. + +## Getting Started + +Each subdirectory contains its own README with specific setup instructions and prerequisites. Both patterns require: + +- Python 3.9 or later +- Azure OpenAI Service with a deployed model +- Appropriate durable infrastructure (Durable Task Scheduler or Azure Functions with Durable Extension) + +## Related Documentation + +- [Durable Task Framework Documentation](https://durabletask.github.io/) +- [Azure Functions Durable Extension](https://learn.microsoft.com/azure/azure-functions/durable/) +- [Agent Framework Documentation](https://aka.ms/agent-framework) diff --git a/python/samples/durable/__init__.py b/python/samples/durable/__init__.py new file mode 100644 index 0000000000..2a50eae894 --- /dev/null +++ b/python/samples/durable/__init__.py @@ -0,0 +1 @@ +# Copyright (c) Microsoft. All rights reserved. diff --git a/python/samples/getting_started/azure_functions/01_single_agent/README.md b/python/samples/durable/azure_functions/01_single_agent/README.md similarity index 100% rename from python/samples/getting_started/azure_functions/01_single_agent/README.md rename to python/samples/durable/azure_functions/01_single_agent/README.md diff --git a/python/samples/getting_started/azure_functions/01_single_agent/demo.http b/python/samples/durable/azure_functions/01_single_agent/demo.http similarity index 100% rename from python/samples/getting_started/azure_functions/01_single_agent/demo.http rename to python/samples/durable/azure_functions/01_single_agent/demo.http diff --git a/python/samples/getting_started/azure_functions/01_single_agent/function_app.py b/python/samples/durable/azure_functions/01_single_agent/function_app.py similarity index 100% rename from python/samples/getting_started/azure_functions/01_single_agent/function_app.py rename to python/samples/durable/azure_functions/01_single_agent/function_app.py diff --git a/python/samples/getting_started/azure_functions/01_single_agent/host.json b/python/samples/durable/azure_functions/01_single_agent/host.json similarity index 100% rename from python/samples/getting_started/azure_functions/01_single_agent/host.json rename to python/samples/durable/azure_functions/01_single_agent/host.json diff --git a/python/samples/getting_started/azure_functions/01_single_agent/local.settings.json.template b/python/samples/durable/azure_functions/01_single_agent/local.settings.json.template similarity index 100% rename from python/samples/getting_started/azure_functions/01_single_agent/local.settings.json.template rename to python/samples/durable/azure_functions/01_single_agent/local.settings.json.template diff --git a/python/samples/getting_started/azure_functions/01_single_agent/requirements.txt b/python/samples/durable/azure_functions/01_single_agent/requirements.txt similarity index 100% rename from python/samples/getting_started/azure_functions/01_single_agent/requirements.txt rename to python/samples/durable/azure_functions/01_single_agent/requirements.txt diff --git a/python/samples/getting_started/azure_functions/02_multi_agent/README.md b/python/samples/durable/azure_functions/02_multi_agent/README.md similarity index 100% rename from python/samples/getting_started/azure_functions/02_multi_agent/README.md rename to python/samples/durable/azure_functions/02_multi_agent/README.md diff --git a/python/samples/getting_started/azure_functions/02_multi_agent/demo.http b/python/samples/durable/azure_functions/02_multi_agent/demo.http similarity index 100% rename from python/samples/getting_started/azure_functions/02_multi_agent/demo.http rename to python/samples/durable/azure_functions/02_multi_agent/demo.http diff --git a/python/samples/getting_started/azure_functions/02_multi_agent/function_app.py b/python/samples/durable/azure_functions/02_multi_agent/function_app.py similarity index 100% rename from python/samples/getting_started/azure_functions/02_multi_agent/function_app.py rename to python/samples/durable/azure_functions/02_multi_agent/function_app.py diff --git a/python/samples/getting_started/azure_functions/02_multi_agent/host.json b/python/samples/durable/azure_functions/02_multi_agent/host.json similarity index 100% rename from python/samples/getting_started/azure_functions/02_multi_agent/host.json rename to python/samples/durable/azure_functions/02_multi_agent/host.json diff --git a/python/samples/getting_started/azure_functions/02_multi_agent/local.settings.json.template b/python/samples/durable/azure_functions/02_multi_agent/local.settings.json.template similarity index 100% rename from python/samples/getting_started/azure_functions/02_multi_agent/local.settings.json.template rename to python/samples/durable/azure_functions/02_multi_agent/local.settings.json.template diff --git a/python/samples/getting_started/azure_functions/02_multi_agent/requirements.txt b/python/samples/durable/azure_functions/02_multi_agent/requirements.txt similarity index 100% rename from python/samples/getting_started/azure_functions/02_multi_agent/requirements.txt rename to python/samples/durable/azure_functions/02_multi_agent/requirements.txt diff --git a/python/samples/getting_started/azure_functions/03_reliable_streaming/README.md b/python/samples/durable/azure_functions/03_reliable_streaming/README.md similarity index 100% rename from python/samples/getting_started/azure_functions/03_reliable_streaming/README.md rename to python/samples/durable/azure_functions/03_reliable_streaming/README.md diff --git a/python/samples/getting_started/azure_functions/03_reliable_streaming/demo.http b/python/samples/durable/azure_functions/03_reliable_streaming/demo.http similarity index 100% rename from python/samples/getting_started/azure_functions/03_reliable_streaming/demo.http rename to python/samples/durable/azure_functions/03_reliable_streaming/demo.http diff --git a/python/samples/getting_started/azure_functions/03_reliable_streaming/function_app.py b/python/samples/durable/azure_functions/03_reliable_streaming/function_app.py similarity index 100% rename from python/samples/getting_started/azure_functions/03_reliable_streaming/function_app.py rename to python/samples/durable/azure_functions/03_reliable_streaming/function_app.py diff --git a/python/samples/getting_started/azure_functions/03_reliable_streaming/host.json b/python/samples/durable/azure_functions/03_reliable_streaming/host.json similarity index 100% rename from python/samples/getting_started/azure_functions/03_reliable_streaming/host.json rename to python/samples/durable/azure_functions/03_reliable_streaming/host.json diff --git a/python/samples/getting_started/azure_functions/03_reliable_streaming/local.settings.json.template b/python/samples/durable/azure_functions/03_reliable_streaming/local.settings.json.template similarity index 100% rename from python/samples/getting_started/azure_functions/03_reliable_streaming/local.settings.json.template rename to python/samples/durable/azure_functions/03_reliable_streaming/local.settings.json.template diff --git a/python/samples/getting_started/azure_functions/03_reliable_streaming/redis_stream_response_handler.py b/python/samples/durable/azure_functions/03_reliable_streaming/redis_stream_response_handler.py similarity index 100% rename from python/samples/getting_started/azure_functions/03_reliable_streaming/redis_stream_response_handler.py rename to python/samples/durable/azure_functions/03_reliable_streaming/redis_stream_response_handler.py diff --git a/python/samples/getting_started/azure_functions/03_reliable_streaming/requirements.txt b/python/samples/durable/azure_functions/03_reliable_streaming/requirements.txt similarity index 100% rename from python/samples/getting_started/azure_functions/03_reliable_streaming/requirements.txt rename to python/samples/durable/azure_functions/03_reliable_streaming/requirements.txt diff --git a/python/samples/getting_started/azure_functions/03_reliable_streaming/tools.py b/python/samples/durable/azure_functions/03_reliable_streaming/tools.py similarity index 100% rename from python/samples/getting_started/azure_functions/03_reliable_streaming/tools.py rename to python/samples/durable/azure_functions/03_reliable_streaming/tools.py diff --git a/python/samples/getting_started/azure_functions/04_single_agent_orchestration_chaining/README.md b/python/samples/durable/azure_functions/04_single_agent_orchestration_chaining/README.md similarity index 100% rename from python/samples/getting_started/azure_functions/04_single_agent_orchestration_chaining/README.md rename to python/samples/durable/azure_functions/04_single_agent_orchestration_chaining/README.md diff --git a/python/samples/getting_started/azure_functions/04_single_agent_orchestration_chaining/demo.http b/python/samples/durable/azure_functions/04_single_agent_orchestration_chaining/demo.http similarity index 100% rename from python/samples/getting_started/azure_functions/04_single_agent_orchestration_chaining/demo.http rename to python/samples/durable/azure_functions/04_single_agent_orchestration_chaining/demo.http diff --git a/python/samples/getting_started/azure_functions/04_single_agent_orchestration_chaining/function_app.py b/python/samples/durable/azure_functions/04_single_agent_orchestration_chaining/function_app.py similarity index 100% rename from python/samples/getting_started/azure_functions/04_single_agent_orchestration_chaining/function_app.py rename to python/samples/durable/azure_functions/04_single_agent_orchestration_chaining/function_app.py diff --git a/python/samples/getting_started/azure_functions/04_single_agent_orchestration_chaining/host.json b/python/samples/durable/azure_functions/04_single_agent_orchestration_chaining/host.json similarity index 100% rename from python/samples/getting_started/azure_functions/04_single_agent_orchestration_chaining/host.json rename to python/samples/durable/azure_functions/04_single_agent_orchestration_chaining/host.json diff --git a/python/samples/getting_started/azure_functions/04_single_agent_orchestration_chaining/local.settings.json.template b/python/samples/durable/azure_functions/04_single_agent_orchestration_chaining/local.settings.json.template similarity index 100% rename from python/samples/getting_started/azure_functions/04_single_agent_orchestration_chaining/local.settings.json.template rename to python/samples/durable/azure_functions/04_single_agent_orchestration_chaining/local.settings.json.template diff --git a/python/samples/getting_started/azure_functions/04_single_agent_orchestration_chaining/requirements.txt b/python/samples/durable/azure_functions/04_single_agent_orchestration_chaining/requirements.txt similarity index 100% rename from python/samples/getting_started/azure_functions/04_single_agent_orchestration_chaining/requirements.txt rename to python/samples/durable/azure_functions/04_single_agent_orchestration_chaining/requirements.txt diff --git a/python/samples/getting_started/azure_functions/05_multi_agent_orchestration_concurrency/README.md b/python/samples/durable/azure_functions/05_multi_agent_orchestration_concurrency/README.md similarity index 100% rename from python/samples/getting_started/azure_functions/05_multi_agent_orchestration_concurrency/README.md rename to python/samples/durable/azure_functions/05_multi_agent_orchestration_concurrency/README.md diff --git a/python/samples/getting_started/azure_functions/05_multi_agent_orchestration_concurrency/demo.http b/python/samples/durable/azure_functions/05_multi_agent_orchestration_concurrency/demo.http similarity index 100% rename from python/samples/getting_started/azure_functions/05_multi_agent_orchestration_concurrency/demo.http rename to python/samples/durable/azure_functions/05_multi_agent_orchestration_concurrency/demo.http diff --git a/python/samples/getting_started/azure_functions/05_multi_agent_orchestration_concurrency/function_app.py b/python/samples/durable/azure_functions/05_multi_agent_orchestration_concurrency/function_app.py similarity index 100% rename from python/samples/getting_started/azure_functions/05_multi_agent_orchestration_concurrency/function_app.py rename to python/samples/durable/azure_functions/05_multi_agent_orchestration_concurrency/function_app.py diff --git a/python/samples/getting_started/azure_functions/05_multi_agent_orchestration_concurrency/host.json b/python/samples/durable/azure_functions/05_multi_agent_orchestration_concurrency/host.json similarity index 100% rename from python/samples/getting_started/azure_functions/05_multi_agent_orchestration_concurrency/host.json rename to python/samples/durable/azure_functions/05_multi_agent_orchestration_concurrency/host.json diff --git a/python/samples/getting_started/azure_functions/05_multi_agent_orchestration_concurrency/local.settings.json.template b/python/samples/durable/azure_functions/05_multi_agent_orchestration_concurrency/local.settings.json.template similarity index 100% rename from python/samples/getting_started/azure_functions/05_multi_agent_orchestration_concurrency/local.settings.json.template rename to python/samples/durable/azure_functions/05_multi_agent_orchestration_concurrency/local.settings.json.template diff --git a/python/samples/getting_started/azure_functions/05_multi_agent_orchestration_concurrency/requirements.txt b/python/samples/durable/azure_functions/05_multi_agent_orchestration_concurrency/requirements.txt similarity index 100% rename from python/samples/getting_started/azure_functions/05_multi_agent_orchestration_concurrency/requirements.txt rename to python/samples/durable/azure_functions/05_multi_agent_orchestration_concurrency/requirements.txt diff --git a/python/samples/getting_started/azure_functions/06_multi_agent_orchestration_conditionals/README.md b/python/samples/durable/azure_functions/06_multi_agent_orchestration_conditionals/README.md similarity index 100% rename from python/samples/getting_started/azure_functions/06_multi_agent_orchestration_conditionals/README.md rename to python/samples/durable/azure_functions/06_multi_agent_orchestration_conditionals/README.md diff --git a/python/samples/getting_started/azure_functions/06_multi_agent_orchestration_conditionals/demo.http b/python/samples/durable/azure_functions/06_multi_agent_orchestration_conditionals/demo.http similarity index 100% rename from python/samples/getting_started/azure_functions/06_multi_agent_orchestration_conditionals/demo.http rename to python/samples/durable/azure_functions/06_multi_agent_orchestration_conditionals/demo.http diff --git a/python/samples/getting_started/azure_functions/06_multi_agent_orchestration_conditionals/function_app.py b/python/samples/durable/azure_functions/06_multi_agent_orchestration_conditionals/function_app.py similarity index 100% rename from python/samples/getting_started/azure_functions/06_multi_agent_orchestration_conditionals/function_app.py rename to python/samples/durable/azure_functions/06_multi_agent_orchestration_conditionals/function_app.py diff --git a/python/samples/getting_started/azure_functions/06_multi_agent_orchestration_conditionals/host.json b/python/samples/durable/azure_functions/06_multi_agent_orchestration_conditionals/host.json similarity index 100% rename from python/samples/getting_started/azure_functions/06_multi_agent_orchestration_conditionals/host.json rename to python/samples/durable/azure_functions/06_multi_agent_orchestration_conditionals/host.json diff --git a/python/samples/getting_started/azure_functions/06_multi_agent_orchestration_conditionals/local.settings.json.template b/python/samples/durable/azure_functions/06_multi_agent_orchestration_conditionals/local.settings.json.template similarity index 100% rename from python/samples/getting_started/azure_functions/06_multi_agent_orchestration_conditionals/local.settings.json.template rename to python/samples/durable/azure_functions/06_multi_agent_orchestration_conditionals/local.settings.json.template diff --git a/python/samples/getting_started/azure_functions/06_multi_agent_orchestration_conditionals/requirements.txt b/python/samples/durable/azure_functions/06_multi_agent_orchestration_conditionals/requirements.txt similarity index 100% rename from python/samples/getting_started/azure_functions/06_multi_agent_orchestration_conditionals/requirements.txt rename to python/samples/durable/azure_functions/06_multi_agent_orchestration_conditionals/requirements.txt diff --git a/python/samples/getting_started/azure_functions/07_single_agent_orchestration_hitl/README.md b/python/samples/durable/azure_functions/07_single_agent_orchestration_hitl/README.md similarity index 100% rename from python/samples/getting_started/azure_functions/07_single_agent_orchestration_hitl/README.md rename to python/samples/durable/azure_functions/07_single_agent_orchestration_hitl/README.md diff --git a/python/samples/getting_started/azure_functions/07_single_agent_orchestration_hitl/demo.http b/python/samples/durable/azure_functions/07_single_agent_orchestration_hitl/demo.http similarity index 100% rename from python/samples/getting_started/azure_functions/07_single_agent_orchestration_hitl/demo.http rename to python/samples/durable/azure_functions/07_single_agent_orchestration_hitl/demo.http diff --git a/python/samples/getting_started/azure_functions/07_single_agent_orchestration_hitl/function_app.py b/python/samples/durable/azure_functions/07_single_agent_orchestration_hitl/function_app.py similarity index 100% rename from python/samples/getting_started/azure_functions/07_single_agent_orchestration_hitl/function_app.py rename to python/samples/durable/azure_functions/07_single_agent_orchestration_hitl/function_app.py diff --git a/python/samples/getting_started/azure_functions/07_single_agent_orchestration_hitl/host.json b/python/samples/durable/azure_functions/07_single_agent_orchestration_hitl/host.json similarity index 100% rename from python/samples/getting_started/azure_functions/07_single_agent_orchestration_hitl/host.json rename to python/samples/durable/azure_functions/07_single_agent_orchestration_hitl/host.json diff --git a/python/samples/getting_started/azure_functions/07_single_agent_orchestration_hitl/local.settings.json.template b/python/samples/durable/azure_functions/07_single_agent_orchestration_hitl/local.settings.json.template similarity index 100% rename from python/samples/getting_started/azure_functions/07_single_agent_orchestration_hitl/local.settings.json.template rename to python/samples/durable/azure_functions/07_single_agent_orchestration_hitl/local.settings.json.template diff --git a/python/samples/getting_started/azure_functions/07_single_agent_orchestration_hitl/requirements.txt b/python/samples/durable/azure_functions/07_single_agent_orchestration_hitl/requirements.txt similarity index 100% rename from python/samples/getting_started/azure_functions/07_single_agent_orchestration_hitl/requirements.txt rename to python/samples/durable/azure_functions/07_single_agent_orchestration_hitl/requirements.txt diff --git a/python/samples/getting_started/azure_functions/08_mcp_server/README.md b/python/samples/durable/azure_functions/08_mcp_server/README.md similarity index 98% rename from python/samples/getting_started/azure_functions/08_mcp_server/README.md rename to python/samples/durable/azure_functions/08_mcp_server/README.md index 02fcbbb957..3e6821d306 100644 --- a/python/samples/getting_started/azure_functions/08_mcp_server/README.md +++ b/python/samples/durable/azure_functions/08_mcp_server/README.md @@ -46,7 +46,7 @@ Update your `local.settings.json` with your Azure OpenAI credentials: 1. **Start the Function App**: ```bash - cd python/samples/getting_started/azure_functions/08_mcp_server + cd python/samples/durable/azure_functions/08_mcp_server func start ``` diff --git a/python/samples/getting_started/azure_functions/08_mcp_server/function_app.py b/python/samples/durable/azure_functions/08_mcp_server/function_app.py similarity index 100% rename from python/samples/getting_started/azure_functions/08_mcp_server/function_app.py rename to python/samples/durable/azure_functions/08_mcp_server/function_app.py diff --git a/python/samples/getting_started/azure_functions/08_mcp_server/host.json b/python/samples/durable/azure_functions/08_mcp_server/host.json similarity index 100% rename from python/samples/getting_started/azure_functions/08_mcp_server/host.json rename to python/samples/durable/azure_functions/08_mcp_server/host.json diff --git a/python/samples/getting_started/azure_functions/08_mcp_server/local.settings.json.template b/python/samples/durable/azure_functions/08_mcp_server/local.settings.json.template similarity index 100% rename from python/samples/getting_started/azure_functions/08_mcp_server/local.settings.json.template rename to python/samples/durable/azure_functions/08_mcp_server/local.settings.json.template diff --git a/python/samples/getting_started/azure_functions/08_mcp_server/requirements.txt b/python/samples/durable/azure_functions/08_mcp_server/requirements.txt similarity index 100% rename from python/samples/getting_started/azure_functions/08_mcp_server/requirements.txt rename to python/samples/durable/azure_functions/08_mcp_server/requirements.txt diff --git a/python/samples/getting_started/azure_functions/README.md b/python/samples/durable/azure_functions/README.md similarity index 100% rename from python/samples/getting_started/azure_functions/README.md rename to python/samples/durable/azure_functions/README.md diff --git a/python/samples/getting_started/durabletask/01_single_agent/README.md b/python/samples/durable/console_apps/01_single_agent/README.md similarity index 97% rename from python/samples/getting_started/durabletask/01_single_agent/README.md rename to python/samples/durable/console_apps/01_single_agent/README.md index ffe3b1484a..025f034172 100644 --- a/python/samples/getting_started/durabletask/01_single_agent/README.md +++ b/python/samples/durable/console_apps/01_single_agent/README.md @@ -20,7 +20,7 @@ With the environment setup, you can run the sample using the combined approach o **Option 1: Combined (Recommended for Testing)** ```bash -cd samples/getting_started/durabletask/01_single_agent +cd samples/durable/console_apps/01_single_agent python sample.py ``` diff --git a/python/samples/getting_started/durabletask/01_single_agent/client.py b/python/samples/durable/console_apps/01_single_agent/client.py similarity index 100% rename from python/samples/getting_started/durabletask/01_single_agent/client.py rename to python/samples/durable/console_apps/01_single_agent/client.py diff --git a/python/samples/getting_started/durabletask/01_single_agent/requirements.txt b/python/samples/durable/console_apps/01_single_agent/requirements.txt similarity index 100% rename from python/samples/getting_started/durabletask/01_single_agent/requirements.txt rename to python/samples/durable/console_apps/01_single_agent/requirements.txt diff --git a/python/samples/getting_started/durabletask/01_single_agent/sample.py b/python/samples/durable/console_apps/01_single_agent/sample.py similarity index 100% rename from python/samples/getting_started/durabletask/01_single_agent/sample.py rename to python/samples/durable/console_apps/01_single_agent/sample.py diff --git a/python/samples/getting_started/durabletask/01_single_agent/worker.py b/python/samples/durable/console_apps/01_single_agent/worker.py similarity index 100% rename from python/samples/getting_started/durabletask/01_single_agent/worker.py rename to python/samples/durable/console_apps/01_single_agent/worker.py diff --git a/python/samples/getting_started/durabletask/02_multi_agent/README.md b/python/samples/durable/console_apps/02_multi_agent/README.md similarity index 97% rename from python/samples/getting_started/durabletask/02_multi_agent/README.md rename to python/samples/durable/console_apps/02_multi_agent/README.md index e9b2a36e19..c740f84627 100644 --- a/python/samples/getting_started/durabletask/02_multi_agent/README.md +++ b/python/samples/durable/console_apps/02_multi_agent/README.md @@ -20,7 +20,7 @@ With the environment setup, you can run the sample using the combined approach o **Option 1: Combined (Recommended for Testing)** ```bash -cd samples/getting_started/durabletask/02_multi_agent +cd samples/durable/console_apps/02_multi_agent python sample.py ``` diff --git a/python/samples/getting_started/durabletask/02_multi_agent/client.py b/python/samples/durable/console_apps/02_multi_agent/client.py similarity index 100% rename from python/samples/getting_started/durabletask/02_multi_agent/client.py rename to python/samples/durable/console_apps/02_multi_agent/client.py diff --git a/python/samples/getting_started/durabletask/02_multi_agent/requirements.txt b/python/samples/durable/console_apps/02_multi_agent/requirements.txt similarity index 100% rename from python/samples/getting_started/durabletask/02_multi_agent/requirements.txt rename to python/samples/durable/console_apps/02_multi_agent/requirements.txt diff --git a/python/samples/getting_started/durabletask/02_multi_agent/sample.py b/python/samples/durable/console_apps/02_multi_agent/sample.py similarity index 100% rename from python/samples/getting_started/durabletask/02_multi_agent/sample.py rename to python/samples/durable/console_apps/02_multi_agent/sample.py diff --git a/python/samples/getting_started/durabletask/02_multi_agent/worker.py b/python/samples/durable/console_apps/02_multi_agent/worker.py similarity index 100% rename from python/samples/getting_started/durabletask/02_multi_agent/worker.py rename to python/samples/durable/console_apps/02_multi_agent/worker.py diff --git a/python/samples/getting_started/durabletask/03_single_agent_streaming/README.md b/python/samples/durable/console_apps/03_single_agent_streaming/README.md similarity index 98% rename from python/samples/getting_started/durabletask/03_single_agent_streaming/README.md rename to python/samples/durable/console_apps/03_single_agent_streaming/README.md index 6e9f1428bf..e1c88f456d 100644 --- a/python/samples/getting_started/durabletask/03_single_agent_streaming/README.md +++ b/python/samples/durable/console_apps/03_single_agent_streaming/README.md @@ -37,7 +37,7 @@ With the environment setup, you can run the sample using the combined approach o **Option 1: Combined (Recommended for Testing)** ```bash -cd samples/getting_started/durabletask/03_single_agent_streaming +cd samples/durable/console_apps/03_single_agent_streaming python sample.py ``` diff --git a/python/samples/getting_started/durabletask/03_single_agent_streaming/client.py b/python/samples/durable/console_apps/03_single_agent_streaming/client.py similarity index 100% rename from python/samples/getting_started/durabletask/03_single_agent_streaming/client.py rename to python/samples/durable/console_apps/03_single_agent_streaming/client.py diff --git a/python/samples/getting_started/durabletask/03_single_agent_streaming/redis_stream_response_handler.py b/python/samples/durable/console_apps/03_single_agent_streaming/redis_stream_response_handler.py similarity index 100% rename from python/samples/getting_started/durabletask/03_single_agent_streaming/redis_stream_response_handler.py rename to python/samples/durable/console_apps/03_single_agent_streaming/redis_stream_response_handler.py diff --git a/python/samples/getting_started/durabletask/03_single_agent_streaming/requirements.txt b/python/samples/durable/console_apps/03_single_agent_streaming/requirements.txt similarity index 100% rename from python/samples/getting_started/durabletask/03_single_agent_streaming/requirements.txt rename to python/samples/durable/console_apps/03_single_agent_streaming/requirements.txt diff --git a/python/samples/getting_started/durabletask/03_single_agent_streaming/sample.py b/python/samples/durable/console_apps/03_single_agent_streaming/sample.py similarity index 100% rename from python/samples/getting_started/durabletask/03_single_agent_streaming/sample.py rename to python/samples/durable/console_apps/03_single_agent_streaming/sample.py diff --git a/python/samples/getting_started/durabletask/03_single_agent_streaming/tools.py b/python/samples/durable/console_apps/03_single_agent_streaming/tools.py similarity index 100% rename from python/samples/getting_started/durabletask/03_single_agent_streaming/tools.py rename to python/samples/durable/console_apps/03_single_agent_streaming/tools.py diff --git a/python/samples/getting_started/durabletask/03_single_agent_streaming/worker.py b/python/samples/durable/console_apps/03_single_agent_streaming/worker.py similarity index 100% rename from python/samples/getting_started/durabletask/03_single_agent_streaming/worker.py rename to python/samples/durable/console_apps/03_single_agent_streaming/worker.py diff --git a/python/samples/getting_started/durabletask/04_single_agent_orchestration_chaining/README.md b/python/samples/durable/console_apps/04_single_agent_orchestration_chaining/README.md similarity index 96% rename from python/samples/getting_started/durabletask/04_single_agent_orchestration_chaining/README.md rename to python/samples/durable/console_apps/04_single_agent_orchestration_chaining/README.md index 3a5605b3dd..5a47e5aded 100644 --- a/python/samples/getting_started/durabletask/04_single_agent_orchestration_chaining/README.md +++ b/python/samples/durable/console_apps/04_single_agent_orchestration_chaining/README.md @@ -20,7 +20,7 @@ With the environment setup, you can run the sample using the combined approach o **Option 1: Combined (Recommended for Testing)** ```bash -cd samples/getting_started/durabletask/04_single_agent_orchestration_chaining +cd samples/durable/console_apps/04_single_agent_orchestration_chaining python sample.py ``` diff --git a/python/samples/getting_started/durabletask/04_single_agent_orchestration_chaining/client.py b/python/samples/durable/console_apps/04_single_agent_orchestration_chaining/client.py similarity index 100% rename from python/samples/getting_started/durabletask/04_single_agent_orchestration_chaining/client.py rename to python/samples/durable/console_apps/04_single_agent_orchestration_chaining/client.py diff --git a/python/samples/getting_started/durabletask/04_single_agent_orchestration_chaining/requirements.txt b/python/samples/durable/console_apps/04_single_agent_orchestration_chaining/requirements.txt similarity index 100% rename from python/samples/getting_started/durabletask/04_single_agent_orchestration_chaining/requirements.txt rename to python/samples/durable/console_apps/04_single_agent_orchestration_chaining/requirements.txt diff --git a/python/samples/getting_started/durabletask/04_single_agent_orchestration_chaining/sample.py b/python/samples/durable/console_apps/04_single_agent_orchestration_chaining/sample.py similarity index 100% rename from python/samples/getting_started/durabletask/04_single_agent_orchestration_chaining/sample.py rename to python/samples/durable/console_apps/04_single_agent_orchestration_chaining/sample.py diff --git a/python/samples/getting_started/durabletask/04_single_agent_orchestration_chaining/worker.py b/python/samples/durable/console_apps/04_single_agent_orchestration_chaining/worker.py similarity index 100% rename from python/samples/getting_started/durabletask/04_single_agent_orchestration_chaining/worker.py rename to python/samples/durable/console_apps/04_single_agent_orchestration_chaining/worker.py diff --git a/python/samples/getting_started/durabletask/05_multi_agent_orchestration_concurrency/README.md b/python/samples/durable/console_apps/05_multi_agent_orchestration_concurrency/README.md similarity index 96% rename from python/samples/getting_started/durabletask/05_multi_agent_orchestration_concurrency/README.md rename to python/samples/durable/console_apps/05_multi_agent_orchestration_concurrency/README.md index 0edf244d78..4950e4c55b 100644 --- a/python/samples/getting_started/durabletask/05_multi_agent_orchestration_concurrency/README.md +++ b/python/samples/durable/console_apps/05_multi_agent_orchestration_concurrency/README.md @@ -20,7 +20,7 @@ With the environment setup, you can run the sample using the combined approach o **Option 1: Combined (Recommended for Testing)** ```bash -cd samples/getting_started/durabletask/05_multi_agent_orchestration_concurrency +cd samples/durable/console_apps/05_multi_agent_orchestration_concurrency python sample.py ``` diff --git a/python/samples/getting_started/durabletask/05_multi_agent_orchestration_concurrency/client.py b/python/samples/durable/console_apps/05_multi_agent_orchestration_concurrency/client.py similarity index 100% rename from python/samples/getting_started/durabletask/05_multi_agent_orchestration_concurrency/client.py rename to python/samples/durable/console_apps/05_multi_agent_orchestration_concurrency/client.py diff --git a/python/samples/getting_started/durabletask/05_multi_agent_orchestration_concurrency/requirements.txt b/python/samples/durable/console_apps/05_multi_agent_orchestration_concurrency/requirements.txt similarity index 100% rename from python/samples/getting_started/durabletask/05_multi_agent_orchestration_concurrency/requirements.txt rename to python/samples/durable/console_apps/05_multi_agent_orchestration_concurrency/requirements.txt diff --git a/python/samples/getting_started/durabletask/05_multi_agent_orchestration_concurrency/sample.py b/python/samples/durable/console_apps/05_multi_agent_orchestration_concurrency/sample.py similarity index 100% rename from python/samples/getting_started/durabletask/05_multi_agent_orchestration_concurrency/sample.py rename to python/samples/durable/console_apps/05_multi_agent_orchestration_concurrency/sample.py diff --git a/python/samples/getting_started/durabletask/05_multi_agent_orchestration_concurrency/worker.py b/python/samples/durable/console_apps/05_multi_agent_orchestration_concurrency/worker.py similarity index 100% rename from python/samples/getting_started/durabletask/05_multi_agent_orchestration_concurrency/worker.py rename to python/samples/durable/console_apps/05_multi_agent_orchestration_concurrency/worker.py diff --git a/python/samples/getting_started/durabletask/06_multi_agent_orchestration_conditionals/README.md b/python/samples/durable/console_apps/06_multi_agent_orchestration_conditionals/README.md similarity index 97% rename from python/samples/getting_started/durabletask/06_multi_agent_orchestration_conditionals/README.md rename to python/samples/durable/console_apps/06_multi_agent_orchestration_conditionals/README.md index f6a40c087b..9e023c3a4d 100644 --- a/python/samples/getting_started/durabletask/06_multi_agent_orchestration_conditionals/README.md +++ b/python/samples/durable/console_apps/06_multi_agent_orchestration_conditionals/README.md @@ -21,7 +21,7 @@ With the environment setup, you can run the sample using the combined approach o **Option 1: Combined (Recommended for Testing)** ```bash -cd samples/getting_started/durabletask/06_multi_agent_orchestration_conditionals +cd samples/durable/console_apps/06_multi_agent_orchestration_conditionals python sample.py ``` diff --git a/python/samples/getting_started/durabletask/06_multi_agent_orchestration_conditionals/client.py b/python/samples/durable/console_apps/06_multi_agent_orchestration_conditionals/client.py similarity index 100% rename from python/samples/getting_started/durabletask/06_multi_agent_orchestration_conditionals/client.py rename to python/samples/durable/console_apps/06_multi_agent_orchestration_conditionals/client.py diff --git a/python/samples/getting_started/durabletask/06_multi_agent_orchestration_conditionals/requirements.txt b/python/samples/durable/console_apps/06_multi_agent_orchestration_conditionals/requirements.txt similarity index 100% rename from python/samples/getting_started/durabletask/06_multi_agent_orchestration_conditionals/requirements.txt rename to python/samples/durable/console_apps/06_multi_agent_orchestration_conditionals/requirements.txt diff --git a/python/samples/getting_started/durabletask/06_multi_agent_orchestration_conditionals/sample.py b/python/samples/durable/console_apps/06_multi_agent_orchestration_conditionals/sample.py similarity index 100% rename from python/samples/getting_started/durabletask/06_multi_agent_orchestration_conditionals/sample.py rename to python/samples/durable/console_apps/06_multi_agent_orchestration_conditionals/sample.py diff --git a/python/samples/getting_started/durabletask/06_multi_agent_orchestration_conditionals/worker.py b/python/samples/durable/console_apps/06_multi_agent_orchestration_conditionals/worker.py similarity index 100% rename from python/samples/getting_started/durabletask/06_multi_agent_orchestration_conditionals/worker.py rename to python/samples/durable/console_apps/06_multi_agent_orchestration_conditionals/worker.py diff --git a/python/samples/getting_started/durabletask/07_single_agent_orchestration_hitl/README.md b/python/samples/durable/console_apps/07_single_agent_orchestration_hitl/README.md similarity index 97% rename from python/samples/getting_started/durabletask/07_single_agent_orchestration_hitl/README.md rename to python/samples/durable/console_apps/07_single_agent_orchestration_hitl/README.md index fbfe905d59..c083090c16 100644 --- a/python/samples/getting_started/durabletask/07_single_agent_orchestration_hitl/README.md +++ b/python/samples/durable/console_apps/07_single_agent_orchestration_hitl/README.md @@ -23,7 +23,7 @@ With the environment setup, you can run the sample using the combined approach o **Option 1: Combined (Recommended for Testing)** ```bash -cd samples/getting_started/durabletask/07_single_agent_orchestration_hitl +cd samples/durable/console_apps/07_single_agent_orchestration_hitl python sample.py ``` diff --git a/python/samples/getting_started/durabletask/07_single_agent_orchestration_hitl/client.py b/python/samples/durable/console_apps/07_single_agent_orchestration_hitl/client.py similarity index 100% rename from python/samples/getting_started/durabletask/07_single_agent_orchestration_hitl/client.py rename to python/samples/durable/console_apps/07_single_agent_orchestration_hitl/client.py diff --git a/python/samples/getting_started/durabletask/07_single_agent_orchestration_hitl/requirements.txt b/python/samples/durable/console_apps/07_single_agent_orchestration_hitl/requirements.txt similarity index 100% rename from python/samples/getting_started/durabletask/07_single_agent_orchestration_hitl/requirements.txt rename to python/samples/durable/console_apps/07_single_agent_orchestration_hitl/requirements.txt diff --git a/python/samples/getting_started/durabletask/07_single_agent_orchestration_hitl/sample.py b/python/samples/durable/console_apps/07_single_agent_orchestration_hitl/sample.py similarity index 100% rename from python/samples/getting_started/durabletask/07_single_agent_orchestration_hitl/sample.py rename to python/samples/durable/console_apps/07_single_agent_orchestration_hitl/sample.py diff --git a/python/samples/getting_started/durabletask/07_single_agent_orchestration_hitl/worker.py b/python/samples/durable/console_apps/07_single_agent_orchestration_hitl/worker.py similarity index 100% rename from python/samples/getting_started/durabletask/07_single_agent_orchestration_hitl/worker.py rename to python/samples/durable/console_apps/07_single_agent_orchestration_hitl/worker.py diff --git a/python/samples/getting_started/durabletask/README.md b/python/samples/durable/console_apps/README.md similarity index 99% rename from python/samples/getting_started/durabletask/README.md rename to python/samples/durable/console_apps/README.md index 8700380a14..6bf56c5ffa 100644 --- a/python/samples/getting_started/durabletask/README.md +++ b/python/samples/durable/console_apps/README.md @@ -106,7 +106,7 @@ $env:AZURE_OPENAI_CHAT_DEPLOYMENT_NAME="your-deployment-name" Navigate to the sample directory and install dependencies. For example: ```bash -cd samples/getting_started/durabletask/01_single_agent +cd samples/durable/console_apps/01_single_agent pip install -r requirements.txt ```