Python: [BREAKING] Move workflow to main package (#767)

* Move workflow to main package

* Remove workflow specific unit test config

* Remove workflow-specific version info

* Revert unintended telemetry changes

* Removed the obsolete packages/workflow/tests target

* Rename dir workflow to _workflow

* Fix test imports
This commit is contained in:
Evan Mattson
2025-09-16 21:04:07 +09:00
committed by GitHub
Unverified
parent 65dd48aa1d
commit 732d9f6cd7
87 changed files with 524 additions and 595 deletions
@@ -4,19 +4,20 @@ import asyncio
from dataclasses import dataclass
from typing import Any
from agent_framework import ChatMessage, Role # Core chat primitives to build LLM requests
from agent_framework.azure import AzureChatClient # Client wrapper for Azure OpenAI chat models
from agent_framework.workflow import (
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
AgentExecutorResponse, # The structured result returned by an AgentExecutor
AgentRunEvent, # Tracing event for agent execution steps
ChatMessage, # Chat message structure
Executor, # Base class for custom Python executors
Role, # Enum of chat roles (user, assistant, system)
WorkflowBuilder, # Fluent builder for wiring the workflow graph
WorkflowCompletedEvent, # Terminal event carrying the final result
WorkflowContext, # Per run context and event bus
handler, # Decorator to mark an Executor method as invokable
)
from agent_framework.azure import AzureChatClient # Client wrapper for Azure OpenAI chat models
from azure.identity import AzureCliCredential # Uses your az CLI login for credentials
"""
@@ -8,7 +8,7 @@ from dataclasses import dataclass
from typing import Any
import aiofiles
from agent_framework.workflow import (
from agent_framework import (
Executor, # Base class for custom workflow steps
WorkflowBuilder, # Fluent graph builder for executors and edges
WorkflowCompletedEvent, # Terminal event that carries final output
@@ -296,7 +296,7 @@ async def main():
svg_file = viz.export(format="svg")
print(f"SVG file saved to: {svg_file}")
except ImportError:
print("Tip: Install 'viz' extra to export workflow visualization: pip install agent-framework-workflow[viz]")
print("Tip: Install 'viz' extra to export workflow visualization: pip install agent-framework[viz]")
# Step 3: Open the text file and read its content.
async with aiofiles.open(os.path.join(DIR, "resources", "long_text.txt"), "r") as f: