diff --git a/python/packages/core/agent_framework/__init__.py b/python/packages/core/agent_framework/__init__.py index 0752dc901c..729effb180 100644 --- a/python/packages/core/agent_framework/__init__.py +++ b/python/packages/core/agent_framework/__init__.py @@ -20,4 +20,4 @@ from ._telemetry import * # noqa: F403 from ._threads import * # noqa: F403 from ._tools import * # noqa: F403 from ._types import * # noqa: F403 -from ._workflow import * # noqa: F403 +from ._workflows import * # noqa: F403 diff --git a/python/packages/core/agent_framework/_workflow/README.md b/python/packages/core/agent_framework/_workflows/README.md similarity index 69% rename from python/packages/core/agent_framework/_workflow/README.md rename to python/packages/core/agent_framework/_workflows/README.md index 90e9eb8991..fb737b90b6 100644 --- a/python/packages/core/agent_framework/_workflow/README.md +++ b/python/packages/core/agent_framework/_workflows/README.md @@ -1,6 +1,6 @@ -# Get Started with Microsoft Agent Framework Workflow +# Get Started with Microsoft Agent Framework Workflows -Workflow capabilities now ship with the core `agent-framework` package. +Workflow capabilities ship with the core `agent-framework` package. ```bash pip install agent-framework diff --git a/python/packages/core/agent_framework/_workflow/__init__.py b/python/packages/core/agent_framework/_workflows/__init__.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/__init__.py rename to python/packages/core/agent_framework/_workflows/__init__.py diff --git a/python/packages/core/agent_framework/_workflow/__init__.pyi b/python/packages/core/agent_framework/_workflows/__init__.pyi similarity index 100% rename from python/packages/core/agent_framework/_workflow/__init__.pyi rename to python/packages/core/agent_framework/_workflows/__init__.pyi diff --git a/python/packages/core/agent_framework/_workflow/_agent.py b/python/packages/core/agent_framework/_workflows/_agent.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_agent.py rename to python/packages/core/agent_framework/_workflows/_agent.py diff --git a/python/packages/core/agent_framework/_workflow/_checkpoint.py b/python/packages/core/agent_framework/_workflows/_checkpoint.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_checkpoint.py rename to python/packages/core/agent_framework/_workflows/_checkpoint.py diff --git a/python/packages/core/agent_framework/_workflow/_concurrent.py b/python/packages/core/agent_framework/_workflows/_concurrent.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_concurrent.py rename to python/packages/core/agent_framework/_workflows/_concurrent.py diff --git a/python/packages/core/agent_framework/_workflow/_const.py b/python/packages/core/agent_framework/_workflows/_const.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_const.py rename to python/packages/core/agent_framework/_workflows/_const.py diff --git a/python/packages/core/agent_framework/_workflow/_edge.py b/python/packages/core/agent_framework/_workflows/_edge.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_edge.py rename to python/packages/core/agent_framework/_workflows/_edge.py diff --git a/python/packages/core/agent_framework/_workflow/_edge_runner.py b/python/packages/core/agent_framework/_workflows/_edge_runner.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_edge_runner.py rename to python/packages/core/agent_framework/_workflows/_edge_runner.py diff --git a/python/packages/core/agent_framework/_workflow/_events.py b/python/packages/core/agent_framework/_workflows/_events.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_events.py rename to python/packages/core/agent_framework/_workflows/_events.py diff --git a/python/packages/core/agent_framework/_workflow/_executor.py b/python/packages/core/agent_framework/_workflows/_executor.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_executor.py rename to python/packages/core/agent_framework/_workflows/_executor.py diff --git a/python/packages/core/agent_framework/_workflow/_function_executor.py b/python/packages/core/agent_framework/_workflows/_function_executor.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_function_executor.py rename to python/packages/core/agent_framework/_workflows/_function_executor.py diff --git a/python/packages/core/agent_framework/_workflow/_magentic.py b/python/packages/core/agent_framework/_workflows/_magentic.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_magentic.py rename to python/packages/core/agent_framework/_workflows/_magentic.py diff --git a/python/packages/core/agent_framework/_workflow/_model_utils.py b/python/packages/core/agent_framework/_workflows/_model_utils.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_model_utils.py rename to python/packages/core/agent_framework/_workflows/_model_utils.py diff --git a/python/packages/core/agent_framework/_workflow/_runner.py b/python/packages/core/agent_framework/_workflows/_runner.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_runner.py rename to python/packages/core/agent_framework/_workflows/_runner.py diff --git a/python/packages/core/agent_framework/_workflow/_runner_context.py b/python/packages/core/agent_framework/_workflows/_runner_context.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_runner_context.py rename to python/packages/core/agent_framework/_workflows/_runner_context.py diff --git a/python/packages/core/agent_framework/_workflow/_sequential.py b/python/packages/core/agent_framework/_workflows/_sequential.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_sequential.py rename to python/packages/core/agent_framework/_workflows/_sequential.py diff --git a/python/packages/core/agent_framework/_workflow/_shared_state.py b/python/packages/core/agent_framework/_workflows/_shared_state.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_shared_state.py rename to python/packages/core/agent_framework/_workflows/_shared_state.py diff --git a/python/packages/core/agent_framework/_workflow/_typing_utils.py b/python/packages/core/agent_framework/_workflows/_typing_utils.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_typing_utils.py rename to python/packages/core/agent_framework/_workflows/_typing_utils.py diff --git a/python/packages/core/agent_framework/_workflow/_validation.py b/python/packages/core/agent_framework/_workflows/_validation.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_validation.py rename to python/packages/core/agent_framework/_workflows/_validation.py diff --git a/python/packages/core/agent_framework/_workflow/_viz.py b/python/packages/core/agent_framework/_workflows/_viz.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_viz.py rename to python/packages/core/agent_framework/_workflows/_viz.py diff --git a/python/packages/core/agent_framework/_workflow/_workflow.py b/python/packages/core/agent_framework/_workflows/_workflow.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_workflow.py rename to python/packages/core/agent_framework/_workflows/_workflow.py diff --git a/python/packages/core/agent_framework/_workflow/_workflow_context.py b/python/packages/core/agent_framework/_workflows/_workflow_context.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_workflow_context.py rename to python/packages/core/agent_framework/_workflows/_workflow_context.py diff --git a/python/packages/core/agent_framework/_workflow/_workflow_executor.py b/python/packages/core/agent_framework/_workflows/_workflow_executor.py similarity index 100% rename from python/packages/core/agent_framework/_workflow/_workflow_executor.py rename to python/packages/core/agent_framework/_workflows/_workflow_executor.py diff --git a/python/packages/core/tests/workflow/test_checkpoint_decode.py b/python/packages/core/tests/workflow/test_checkpoint_decode.py index 04d78f8e18..1947b3fb41 100644 --- a/python/packages/core/tests/workflow/test_checkpoint_decode.py +++ b/python/packages/core/tests/workflow/test_checkpoint_decode.py @@ -1,11 +1,14 @@ # Copyright (c) Microsoft. All rights reserved. -from dataclasses import dataclass +from dataclasses import dataclass # noqa: I001 from typing import Any, cast -from agent_framework._workflow._executor import RequestInfoMessage, RequestResponse -from agent_framework._workflow._runner_context import _decode_checkpoint_value, _encode_checkpoint_value # type: ignore -from agent_framework._workflow._typing_utils import is_instance_of +from agent_framework._workflows._executor import RequestInfoMessage, RequestResponse +from agent_framework._workflows._runner_context import ( # type: ignore + _decode_checkpoint_value, # type: ignore + _encode_checkpoint_value, # type: ignore +) +from agent_framework._workflows._typing_utils import is_instance_of @dataclass(kw_only=True) diff --git a/python/packages/core/tests/workflow/test_checkpoint_validation.py b/python/packages/core/tests/workflow/test_checkpoint_validation.py index f1b52f6ac6..361758f3eb 100644 --- a/python/packages/core/tests/workflow/test_checkpoint_validation.py +++ b/python/packages/core/tests/workflow/test_checkpoint_validation.py @@ -4,8 +4,8 @@ import pytest from typing_extensions import Never from agent_framework import WorkflowBuilder, WorkflowContext, WorkflowRunState, WorkflowStatusEvent, handler -from agent_framework._workflow._checkpoint import InMemoryCheckpointStorage -from agent_framework._workflow._executor import Executor +from agent_framework._workflows._checkpoint import InMemoryCheckpointStorage +from agent_framework._workflows._executor import Executor class StartExecutor(Executor): diff --git a/python/packages/core/tests/workflow/test_concurrent.py b/python/packages/core/tests/workflow/test_concurrent.py index 8b35aa8cb1..3317685e5f 100644 --- a/python/packages/core/tests/workflow/test_concurrent.py +++ b/python/packages/core/tests/workflow/test_concurrent.py @@ -18,7 +18,7 @@ from agent_framework import ( WorkflowStatusEvent, handler, ) -from agent_framework._workflow._checkpoint import InMemoryCheckpointStorage +from agent_framework._workflows._checkpoint import InMemoryCheckpointStorage class _FakeAgentExec(Executor): diff --git a/python/packages/core/tests/workflow/test_edge.py b/python/packages/core/tests/workflow/test_edge.py index 83d116288e..38d7348440 100644 --- a/python/packages/core/tests/workflow/test_edge.py +++ b/python/packages/core/tests/workflow/test_edge.py @@ -14,7 +14,7 @@ from agent_framework import ( WorkflowContext, handler, ) -from agent_framework._workflow._edge import ( +from agent_framework._workflows._edge import ( Edge, FanInEdgeGroup, FanOutEdgeGroup, @@ -23,7 +23,7 @@ from agent_framework._workflow._edge import ( SwitchCaseEdgeGroupCase, SwitchCaseEdgeGroupDefault, ) -from agent_framework._workflow._edge_runner import create_edge_runner +from agent_framework._workflows._edge_runner import create_edge_runner from agent_framework.observability import EdgeGroupDeliveryStatus # Add for test @@ -627,7 +627,7 @@ async def test_source_edge_group_with_selection_func_send_message() -> None: data = MockMessage(data="test") message = Message(data=data, source_id=source.id) - with patch("agent_framework._workflow._edge_runner.EdgeRunner._execute_on_target") as mock_send: + with patch("agent_framework._workflows._edge_runner.EdgeRunner._execute_on_target") as mock_send: success = await edge_runner.send_message(message, shared_state, ctx) assert success is True @@ -680,7 +680,7 @@ async def test_source_edge_group_with_selection_func_send_message_with_target() data = MockMessage(data="test") message = Message(data=data, source_id=source.id, target_id=target1.id) - with patch("agent_framework._workflow._edge_runner.EdgeRunner._execute_on_target") as mock_send: + with patch("agent_framework._workflows._edge_runner.EdgeRunner._execute_on_target") as mock_send: success = await edge_runner.send_message(message, shared_state, ctx) assert success is True @@ -913,7 +913,7 @@ async def test_target_edge_group_send_message_buffer() -> None: data = MockMessage(data="test") - with patch("agent_framework._workflow._edge_runner.EdgeRunner._execute_on_target") as mock_send: + with patch("agent_framework._workflows._edge_runner.EdgeRunner._execute_on_target") as mock_send: success = await edge_runner.send_message( Message(data=data, source_id=source1.id), shared_state, @@ -1262,7 +1262,7 @@ async def test_switch_case_edge_group_send_message() -> None: data = MockMessage(data=-1) message = Message(data=data, source_id=source.id) - with patch("agent_framework._workflow._edge_runner.EdgeRunner._execute_on_target") as mock_send: + with patch("agent_framework._workflows._edge_runner.EdgeRunner._execute_on_target") as mock_send: success = await edge_runner.send_message(message, shared_state, ctx) assert success is True @@ -1271,7 +1271,7 @@ async def test_switch_case_edge_group_send_message() -> None: # Default condition should data = MockMessage(data=1) message = Message(data=data, source_id=source.id) - with patch("agent_framework._workflow._edge_runner.EdgeRunner._execute_on_target") as mock_send: + with patch("agent_framework._workflows._edge_runner.EdgeRunner._execute_on_target") as mock_send: success = await edge_runner.send_message(message, shared_state, ctx) assert success is True diff --git a/python/packages/core/tests/workflow/test_full_conversation.py b/python/packages/core/tests/workflow/test_full_conversation.py index be5fa6e333..446ef0a2b5 100644 --- a/python/packages/core/tests/workflow/test_full_conversation.py +++ b/python/packages/core/tests/workflow/test_full_conversation.py @@ -22,8 +22,8 @@ from agent_framework import ( WorkflowStatusEvent, handler, ) -from agent_framework._workflow._executor import AgentExecutorResponse, Executor -from agent_framework._workflow._workflow_context import WorkflowContext +from agent_framework._workflows._executor import AgentExecutorResponse, Executor +from agent_framework._workflows._workflow_context import WorkflowContext class _SimpleAgent(BaseAgent): diff --git a/python/packages/core/tests/workflow/test_magentic.py b/python/packages/core/tests/workflow/test_magentic.py index 42e042f197..bb6984cc74 100644 --- a/python/packages/core/tests/workflow/test_magentic.py +++ b/python/packages/core/tests/workflow/test_magentic.py @@ -33,8 +33,8 @@ from agent_framework import ( WorkflowStatusEvent, handler, ) -from agent_framework._workflow._checkpoint import InMemoryCheckpointStorage -from agent_framework._workflow._magentic import ( +from agent_framework._workflows._checkpoint import InMemoryCheckpointStorage +from agent_framework._workflows._magentic import ( MagenticAgentExecutor, MagenticContext, MagenticOrchestratorExecutor, @@ -533,7 +533,7 @@ async def _collect_agent_responses_setup(participant_obj: object): captured: list[ChatMessage] = [] async def sink(event) -> None: # type: ignore[no-untyped-def] - from agent_framework._workflow._magentic import MagenticAgentMessageEvent + from agent_framework._workflows._magentic import MagenticAgentMessageEvent if isinstance(event, MagenticAgentMessageEvent) and event.message is not None: captured.append(event.message) diff --git a/python/packages/core/tests/workflow/test_request_info_executor_rehydrate.py b/python/packages/core/tests/workflow/test_request_info_executor_rehydrate.py index 9b1a98b1db..5e5409a745 100644 --- a/python/packages/core/tests/workflow/test_request_info_executor_rehydrate.py +++ b/python/packages/core/tests/workflow/test_request_info_executor_rehydrate.py @@ -7,17 +7,21 @@ from typing import Any import pytest -from agent_framework._workflow._checkpoint import CheckpointStorage, WorkflowCheckpoint -from agent_framework._workflow._events import RequestInfoEvent, WorkflowEvent -from agent_framework._workflow._executor import ( +from agent_framework._workflows._checkpoint import CheckpointStorage, WorkflowCheckpoint +from agent_framework._workflows._events import RequestInfoEvent, WorkflowEvent +from agent_framework._workflows._executor import ( PendingRequestDetails, RequestInfoExecutor, RequestInfoMessage, RequestResponse, ) -from agent_framework._workflow._runner_context import CheckpointState, Message, _encode_checkpoint_value # type: ignore -from agent_framework._workflow._shared_state import SharedState -from agent_framework._workflow._workflow_context import WorkflowContext +from agent_framework._workflows._runner_context import ( # type: ignore + CheckpointState, + Message, + _encode_checkpoint_value, +) +from agent_framework._workflows._shared_state import SharedState +from agent_framework._workflows._workflow_context import WorkflowContext PENDING_STATE_KEY = RequestInfoExecutor._PENDING_SHARED_STATE_KEY # pyright: ignore[reportPrivateUsage] diff --git a/python/packages/core/tests/workflow/test_runner.py b/python/packages/core/tests/workflow/test_runner.py index cc2486ef71..73fe20d834 100644 --- a/python/packages/core/tests/workflow/test_runner.py +++ b/python/packages/core/tests/workflow/test_runner.py @@ -16,10 +16,10 @@ from agent_framework import ( WorkflowStatusEvent, handler, ) -from agent_framework._workflow._edge import SingleEdgeGroup -from agent_framework._workflow._runner import Runner -from agent_framework._workflow._runner_context import InProcRunnerContext, Message, RunnerContext -from agent_framework._workflow._shared_state import SharedState +from agent_framework._workflows._edge import SingleEdgeGroup +from agent_framework._workflows._runner import Runner +from agent_framework._workflows._runner_context import InProcRunnerContext, Message, RunnerContext +from agent_framework._workflows._shared_state import SharedState @dataclass diff --git a/python/packages/core/tests/workflow/test_sequential.py b/python/packages/core/tests/workflow/test_sequential.py index 0ce022e21a..d734e5d606 100644 --- a/python/packages/core/tests/workflow/test_sequential.py +++ b/python/packages/core/tests/workflow/test_sequential.py @@ -21,7 +21,7 @@ from agent_framework import ( WorkflowStatusEvent, handler, ) -from agent_framework._workflow._checkpoint import InMemoryCheckpointStorage +from agent_framework._workflows._checkpoint import InMemoryCheckpointStorage class _EchoAgent(BaseAgent): diff --git a/python/packages/core/tests/workflow/test_serialization.py b/python/packages/core/tests/workflow/test_serialization.py index 57fbb3b453..1360d5e72c 100644 --- a/python/packages/core/tests/workflow/test_serialization.py +++ b/python/packages/core/tests/workflow/test_serialization.py @@ -6,7 +6,7 @@ from typing import Any import pytest from agent_framework import Executor, WorkflowBuilder, WorkflowContext, handler -from agent_framework._workflow._edge import ( +from agent_framework._workflows._edge import ( Case, Default, Edge, @@ -17,7 +17,7 @@ from agent_framework._workflow._edge import ( SwitchCaseEdgeGroupCase, SwitchCaseEdgeGroupDefault, ) -from agent_framework._workflow._workflow_executor import ( +from agent_framework._workflows._workflow_executor import ( WorkflowExecutor, ) diff --git a/python/packages/core/tests/workflow/test_typing_utils.py b/python/packages/core/tests/workflow/test_typing_utils.py index db2d4da4a7..3f88726601 100644 --- a/python/packages/core/tests/workflow/test_typing_utils.py +++ b/python/packages/core/tests/workflow/test_typing_utils.py @@ -3,8 +3,8 @@ from dataclasses import dataclass from typing import Any, Generic, TypeVar, Union -from agent_framework._workflow import RequestInfoMessage, RequestResponse -from agent_framework._workflow._typing_utils import is_instance_of +from agent_framework._workflows import RequestInfoMessage, RequestResponse +from agent_framework._workflows._typing_utils import is_instance_of def test_basic_types() -> None: diff --git a/python/packages/core/tests/workflow/test_validation.py b/python/packages/core/tests/workflow/test_validation.py index df19ad283f..7c1a687bd4 100644 --- a/python/packages/core/tests/workflow/test_validation.py +++ b/python/packages/core/tests/workflow/test_validation.py @@ -18,7 +18,7 @@ from agent_framework import ( handler, validate_workflow_graph, ) -from agent_framework._workflow._edge import SingleEdgeGroup +from agent_framework._workflows._edge import SingleEdgeGroup class StringExecutor(Executor): diff --git a/python/packages/core/tests/workflow/test_workflow_context.py b/python/packages/core/tests/workflow/test_workflow_context.py index 504230e293..6abdb33406 100644 --- a/python/packages/core/tests/workflow/test_workflow_context.py +++ b/python/packages/core/tests/workflow/test_workflow_context.py @@ -21,15 +21,15 @@ from agent_framework import ( if TYPE_CHECKING: from _pytest.logging import LogCaptureFixture - from agent_framework._workflow._runner_context import InProcRunnerContext + from agent_framework._workflows._runner_context import InProcRunnerContext @asynccontextmanager async def make_context( executor_id: str = "exec", ) -> AsyncIterator[tuple[WorkflowContext[object], "InProcRunnerContext"]]: - from agent_framework._workflow._runner_context import InProcRunnerContext - from agent_framework._workflow._shared_state import SharedState + from agent_framework._workflows._runner_context import InProcRunnerContext + from agent_framework._workflows._shared_state import SharedState runner_ctx = InProcRunnerContext() shared_state = SharedState() diff --git a/python/packages/core/tests/workflow/test_workflow_observability.py b/python/packages/core/tests/workflow/test_workflow_observability.py index fa7f396fa3..e3073c544b 100644 --- a/python/packages/core/tests/workflow/test_workflow_observability.py +++ b/python/packages/core/tests/workflow/test_workflow_observability.py @@ -7,11 +7,11 @@ from opentelemetry import trace from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter from agent_framework import WorkflowBuilder -from agent_framework._workflow._executor import Executor, handler -from agent_framework._workflow._runner_context import InProcRunnerContext, Message -from agent_framework._workflow._shared_state import SharedState -from agent_framework._workflow._workflow import Workflow -from agent_framework._workflow._workflow_context import WorkflowContext +from agent_framework._workflows._executor import Executor, handler +from agent_framework._workflows._runner_context import InProcRunnerContext, Message +from agent_framework._workflows._shared_state import SharedState +from agent_framework._workflows._workflow import Workflow +from agent_framework._workflows._workflow_context import WorkflowContext from agent_framework.observability import ( OtelAttr, create_processing_span, diff --git a/python/packages/lab/tau2/agent_framework_lab_tau2/runner.py b/python/packages/lab/tau2/agent_framework_lab_tau2/runner.py index 2226c232f3..ae01082ca3 100644 --- a/python/packages/lab/tau2/agent_framework_lab_tau2/runner.py +++ b/python/packages/lab/tau2/agent_framework_lab_tau2/runner.py @@ -5,7 +5,7 @@ from typing import cast from agent_framework._agents import ChatAgent from agent_framework._types import AgentRunResponse, ChatMessage, Role -from agent_framework._workflow import ( +from agent_framework._workflows import ( AgentExecutor, AgentExecutorRequest, AgentExecutorResponse, diff --git a/python/samples/README.md b/python/samples/README.md index 887fadd5a8..78ede4763a 100644 --- a/python/samples/README.md +++ b/python/samples/README.md @@ -7,7 +7,7 @@ This directory contains samples demonstrating the capabilities of Microsoft Agen For step-by-step tutorials and examples, see the [getting_started](./getting_started/) directory: - **[Agents](./getting_started/agents/)** - Learn how to create and use agents with various providers (Azure OpenAI, OpenAI, Azure AI, etc.) -- **[Workflow](./getting_started/workflow/)** - Explore workflow patterns for orchestrating multiple agents +- **[Workflows](./getting_started/workflows/)** - Explore workflow patterns for orchestrating multiple agents - **[Chat Client](./getting_started/chat_client/)** - Examples of using chat clients directly - **[Threads](./getting_started/threads/)** - Manage conversation threads and chat message stores - **[Context Providers](./getting_started/context_providers/)** - Integrate with context providers like Mem0 and Redis diff --git a/python/samples/getting_started/workflow/README.md b/python/samples/getting_started/workflows/README.md similarity index 97% rename from python/samples/getting_started/workflow/README.md rename to python/samples/getting_started/workflows/README.md index 88e18b9742..3df70f847d 100644 --- a/python/samples/getting_started/workflow/README.md +++ b/python/samples/getting_started/workflows/README.md @@ -1,8 +1,8 @@ -# Workflow Getting Started Samples +# Workflows Getting Started Samples ## Installation -Workflow support ships with the core `agent-framework` package, so no extra installation step is required. +Microsoft Agent Framework Workflows support ships with the core `agent-framework` or `agent-framework-core` package, so no extra installation step is required. To install with visualization support: diff --git a/python/samples/getting_started/workflow/_start-here/step1_executors_and_edges.py b/python/samples/getting_started/workflows/_start-here/step1_executors_and_edges.py similarity index 100% rename from python/samples/getting_started/workflow/_start-here/step1_executors_and_edges.py rename to python/samples/getting_started/workflows/_start-here/step1_executors_and_edges.py diff --git a/python/samples/getting_started/workflow/_start-here/step2_agents_in_a_workflow.py b/python/samples/getting_started/workflows/_start-here/step2_agents_in_a_workflow.py similarity index 100% rename from python/samples/getting_started/workflow/_start-here/step2_agents_in_a_workflow.py rename to python/samples/getting_started/workflows/_start-here/step2_agents_in_a_workflow.py diff --git a/python/samples/getting_started/workflow/_start-here/step3_streaming.py b/python/samples/getting_started/workflows/_start-here/step3_streaming.py similarity index 96% rename from python/samples/getting_started/workflow/_start-here/step3_streaming.py rename to python/samples/getting_started/workflows/_start-here/step3_streaming.py index ee9b72ecc5..7348528718 100644 --- a/python/samples/getting_started/workflow/_start-here/step3_streaming.py +++ b/python/samples/getting_started/workflows/_start-here/step3_streaming.py @@ -14,7 +14,7 @@ from agent_framework import ( WorkflowStatusEvent, handler, ) -from agent_framework._workflow._events import WorkflowOutputEvent +from agent_framework._workflows._events import WorkflowOutputEvent from agent_framework.azure import AzureOpenAIChatClient from azure.identity import AzureCliCredential from typing_extensions import Never @@ -52,13 +52,13 @@ class Writer(Executor): def __init__(self, chat_client: AzureOpenAIChatClient, id: str = "writer"): # Create a domain specific agent using your configured AzureOpenAIChatClient. - agent = chat_client.create_agent( + self.agent = chat_client.create_agent( instructions=( "You are an excellent content writer. You create new content and edit contents based on the feedback." ), ) # Associate this agent with the executor node. The base Executor stores it on self.agent. - super().__init__(agent=agent, id=id) + super().__init__(id=id) @handler async def handle(self, message: ChatMessage, ctx: WorkflowContext[list[ChatMessage]]) -> None: @@ -89,12 +89,12 @@ class Reviewer(Executor): def __init__(self, chat_client: AzureOpenAIChatClient, id: str = "reviewer"): # Create a domain specific agent that evaluates and refines content. - agent = chat_client.create_agent( + self.agent = chat_client.create_agent( instructions=( "You are an excellent content reviewer. You review the content and provide feedback to the writer." ), ) - super().__init__(agent=agent, id=id) + super().__init__(id=id) @handler async def handle(self, messages: list[ChatMessage], ctx: WorkflowContext[Never, str]) -> None: diff --git a/python/samples/getting_started/workflow/agents/azure_ai_agents_streaming.py b/python/samples/getting_started/workflows/agents/azure_ai_agents_streaming.py similarity index 100% rename from python/samples/getting_started/workflow/agents/azure_ai_agents_streaming.py rename to python/samples/getting_started/workflows/agents/azure_ai_agents_streaming.py diff --git a/python/samples/getting_started/workflow/agents/azure_chat_agents_streaming.py b/python/samples/getting_started/workflows/agents/azure_chat_agents_streaming.py similarity index 100% rename from python/samples/getting_started/workflow/agents/azure_chat_agents_streaming.py rename to python/samples/getting_started/workflows/agents/azure_chat_agents_streaming.py diff --git a/python/samples/getting_started/workflow/agents/custom_agent_executors.py b/python/samples/getting_started/workflows/agents/custom_agent_executors.py similarity index 96% rename from python/samples/getting_started/workflow/agents/custom_agent_executors.py rename to python/samples/getting_started/workflows/agents/custom_agent_executors.py index 8de1c5d4a3..91d2ceb2a8 100644 --- a/python/samples/getting_started/workflow/agents/custom_agent_executors.py +++ b/python/samples/getting_started/workflows/agents/custom_agent_executors.py @@ -43,13 +43,13 @@ class Writer(Executor): def __init__(self, chat_client: AzureOpenAIChatClient, id: str = "writer"): # Create a domain specific agent using your configured AzureOpenAIChatClient. - agent = chat_client.create_agent( + self.agent = chat_client.create_agent( instructions=( "You are an excellent content writer. You create new content and edit contents based on the feedback." ), ) # Associate the agent with this executor node. The base Executor stores it on self.agent. - super().__init__(agent=agent, id=id) + super().__init__(id=id) @handler async def handle(self, message: ChatMessage, ctx: WorkflowContext[list[ChatMessage], str]) -> None: @@ -85,12 +85,12 @@ class Reviewer(Executor): def __init__(self, chat_client: AzureOpenAIChatClient, id: str = "reviewer"): # Create a domain specific agent that evaluates and refines content. - agent = chat_client.create_agent( + self.agent = chat_client.create_agent( instructions=( "You are an excellent content reviewer. You review the content and provide feedback to the writer." ), ) - super().__init__(agent=agent, id=id) + super().__init__(id=id) @handler async def handle(self, messages: list[ChatMessage], ctx: WorkflowContext[list[ChatMessage], str]) -> None: diff --git a/python/samples/getting_started/workflow/agents/workflow_as_agent_human_in_the_loop.py b/python/samples/getting_started/workflows/agents/workflow_as_agent_human_in_the_loop.py similarity index 98% rename from python/samples/getting_started/workflow/agents/workflow_as_agent_human_in_the_loop.py rename to python/samples/getting_started/workflows/agents/workflow_as_agent_human_in_the_loop.py index 30370d24ff..8f73c213a6 100644 --- a/python/samples/getting_started/workflow/agents/workflow_as_agent_human_in_the_loop.py +++ b/python/samples/getting_started/workflows/agents/workflow_as_agent_human_in_the_loop.py @@ -27,7 +27,7 @@ from agent_framework import ( # noqa: E402 handler, ) from agent_framework.openai import OpenAIChatClient # noqa: E402 -from getting_started.workflow.agents.workflow_as_agent_reflection_pattern import ( # noqa: E402 +from getting_started.workflows.agents.workflow_as_agent_reflection_pattern import ( # noqa: E402 ReviewRequest, ReviewResponse, Worker, diff --git a/python/samples/getting_started/workflow/agents/workflow_as_agent_reflection_pattern.py b/python/samples/getting_started/workflows/agents/workflow_as_agent_reflection_pattern.py similarity index 100% rename from python/samples/getting_started/workflow/agents/workflow_as_agent_reflection_pattern.py rename to python/samples/getting_started/workflows/agents/workflow_as_agent_reflection_pattern.py diff --git a/python/samples/getting_started/workflow/checkpoint/checkpoint_with_human_in_the_loop.py b/python/samples/getting_started/workflows/checkpoint/checkpoint_with_human_in_the_loop.py similarity index 99% rename from python/samples/getting_started/workflow/checkpoint/checkpoint_with_human_in_the_loop.py rename to python/samples/getting_started/workflows/checkpoint/checkpoint_with_human_in_the_loop.py index 5a48029a0e..e397e83088 100644 --- a/python/samples/getting_started/workflow/checkpoint/checkpoint_with_human_in_the_loop.py +++ b/python/samples/getting_started/workflows/checkpoint/checkpoint_with_human_in_the_loop.py @@ -35,7 +35,7 @@ from azure.identity import AzureCliCredential if TYPE_CHECKING: from agent_framework import Workflow - from agent_framework._workflow._checkpoint import WorkflowCheckpoint + from agent_framework._workflows._checkpoint import WorkflowCheckpoint """ Sample: Checkpoint + human-in-the-loop quickstart. diff --git a/python/samples/getting_started/workflow/checkpoint/checkpoint_with_resume.py b/python/samples/getting_started/workflows/checkpoint/checkpoint_with_resume.py similarity index 98% rename from python/samples/getting_started/workflow/checkpoint/checkpoint_with_resume.py rename to python/samples/getting_started/workflows/checkpoint/checkpoint_with_resume.py index 7e8c07bcd0..a3dacc4a35 100644 --- a/python/samples/getting_started/workflow/checkpoint/checkpoint_with_resume.py +++ b/python/samples/getting_started/workflows/checkpoint/checkpoint_with_resume.py @@ -23,7 +23,7 @@ from azure.identity import AzureCliCredential if TYPE_CHECKING: from agent_framework import Workflow - from agent_framework._workflow._checkpoint import WorkflowCheckpoint + from agent_framework._workflows._checkpoint import WorkflowCheckpoint """ Sample: Checkpointing and Resuming a Workflow (with an Agent stage) @@ -212,7 +212,7 @@ def _render_checkpoint_summary(checkpoints: list["WorkflowCheckpoint"]) -> None: async def main(): # Clear existing checkpoints in this sample directory for a clean run. checkpoint_dir = Path(TEMP_DIR) - for file in checkpoint_dir.glob("*.json"): + for file in checkpoint_dir.glob("*.json"): # noqa: ASYNC240 file.unlink() # Backing store for checkpoints written by with_checkpointing. diff --git a/python/samples/getting_started/workflow/checkpoint/sub_workflow_checkpoint.py b/python/samples/getting_started/workflows/checkpoint/sub_workflow_checkpoint.py similarity index 100% rename from python/samples/getting_started/workflow/checkpoint/sub_workflow_checkpoint.py rename to python/samples/getting_started/workflows/checkpoint/sub_workflow_checkpoint.py diff --git a/python/samples/getting_started/workflow/composition/sub_workflow_basics.py b/python/samples/getting_started/workflows/composition/sub_workflow_basics.py similarity index 100% rename from python/samples/getting_started/workflow/composition/sub_workflow_basics.py rename to python/samples/getting_started/workflows/composition/sub_workflow_basics.py diff --git a/python/samples/getting_started/workflow/composition/sub_workflow_parallel_requests.py b/python/samples/getting_started/workflows/composition/sub_workflow_parallel_requests.py similarity index 100% rename from python/samples/getting_started/workflow/composition/sub_workflow_parallel_requests.py rename to python/samples/getting_started/workflows/composition/sub_workflow_parallel_requests.py diff --git a/python/samples/getting_started/workflow/composition/sub_workflow_request_interception.py b/python/samples/getting_started/workflows/composition/sub_workflow_request_interception.py similarity index 100% rename from python/samples/getting_started/workflow/composition/sub_workflow_request_interception.py rename to python/samples/getting_started/workflows/composition/sub_workflow_request_interception.py diff --git a/python/samples/getting_started/workflow/control-flow/edge_condition.py b/python/samples/getting_started/workflows/control-flow/edge_condition.py similarity index 99% rename from python/samples/getting_started/workflow/control-flow/edge_condition.py rename to python/samples/getting_started/workflows/control-flow/edge_condition.py index 5ef0956733..6fedc0a86c 100644 --- a/python/samples/getting_started/workflow/control-flow/edge_condition.py +++ b/python/samples/getting_started/workflows/control-flow/edge_condition.py @@ -4,8 +4,6 @@ import asyncio import os from typing import Any -from typing_extensions import Never - from agent_framework import ( # Core chat primitives used to build requests AgentExecutor, # Wraps an LLM agent that can be invoked inside a workflow AgentExecutorRequest, # Input message bundle for an AgentExecutor @@ -19,6 +17,7 @@ from agent_framework import ( # Core chat primitives used to build requests from agent_framework.azure import AzureOpenAIChatClient # Thin client wrapper for Azure OpenAI chat models from azure.identity import AzureCliCredential # Uses your az CLI login for credentials from pydantic import BaseModel # Structured outputs for safer parsing +from typing_extensions import Never """ Sample: Conditional routing with structured outputs diff --git a/python/samples/getting_started/workflow/control-flow/multi_selection_edge_group.py b/python/samples/getting_started/workflows/control-flow/multi_selection_edge_group.py similarity index 99% rename from python/samples/getting_started/workflow/control-flow/multi_selection_edge_group.py rename to python/samples/getting_started/workflows/control-flow/multi_selection_edge_group.py index 3d55ad2a0f..9be33befc3 100644 --- a/python/samples/getting_started/workflow/control-flow/multi_selection_edge_group.py +++ b/python/samples/getting_started/workflows/control-flow/multi_selection_edge_group.py @@ -8,8 +8,6 @@ from dataclasses import dataclass from typing import Literal from uuid import uuid4 -from typing_extensions import Never - from agent_framework import ( AgentExecutor, AgentExecutorRequest, @@ -25,6 +23,7 @@ from agent_framework import ( from agent_framework.azure import AzureOpenAIChatClient from azure.identity import AzureCliCredential from pydantic import BaseModel +from typing_extensions import Never """ Sample: Multi-Selection Edge Group for email triage and response. diff --git a/python/samples/getting_started/workflow/control-flow/sequential_executors.py b/python/samples/getting_started/workflows/control-flow/sequential_executors.py similarity index 99% rename from python/samples/getting_started/workflow/control-flow/sequential_executors.py rename to python/samples/getting_started/workflows/control-flow/sequential_executors.py index c9973c5296..81d911e4fb 100644 --- a/python/samples/getting_started/workflow/control-flow/sequential_executors.py +++ b/python/samples/getting_started/workflows/control-flow/sequential_executors.py @@ -3,8 +3,6 @@ import asyncio from typing import cast -from typing_extensions import Never - from agent_framework import ( Executor, WorkflowBuilder, @@ -12,6 +10,7 @@ from agent_framework import ( WorkflowOutputEvent, handler, ) +from typing_extensions import Never """ Sample: Sequential workflow with streaming. diff --git a/python/samples/getting_started/workflow/control-flow/sequential_streaming.py b/python/samples/getting_started/workflows/control-flow/sequential_streaming.py similarity index 99% rename from python/samples/getting_started/workflow/control-flow/sequential_streaming.py rename to python/samples/getting_started/workflows/control-flow/sequential_streaming.py index 1c3b52a7ea..91515d82f0 100644 --- a/python/samples/getting_started/workflow/control-flow/sequential_streaming.py +++ b/python/samples/getting_started/workflows/control-flow/sequential_streaming.py @@ -2,9 +2,8 @@ import asyncio -from typing_extensions import Never - from agent_framework import WorkflowBuilder, WorkflowContext, WorkflowOutputEvent, executor +from typing_extensions import Never """ Sample: Foundational sequential workflow with streaming using function-style executors. diff --git a/python/samples/getting_started/workflow/control-flow/simple_loop.py b/python/samples/getting_started/workflows/control-flow/simple_loop.py similarity index 100% rename from python/samples/getting_started/workflow/control-flow/simple_loop.py rename to python/samples/getting_started/workflows/control-flow/simple_loop.py diff --git a/python/samples/getting_started/workflow/control-flow/switch_case_edge_group.py b/python/samples/getting_started/workflows/control-flow/switch_case_edge_group.py similarity index 99% rename from python/samples/getting_started/workflow/control-flow/switch_case_edge_group.py rename to python/samples/getting_started/workflows/control-flow/switch_case_edge_group.py index 385e595b86..97e038c8ee 100644 --- a/python/samples/getting_started/workflow/control-flow/switch_case_edge_group.py +++ b/python/samples/getting_started/workflows/control-flow/switch_case_edge_group.py @@ -6,8 +6,6 @@ from dataclasses import dataclass from typing import Any, Literal from uuid import uuid4 -from typing_extensions import Never - from agent_framework import ( # Core chat primitives used to form LLM requests AgentExecutor, # Wraps an agent so it can run inside a workflow AgentExecutorRequest, # Message bundle sent to an AgentExecutor @@ -23,6 +21,7 @@ from agent_framework import ( # Core chat primitives used to form LLM requests from agent_framework.azure import AzureOpenAIChatClient # Thin client for Azure OpenAI chat models from azure.identity import AzureCliCredential # Uses your az CLI login for credentials from pydantic import BaseModel # Structured outputs with validation +from typing_extensions import Never """ Sample: Switch-Case Edge Group with an explicit Uncertain branch. diff --git a/python/samples/getting_started/workflow/human-in-the-loop/guessing_game_with_human_input.py b/python/samples/getting_started/workflows/human-in-the-loop/guessing_game_with_human_input.py similarity index 100% rename from python/samples/getting_started/workflow/human-in-the-loop/guessing_game_with_human_input.py rename to python/samples/getting_started/workflows/human-in-the-loop/guessing_game_with_human_input.py diff --git a/python/samples/getting_started/workflow/observability/tracing_basics.py b/python/samples/getting_started/workflows/observability/tracing_basics.py similarity index 100% rename from python/samples/getting_started/workflow/observability/tracing_basics.py rename to python/samples/getting_started/workflows/observability/tracing_basics.py diff --git a/python/samples/getting_started/workflow/orchestration/concurrent_agents.py b/python/samples/getting_started/workflows/orchestration/concurrent_agents.py similarity index 100% rename from python/samples/getting_started/workflow/orchestration/concurrent_agents.py rename to python/samples/getting_started/workflows/orchestration/concurrent_agents.py diff --git a/python/samples/getting_started/workflow/orchestration/concurrent_custom_agent_executors.py b/python/samples/getting_started/workflows/orchestration/concurrent_custom_agent_executors.py similarity index 96% rename from python/samples/getting_started/workflow/orchestration/concurrent_custom_agent_executors.py rename to python/samples/getting_started/workflows/orchestration/concurrent_custom_agent_executors.py index 7a33d55ed4..f7e82b1c07 100644 --- a/python/samples/getting_started/workflow/orchestration/concurrent_custom_agent_executors.py +++ b/python/samples/getting_started/workflows/orchestration/concurrent_custom_agent_executors.py @@ -40,14 +40,14 @@ class ResearcherExec(Executor): agent: ChatAgent def __init__(self, chat_client: AzureOpenAIChatClient, id: str = "researcher"): - agent = chat_client.create_agent( + self.agent = chat_client.create_agent( instructions=( "You're an expert market and product researcher. Given a prompt, provide concise, factual insights," " opportunities, and risks." ), name=id, ) - super().__init__(agent=agent, id=id) + super().__init__(id=id) @handler async def run(self, request: AgentExecutorRequest, ctx: WorkflowContext[AgentExecutorResponse]) -> None: @@ -60,14 +60,14 @@ class MarketerExec(Executor): agent: ChatAgent def __init__(self, chat_client: AzureOpenAIChatClient, id: str = "marketer"): - agent = chat_client.create_agent( + self.agent = chat_client.create_agent( instructions=( "You're a creative marketing strategist. Craft compelling value propositions and target messaging" " aligned to the prompt." ), name=id, ) - super().__init__(agent=agent, id=id) + super().__init__(id=id) @handler async def run(self, request: AgentExecutorRequest, ctx: WorkflowContext[AgentExecutorResponse]) -> None: @@ -80,14 +80,14 @@ class LegalExec(Executor): agent: ChatAgent def __init__(self, chat_client: AzureOpenAIChatClient, id: str = "legal"): - agent = chat_client.create_agent( + self.agent = chat_client.create_agent( instructions=( "You're a cautious legal/compliance reviewer. Highlight constraints, disclaimers, and policy concerns" " based on the prompt." ), name=id, ) - super().__init__(agent=agent, id=id) + super().__init__(id=id) @handler async def run(self, request: AgentExecutorRequest, ctx: WorkflowContext[AgentExecutorResponse]) -> None: diff --git a/python/samples/getting_started/workflow/orchestration/concurrent_custom_aggregator.py b/python/samples/getting_started/workflows/orchestration/concurrent_custom_aggregator.py similarity index 100% rename from python/samples/getting_started/workflow/orchestration/concurrent_custom_aggregator.py rename to python/samples/getting_started/workflows/orchestration/concurrent_custom_aggregator.py diff --git a/python/samples/getting_started/workflow/orchestration/magentic.py b/python/samples/getting_started/workflows/orchestration/magentic.py similarity index 100% rename from python/samples/getting_started/workflow/orchestration/magentic.py rename to python/samples/getting_started/workflows/orchestration/magentic.py diff --git a/python/samples/getting_started/workflow/orchestration/magentic_checkpoint.py b/python/samples/getting_started/workflows/orchestration/magentic_checkpoint.py similarity index 100% rename from python/samples/getting_started/workflow/orchestration/magentic_checkpoint.py rename to python/samples/getting_started/workflows/orchestration/magentic_checkpoint.py diff --git a/python/samples/getting_started/workflow/orchestration/magentic_human_plan_update.py b/python/samples/getting_started/workflows/orchestration/magentic_human_plan_update.py similarity index 100% rename from python/samples/getting_started/workflow/orchestration/magentic_human_plan_update.py rename to python/samples/getting_started/workflows/orchestration/magentic_human_plan_update.py diff --git a/python/samples/getting_started/workflow/orchestration/sequential_agents.py b/python/samples/getting_started/workflows/orchestration/sequential_agents.py similarity index 100% rename from python/samples/getting_started/workflow/orchestration/sequential_agents.py rename to python/samples/getting_started/workflows/orchestration/sequential_agents.py diff --git a/python/samples/getting_started/workflow/orchestration/sequential_custom_executors.py b/python/samples/getting_started/workflows/orchestration/sequential_custom_executors.py similarity index 99% rename from python/samples/getting_started/workflow/orchestration/sequential_custom_executors.py rename to python/samples/getting_started/workflows/orchestration/sequential_custom_executors.py index 071a668d6d..ec203ffb4c 100644 --- a/python/samples/getting_started/workflow/orchestration/sequential_custom_executors.py +++ b/python/samples/getting_started/workflows/orchestration/sequential_custom_executors.py @@ -3,8 +3,6 @@ import asyncio from typing import Any -from typing_extensions import Never - from agent_framework import ( ChatMessage, Executor, @@ -15,6 +13,7 @@ from agent_framework import ( ) from agent_framework.azure import AzureOpenAIChatClient from azure.identity import AzureCliCredential +from typing_extensions import Never """ Sample: Sequential workflow mixing agents and a custom summarizer executor diff --git a/python/samples/getting_started/workflow/parallelism/aggregate_results_of_different_types.py b/python/samples/getting_started/workflows/parallelism/aggregate_results_of_different_types.py similarity index 100% rename from python/samples/getting_started/workflow/parallelism/aggregate_results_of_different_types.py rename to python/samples/getting_started/workflows/parallelism/aggregate_results_of_different_types.py diff --git a/python/samples/getting_started/workflow/parallelism/fan_out_fan_in_edges.py b/python/samples/getting_started/workflows/parallelism/fan_out_fan_in_edges.py similarity index 99% rename from python/samples/getting_started/workflow/parallelism/fan_out_fan_in_edges.py rename to python/samples/getting_started/workflows/parallelism/fan_out_fan_in_edges.py index 6340836ab4..20a3932275 100644 --- a/python/samples/getting_started/workflow/parallelism/fan_out_fan_in_edges.py +++ b/python/samples/getting_started/workflows/parallelism/fan_out_fan_in_edges.py @@ -3,8 +3,6 @@ import asyncio from dataclasses import dataclass -from typing_extensions import Never - from agent_framework import ( # Core chat primitives to build LLM requests AgentExecutor, # Wraps an LLM agent for use inside a workflow AgentExecutorRequest, # The message bundle sent to an AgentExecutor @@ -20,6 +18,7 @@ from agent_framework import ( # Core chat primitives to build LLM requests ) from agent_framework.azure import AzureOpenAIChatClient # Client wrapper for Azure OpenAI chat models from azure.identity import AzureCliCredential # Uses your az CLI login for credentials +from typing_extensions import Never """ Sample: Concurrent fan out and fan in with three domain agents diff --git a/python/samples/getting_started/workflow/parallelism/map_reduce_and_visualization.py b/python/samples/getting_started/workflows/parallelism/map_reduce_and_visualization.py similarity index 99% rename from python/samples/getting_started/workflow/parallelism/map_reduce_and_visualization.py rename to python/samples/getting_started/workflows/parallelism/map_reduce_and_visualization.py index d82835897f..31c1bfc8f4 100644 --- a/python/samples/getting_started/workflow/parallelism/map_reduce_and_visualization.py +++ b/python/samples/getting_started/workflows/parallelism/map_reduce_and_visualization.py @@ -7,8 +7,6 @@ from collections import defaultdict from dataclasses import dataclass import aiofiles -from typing_extensions import Never - from agent_framework import ( Executor, # Base class for custom workflow steps WorkflowBuilder, # Fluent builder for executors and edges @@ -17,6 +15,7 @@ from agent_framework import ( WorkflowViz, # Utility to visualize a workflow graph handler, # Decorator to expose an Executor method as a step ) +from typing_extensions import Never """ Sample: Map reduce word count with fan out and fan in over file backed intermediate results diff --git a/python/samples/getting_started/workflow/resources/ambiguous_email.txt b/python/samples/getting_started/workflows/resources/ambiguous_email.txt similarity index 100% rename from python/samples/getting_started/workflow/resources/ambiguous_email.txt rename to python/samples/getting_started/workflows/resources/ambiguous_email.txt diff --git a/python/samples/getting_started/workflow/resources/email.txt b/python/samples/getting_started/workflows/resources/email.txt similarity index 100% rename from python/samples/getting_started/workflow/resources/email.txt rename to python/samples/getting_started/workflows/resources/email.txt diff --git a/python/samples/getting_started/workflow/resources/long_text.txt b/python/samples/getting_started/workflows/resources/long_text.txt similarity index 100% rename from python/samples/getting_started/workflow/resources/long_text.txt rename to python/samples/getting_started/workflows/resources/long_text.txt diff --git a/python/samples/getting_started/workflow/resources/spam.txt b/python/samples/getting_started/workflows/resources/spam.txt similarity index 100% rename from python/samples/getting_started/workflow/resources/spam.txt rename to python/samples/getting_started/workflows/resources/spam.txt diff --git a/python/samples/getting_started/workflow/state-management/shared_states_with_agents.py b/python/samples/getting_started/workflows/state-management/shared_states_with_agents.py similarity index 99% rename from python/samples/getting_started/workflow/state-management/shared_states_with_agents.py rename to python/samples/getting_started/workflows/state-management/shared_states_with_agents.py index a560994346..ea5bcc3195 100644 --- a/python/samples/getting_started/workflow/state-management/shared_states_with_agents.py +++ b/python/samples/getting_started/workflows/state-management/shared_states_with_agents.py @@ -6,8 +6,6 @@ from dataclasses import dataclass from typing import Any from uuid import uuid4 -from typing_extensions import Never - from agent_framework import ( AgentExecutorRequest, AgentExecutorResponse, @@ -20,6 +18,7 @@ from agent_framework import ( from agent_framework.azure import AzureOpenAIChatClient from azure.identity import AzureCliCredential from pydantic import BaseModel +from typing_extensions import Never """ Sample: Shared state with agents and conditional routing. diff --git a/python/samples/getting_started/workflow/visualization/concurrent_with_visualization.py b/python/samples/getting_started/workflows/visualization/concurrent_with_visualization.py similarity index 99% rename from python/samples/getting_started/workflow/visualization/concurrent_with_visualization.py rename to python/samples/getting_started/workflows/visualization/concurrent_with_visualization.py index f38a94353f..634116b8e4 100644 --- a/python/samples/getting_started/workflow/visualization/concurrent_with_visualization.py +++ b/python/samples/getting_started/workflows/visualization/concurrent_with_visualization.py @@ -3,8 +3,6 @@ import asyncio from dataclasses import dataclass -from typing_extensions import Never - from agent_framework import ( AgentExecutor, AgentExecutorRequest, @@ -21,6 +19,7 @@ from agent_framework import ( ) from agent_framework.azure import AzureOpenAIChatClient from azure.identity import AzureCliCredential +from typing_extensions import Never """ Sample: Concurrent (Fan-out/Fan-in) with Agents + Visualization diff --git a/python/uv.lock b/python/uv.lock index 55207a7c4b..3748a5e72e 100644 --- a/python/uv.lock +++ b/python/uv.lock @@ -1365,7 +1365,7 @@ name = "exceptiongroup" version = "1.3.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, + { name = "typing-extensions", marker = "(python_full_version < '3.13' and sys_platform == 'darwin') or (python_full_version < '3.13' and sys_platform == 'linux') or (python_full_version < '3.13' and sys_platform == 'win32')" }, ] sdist = { url = "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88", size = 29749, upload-time = "2025-05-10T17:42:51.123Z" } wheels = [