agent-framework-orchestrations 1.3.2__tar.gz → 1.4.0__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.
Files changed (18) hide show
  1. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/PKG-INFO +2 -2
  2. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/agent_framework_orchestrations/_orchestration_request_info.py +7 -0
  3. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/agent_framework_orchestrations/_sequential.py +15 -1
  4. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/pyproject.toml +2 -2
  5. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/LICENSE +0 -0
  6. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/README.md +0 -0
  7. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/agent_framework_orchestrations/__init__.py +0 -0
  8. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/agent_framework_orchestrations/_base_group_chat_orchestrator.py +0 -0
  9. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/agent_framework_orchestrations/_concurrent.py +0 -0
  10. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/agent_framework_orchestrations/_feature_usage.py +0 -0
  11. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/agent_framework_orchestrations/_group_chat.py +0 -0
  12. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/agent_framework_orchestrations/_handoff.py +0 -0
  13. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/agent_framework_orchestrations/_magentic.py +0 -0
  14. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/agent_framework_orchestrations/_orchestration_state.py +0 -0
  15. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/agent_framework_orchestrations/_orchestrator_helpers.py +0 -0
  16. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/agent_framework_orchestrations/_participant_output_config.py +0 -0
  17. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/agent_framework_orchestrations/_workflow_builder.py +0 -0
  18. {agent_framework_orchestrations-1.3.2 → agent_framework_orchestrations-1.4.0}/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.2
3
+ Version: 1.4.0
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
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.14
17
17
  Classifier: Programming Language :: Python :: 3.15
18
18
  Classifier: Typing :: Typed
19
19
  License-File: LICENSE
20
- Requires-Dist: agent-framework-core>=1.19.0,<2
20
+ Requires-Dist: agent-framework-core>=1.23.0,<2
21
21
  Project-URL: homepage, https://aka.ms/agent-framework
22
22
  Project-URL: issues, https://github.com/microsoft/agent-framework/issues
23
23
  Project-URL: release_notes, https://github.com/microsoft/agent-framework/releases?q=tag%3Apython-1&expanded=true
@@ -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(AgentExecutor(p, context_mode=context_mode))
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
 
@@ -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.3.2"
7
+ version = "1.4.0"
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"
@@ -24,7 +24,7 @@ classifiers = [
24
24
  "Typing :: Typed",
25
25
  ]
26
26
  dependencies = [
27
- "agent-framework-core>=1.19.0,<2",
27
+ "agent-framework-core>=1.23.0,<2",
28
28
  ]
29
29
 
30
30
  [tool.uv]