agent-framework-orchestrations 1.3.2__tar.gz → 1.4.1__tar.gz
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_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/PKG-INFO +2 -3
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/agent_framework_orchestrations/_handoff.py +3 -3
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/agent_framework_orchestrations/_magentic.py +4 -1
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/agent_framework_orchestrations/_orchestration_request_info.py +7 -0
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/agent_framework_orchestrations/_sequential.py +15 -1
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/pyproject.toml +2 -3
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/LICENSE +0 -0
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/README.md +0 -0
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/agent_framework_orchestrations/__init__.py +0 -0
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/agent_framework_orchestrations/_base_group_chat_orchestrator.py +0 -0
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/agent_framework_orchestrations/_concurrent.py +0 -0
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/agent_framework_orchestrations/_feature_usage.py +0 -0
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/agent_framework_orchestrations/_group_chat.py +0 -0
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/agent_framework_orchestrations/_orchestration_state.py +0 -0
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/agent_framework_orchestrations/_orchestrator_helpers.py +0 -0
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/agent_framework_orchestrations/_participant_output_config.py +0 -0
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/agent_framework_orchestrations/_workflow_builder.py +0 -0
- {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/agent_framework_orchestrations/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: agent-framework-orchestrations
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.1
|
|
4
4
|
Summary: Orchestration patterns for Microsoft Agent Framework. Includes SequentialBuilder, ConcurrentBuilder, HandoffBuilder, GroupChatBuilder, and MagenticBuilder.
|
|
5
5
|
Author-email: Microsoft <af-support@microsoft.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -9,7 +9,6 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
9
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
10
|
Classifier: Intended Audience :: Developers
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
@@ -17,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.15
|
|
18
17
|
Classifier: Typing :: Typed
|
|
19
18
|
License-File: LICENSE
|
|
20
|
-
Requires-Dist: agent-framework-core>=1.
|
|
19
|
+
Requires-Dist: agent-framework-core>=1.23.0,<2
|
|
21
20
|
Project-URL: homepage, https://aka.ms/agent-framework
|
|
22
21
|
Project-URL: issues, https://github.com/microsoft/agent-framework/issues
|
|
23
22
|
Project-URL: release_notes, https://github.com/microsoft/agent-framework/releases?q=tag%3Apython-1&expanded=true
|
|
@@ -657,15 +657,15 @@ class HandoffBuilder:
|
|
|
657
657
|
tool injection, and middleware — capabilities only available on ``Agent``.
|
|
658
658
|
|
|
659
659
|
Outputs:
|
|
660
|
-
|
|
660
|
+
By default, each agent's response surfaces as a workflow `output` event as it speaks; there is no
|
|
661
661
|
synthetic terminal event. Consumers iterating events see per-agent ``AgentResponse`` (or
|
|
662
662
|
``AgentResponseUpdate`` while streaming) in conversation order. The workflow returns to
|
|
663
663
|
idle once the termination condition is met (or the user terminates an interactive run).
|
|
664
664
|
|
|
665
665
|
Note:
|
|
666
666
|
1. Agents in handoff workflows must be ``Agent`` instances and support local tool calls.
|
|
667
|
-
2.
|
|
668
|
-
|
|
667
|
+
2. Use ``output_from`` and ``intermediate_output_from`` to select participants for Workflow Output
|
|
668
|
+
and Intermediate Output. Unselected participant outputs are hidden.
|
|
669
669
|
"""
|
|
670
670
|
|
|
671
671
|
def __init__(
|
|
@@ -942,7 +942,10 @@ class MagenticOrchestrator(BaseGroupChatOrchestrator):
|
|
|
942
942
|
|
|
943
943
|
# Termination related state
|
|
944
944
|
self._terminated: bool = False
|
|
945
|
-
|
|
945
|
+
# The base group chat contract coerces a max round count below 1 up to 1; this
|
|
946
|
+
# value is assigned after super().__init__, so apply the same rule here instead
|
|
947
|
+
# of ending the workflow before any round can run.
|
|
948
|
+
self._max_rounds = max(1, manager.max_round_count) if manager.max_round_count is not None else None
|
|
946
949
|
|
|
947
950
|
@override
|
|
948
951
|
async def _handle_messages(
|
|
@@ -199,6 +199,7 @@ class AgentApprovalExecutor(WorkflowExecutor):
|
|
|
199
199
|
context_mode: Literal["full", "last_agent", "custom"] | None = None,
|
|
200
200
|
*,
|
|
201
201
|
allow_direct_output: bool = False,
|
|
202
|
+
ensure_trailing_user_turn: bool = False,
|
|
202
203
|
) -> None:
|
|
203
204
|
"""Initialize the AgentApprovalExecutor.
|
|
204
205
|
|
|
@@ -210,8 +211,13 @@ class AgentApprovalExecutor(WorkflowExecutor):
|
|
|
210
211
|
downstream participant). Set this when this executor is the workflow's
|
|
211
212
|
terminator — so the user-approved final response surfaces as a workflow
|
|
212
213
|
``output`` event.
|
|
214
|
+
ensure_trailing_user_turn: If True, appends a synthetic user continuation
|
|
215
|
+
message when the cache ends on an assistant message. Some chat-completions
|
|
216
|
+
providers return empty text when the prompt ends on ``assistant``.
|
|
217
|
+
Defaults to False.
|
|
213
218
|
"""
|
|
214
219
|
self._context_mode: Literal["full", "last_agent", "custom"] | None = context_mode
|
|
220
|
+
self._ensure_trailing_user_turn = ensure_trailing_user_turn
|
|
215
221
|
self._description = agent.description
|
|
216
222
|
|
|
217
223
|
super().__init__(
|
|
@@ -235,6 +241,7 @@ class AgentApprovalExecutor(WorkflowExecutor):
|
|
|
235
241
|
agent_executor = AgentExecutor(
|
|
236
242
|
agent,
|
|
237
243
|
context_mode=self._context_mode,
|
|
244
|
+
ensure_trailing_user_turn=self._ensure_trailing_user_turn,
|
|
238
245
|
)
|
|
239
246
|
request_info_cls = _TerminalAgentRequestInfoExecutor if terminal else AgentRequestInfoExecutor
|
|
240
247
|
request_info_executor = request_info_cls(id="agent_request_info_executor")
|
|
@@ -105,6 +105,7 @@ class SequentialBuilder:
|
|
|
105
105
|
chain_only_agent_responses: bool = False,
|
|
106
106
|
output_from: Sequence[_ParticipantOutputSpecifier] | Literal["all"] | None = cast(Any, UNSET),
|
|
107
107
|
intermediate_output_from: _ParticipantIntermediateOutputSelection = None,
|
|
108
|
+
ensure_trailing_user_turn: bool = False,
|
|
108
109
|
) -> None:
|
|
109
110
|
"""Initialize the SequentialBuilder.
|
|
110
111
|
|
|
@@ -120,6 +121,11 @@ class SequentialBuilder:
|
|
|
120
121
|
intermediate_output_from: Optional participant names or instances whose ``yield_output`` calls
|
|
121
122
|
surface as workflow ``intermediate`` events. Pass ``"all_other"`` to select every participant
|
|
122
123
|
not selected by ``output_from``. Unlisted participant outputs are hidden.
|
|
124
|
+
ensure_trailing_user_turn: If True, whenever a participant would be run with a
|
|
125
|
+
conversation ending on an assistant message (e.g. chaining into the next agent),
|
|
126
|
+
a synthetic user continuation message is appended first. Some chat-completions
|
|
127
|
+
providers return empty text when the prompt ends on ``assistant``. Defaults to
|
|
128
|
+
False to preserve existing behavior.
|
|
123
129
|
"""
|
|
124
130
|
self._name = name or DEFAULT_WORKFLOW_NAME
|
|
125
131
|
self._participants: list[SupportsAgentRun | Executor] = []
|
|
@@ -129,6 +135,7 @@ class SequentialBuilder:
|
|
|
129
135
|
self._request_info_filter: set[str] | None = None
|
|
130
136
|
self._output_from = _coalesce_output_from(output_from=output_from)
|
|
131
137
|
self._intermediate_output_from = _coerce_intermediate_output_from(intermediate_output_from)
|
|
138
|
+
self._ensure_trailing_user_turn: bool = ensure_trailing_user_turn
|
|
132
139
|
|
|
133
140
|
self._set_participants(participants)
|
|
134
141
|
|
|
@@ -223,10 +230,17 @@ class SequentialBuilder:
|
|
|
223
230
|
p,
|
|
224
231
|
context_mode=context_mode,
|
|
225
232
|
allow_direct_output=(idx == last_idx),
|
|
233
|
+
ensure_trailing_user_turn=self._ensure_trailing_user_turn,
|
|
226
234
|
)
|
|
227
235
|
)
|
|
228
236
|
else:
|
|
229
|
-
executors.append(
|
|
237
|
+
executors.append(
|
|
238
|
+
AgentExecutor(
|
|
239
|
+
p,
|
|
240
|
+
context_mode=context_mode,
|
|
241
|
+
ensure_trailing_user_turn=self._ensure_trailing_user_turn,
|
|
242
|
+
)
|
|
243
|
+
)
|
|
230
244
|
else:
|
|
231
245
|
raise TypeError(f"Participants must be SupportsAgentRun or Executor instances. Got {type(p).__name__}.")
|
|
232
246
|
|
{agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.1}/pyproject.toml
RENAMED
|
@@ -4,7 +4,7 @@ description = "Orchestration patterns for Microsoft Agent Framework. Includes Se
|
|
|
4
4
|
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.4.1"
|
|
8
8
|
license-files = ["LICENSE"]
|
|
9
9
|
urls.homepage = "https://aka.ms/agent-framework"
|
|
10
10
|
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
|
|
@@ -15,7 +15,6 @@ classifiers = [
|
|
|
15
15
|
"Development Status :: 5 - Production/Stable",
|
|
16
16
|
"Intended Audience :: Developers",
|
|
17
17
|
"Programming Language :: Python :: 3",
|
|
18
|
-
"Programming Language :: Python :: 3.10",
|
|
19
18
|
"Programming Language :: Python :: 3.11",
|
|
20
19
|
"Programming Language :: Python :: 3.12",
|
|
21
20
|
"Programming Language :: Python :: 3.13",
|
|
@@ -24,7 +23,7 @@ classifiers = [
|
|
|
24
23
|
"Typing :: Typed",
|
|
25
24
|
]
|
|
26
25
|
dependencies = [
|
|
27
|
-
"agent-framework-core>=1.
|
|
26
|
+
"agent-framework-core>=1.23.0,<2",
|
|
28
27
|
]
|
|
29
28
|
|
|
30
29
|
[tool.uv]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|