agent-framework-declarative 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_framework_declarative/__init__.py +71 -0
- agent_framework_declarative/_loader.py +868 -0
- agent_framework_declarative/_models.py +1154 -0
- agent_framework_declarative/_workflows/__init__.py +167 -0
- agent_framework_declarative/_workflows/_declarative_base.py +1226 -0
- agent_framework_declarative/_workflows/_declarative_builder.py +1057 -0
- agent_framework_declarative/_workflows/_errors.py +38 -0
- agent_framework_declarative/_workflows/_executors_agents.py +1025 -0
- agent_framework_declarative/_workflows/_executors_basic.py +574 -0
- agent_framework_declarative/_workflows/_executors_control_flow.py +461 -0
- agent_framework_declarative/_workflows/_executors_external_input.py +243 -0
- agent_framework_declarative/_workflows/_executors_http.py +417 -0
- agent_framework_declarative/_workflows/_executors_mcp.py +549 -0
- agent_framework_declarative/_workflows/_executors_tools.py +660 -0
- agent_framework_declarative/_workflows/_factory.py +808 -0
- agent_framework_declarative/_workflows/_http_handler.py +237 -0
- agent_framework_declarative/_workflows/_mcp_handler.py +581 -0
- agent_framework_declarative/_workflows/_powerfx_functions.py +498 -0
- agent_framework_declarative/_workflows/_state.py +650 -0
- agent_framework_declarative-1.0.0.dist-info/METADATA +49 -0
- agent_framework_declarative-1.0.0.dist-info/RECORD +23 -0
- agent_framework_declarative-1.0.0.dist-info/WHEEL +4 -0
- agent_framework_declarative-1.0.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Copyright (c) Microsoft. All rights reserved.
|
|
2
|
+
|
|
3
|
+
"""Declarative workflow support for agent-framework.
|
|
4
|
+
|
|
5
|
+
This module provides the ability to create executable Workflow objects from YAML definitions,
|
|
6
|
+
enabling multi-agent orchestration patterns like Foreach, conditionals, and agent invocations.
|
|
7
|
+
|
|
8
|
+
Graph-based execution enables:
|
|
9
|
+
- Checkpointing at action boundaries
|
|
10
|
+
- Workflow visualization
|
|
11
|
+
- Pause/resume capabilities
|
|
12
|
+
- Full integration with the workflow runtime
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from ._declarative_base import (
|
|
16
|
+
DECLARATIVE_STATE_KEY,
|
|
17
|
+
ActionComplete,
|
|
18
|
+
ActionTrigger,
|
|
19
|
+
ConversationData,
|
|
20
|
+
DeclarativeActionExecutor,
|
|
21
|
+
DeclarativeMessage,
|
|
22
|
+
DeclarativeStateData,
|
|
23
|
+
DeclarativeWorkflowState,
|
|
24
|
+
LoopControl,
|
|
25
|
+
LoopIterationResult,
|
|
26
|
+
)
|
|
27
|
+
from ._declarative_builder import ALL_ACTION_EXECUTORS, DeclarativeWorkflowBuilder
|
|
28
|
+
from ._errors import DeclarativeActionError, DeclarativeWorkflowError
|
|
29
|
+
from ._executors_agents import (
|
|
30
|
+
AGENT_ACTION_EXECUTORS,
|
|
31
|
+
AGENT_REGISTRY_KEY,
|
|
32
|
+
TOOL_REGISTRY_KEY,
|
|
33
|
+
AgentExternalInputRequest,
|
|
34
|
+
AgentExternalInputResponse,
|
|
35
|
+
AgentResult,
|
|
36
|
+
ExternalLoopState,
|
|
37
|
+
InvokeAzureAgentExecutor,
|
|
38
|
+
)
|
|
39
|
+
from ._executors_basic import (
|
|
40
|
+
BASIC_ACTION_EXECUTORS,
|
|
41
|
+
ClearAllVariablesExecutor,
|
|
42
|
+
CreateConversationExecutor,
|
|
43
|
+
ResetVariableExecutor,
|
|
44
|
+
SendActivityExecutor,
|
|
45
|
+
SetMultipleVariablesExecutor,
|
|
46
|
+
SetTextVariableExecutor,
|
|
47
|
+
SetValueExecutor,
|
|
48
|
+
SetVariableExecutor,
|
|
49
|
+
)
|
|
50
|
+
from ._executors_control_flow import (
|
|
51
|
+
CONTROL_FLOW_EXECUTORS,
|
|
52
|
+
BreakLoopExecutor,
|
|
53
|
+
ContinueLoopExecutor,
|
|
54
|
+
EndConversationExecutor,
|
|
55
|
+
EndWorkflowExecutor,
|
|
56
|
+
ForeachInitExecutor,
|
|
57
|
+
ForeachNextExecutor,
|
|
58
|
+
JoinExecutor,
|
|
59
|
+
)
|
|
60
|
+
from ._executors_external_input import (
|
|
61
|
+
EXTERNAL_INPUT_EXECUTORS,
|
|
62
|
+
ExternalInputRequest,
|
|
63
|
+
ExternalInputResponse,
|
|
64
|
+
QuestionExecutor,
|
|
65
|
+
RequestExternalInputExecutor,
|
|
66
|
+
)
|
|
67
|
+
from ._executors_http import (
|
|
68
|
+
HTTP_ACTION_EXECUTORS,
|
|
69
|
+
HttpRequestActionExecutor,
|
|
70
|
+
)
|
|
71
|
+
from ._executors_mcp import (
|
|
72
|
+
MCP_ACTION_EXECUTORS,
|
|
73
|
+
InvokeMcpToolActionExecutor,
|
|
74
|
+
MCPToolApprovalRequest,
|
|
75
|
+
)
|
|
76
|
+
from ._executors_tools import (
|
|
77
|
+
FUNCTION_TOOL_REGISTRY_KEY,
|
|
78
|
+
TOOL_ACTION_EXECUTORS,
|
|
79
|
+
BaseToolExecutor,
|
|
80
|
+
InvokeFunctionToolExecutor,
|
|
81
|
+
ToolApprovalRequest,
|
|
82
|
+
ToolApprovalResponse,
|
|
83
|
+
ToolInvocationResult,
|
|
84
|
+
)
|
|
85
|
+
from ._factory import WorkflowFactory
|
|
86
|
+
from ._http_handler import (
|
|
87
|
+
DefaultHttpRequestHandler,
|
|
88
|
+
HttpRequestHandler,
|
|
89
|
+
HttpRequestInfo,
|
|
90
|
+
HttpRequestResult,
|
|
91
|
+
)
|
|
92
|
+
from ._mcp_handler import (
|
|
93
|
+
DefaultMCPToolHandler,
|
|
94
|
+
MCPToolHandler,
|
|
95
|
+
MCPToolInvocation,
|
|
96
|
+
MCPToolResult,
|
|
97
|
+
)
|
|
98
|
+
from ._state import WorkflowState
|
|
99
|
+
|
|
100
|
+
__all__ = [
|
|
101
|
+
"AGENT_ACTION_EXECUTORS",
|
|
102
|
+
"AGENT_REGISTRY_KEY",
|
|
103
|
+
"ALL_ACTION_EXECUTORS",
|
|
104
|
+
"BASIC_ACTION_EXECUTORS",
|
|
105
|
+
"CONTROL_FLOW_EXECUTORS",
|
|
106
|
+
"DECLARATIVE_STATE_KEY",
|
|
107
|
+
"EXTERNAL_INPUT_EXECUTORS",
|
|
108
|
+
"FUNCTION_TOOL_REGISTRY_KEY",
|
|
109
|
+
"HTTP_ACTION_EXECUTORS",
|
|
110
|
+
"MCP_ACTION_EXECUTORS",
|
|
111
|
+
"TOOL_ACTION_EXECUTORS",
|
|
112
|
+
"TOOL_REGISTRY_KEY",
|
|
113
|
+
"ActionComplete",
|
|
114
|
+
"ActionTrigger",
|
|
115
|
+
"AgentExternalInputRequest",
|
|
116
|
+
"AgentExternalInputResponse",
|
|
117
|
+
"AgentResult",
|
|
118
|
+
"BaseToolExecutor",
|
|
119
|
+
"BreakLoopExecutor",
|
|
120
|
+
"ClearAllVariablesExecutor",
|
|
121
|
+
"ContinueLoopExecutor",
|
|
122
|
+
"ConversationData",
|
|
123
|
+
"CreateConversationExecutor",
|
|
124
|
+
"DeclarativeActionError",
|
|
125
|
+
"DeclarativeActionExecutor",
|
|
126
|
+
"DeclarativeMessage",
|
|
127
|
+
"DeclarativeStateData",
|
|
128
|
+
"DeclarativeWorkflowBuilder",
|
|
129
|
+
"DeclarativeWorkflowError",
|
|
130
|
+
"DeclarativeWorkflowState",
|
|
131
|
+
"DefaultHttpRequestHandler",
|
|
132
|
+
"DefaultMCPToolHandler",
|
|
133
|
+
"EndConversationExecutor",
|
|
134
|
+
"EndWorkflowExecutor",
|
|
135
|
+
"ExternalInputRequest",
|
|
136
|
+
"ExternalInputResponse",
|
|
137
|
+
"ExternalLoopState",
|
|
138
|
+
"ForeachInitExecutor",
|
|
139
|
+
"ForeachNextExecutor",
|
|
140
|
+
"HttpRequestActionExecutor",
|
|
141
|
+
"HttpRequestHandler",
|
|
142
|
+
"HttpRequestInfo",
|
|
143
|
+
"HttpRequestResult",
|
|
144
|
+
"InvokeAzureAgentExecutor",
|
|
145
|
+
"InvokeFunctionToolExecutor",
|
|
146
|
+
"InvokeMcpToolActionExecutor",
|
|
147
|
+
"JoinExecutor",
|
|
148
|
+
"LoopControl",
|
|
149
|
+
"LoopIterationResult",
|
|
150
|
+
"MCPToolApprovalRequest",
|
|
151
|
+
"MCPToolHandler",
|
|
152
|
+
"MCPToolInvocation",
|
|
153
|
+
"MCPToolResult",
|
|
154
|
+
"QuestionExecutor",
|
|
155
|
+
"RequestExternalInputExecutor",
|
|
156
|
+
"ResetVariableExecutor",
|
|
157
|
+
"SendActivityExecutor",
|
|
158
|
+
"SetMultipleVariablesExecutor",
|
|
159
|
+
"SetTextVariableExecutor",
|
|
160
|
+
"SetValueExecutor",
|
|
161
|
+
"SetVariableExecutor",
|
|
162
|
+
"ToolApprovalRequest",
|
|
163
|
+
"ToolApprovalResponse",
|
|
164
|
+
"ToolInvocationResult",
|
|
165
|
+
"WorkflowFactory",
|
|
166
|
+
"WorkflowState",
|
|
167
|
+
]
|