File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ class LoopAgentState(BaseAgentState):
5151
5252
5353@deprecated (
54- 'LoopAgent is deprecated and will be removed in future versions. '
55- ' Please use Workflow instead .'
54+ 'LoopAgent is deprecated in favor of Workflow and will be removed in a '
55+ ' future version. Workflow cannot yet be used as an LlmAgent sub-agent .'
5656)
5757class LoopAgent (BaseAgent ):
5858 """A shell agent that run its sub-agents in a loop.
@@ -61,8 +61,8 @@ class LoopAgent(BaseAgent):
6161 reached, the loop agent will stop.
6262
6363 .. deprecated::
64- LoopAgent is deprecated and will be removed in future versions.
65- Please use Workflow instead .
64+ LoopAgent is deprecated in favor of Workflow and will be removed in a
65+ future version. Workflow cannot yet be used as an LlmAgent sub-agent .
6666 """
6767
6868 config_type : ClassVar [type [BaseAgentConfig ]] = LoopAgentConfig
Original file line number Diff line number Diff line change @@ -158,8 +158,8 @@ async def process_an_agent(events_for_one_agent):
158158
159159
160160@deprecated (
161- 'ParallelAgent is deprecated and will be removed in future versions. '
162- ' Please use Workflow instead .'
161+ 'ParallelAgent is deprecated in favor of Workflow and will be removed in'
162+ ' a future version. Workflow cannot yet be used as an LlmAgent sub-agent .'
163163)
164164class ParallelAgent (BaseAgent ):
165165 """A shell agent that runs its sub-agents in parallel in an isolated manner.
@@ -171,8 +171,8 @@ class ParallelAgent(BaseAgent):
171171 - Generating multiple responses for review by a subsequent evaluation agent.
172172
173173 .. deprecated::
174- ParallelAgent is deprecated and will be removed in future versions.
175- Please use Workflow instead .
174+ ParallelAgent is deprecated in favor of Workflow and will be removed in a
175+ future version. Workflow cannot yet be used as an LlmAgent sub-agent .
176176 """
177177
178178 config_type : ClassVar [type [BaseAgentConfig ]] = ParallelAgentConfig
Original file line number Diff line number Diff line change @@ -47,15 +47,16 @@ class SequentialAgentState(BaseAgentState):
4747
4848
4949@deprecated (
50- 'SequentialAgent is deprecated and will be removed in future versions.'
51- ' Please use Workflow instead.'
50+ 'SequentialAgent is deprecated in favor of Workflow and will be removed'
51+ ' in a future version. Workflow cannot yet be used as an LlmAgent'
52+ ' sub-agent.'
5253)
5354class SequentialAgent (BaseAgent ):
5455 """A shell agent that runs its sub-agents in sequence.
5556
5657 .. deprecated::
57- SequentialAgent is deprecated and will be removed in future versions.
58- Please use Workflow instead .
58+ SequentialAgent is deprecated in favor of Workflow and will be removed in
59+ a future version. Workflow cannot yet be used as an LlmAgent sub-agent .
5960 """
6061
6162 config_type : ClassVar [Type [BaseAgentConfig ]] = SequentialAgentConfig
Original file line number Diff line number Diff line change @@ -285,3 +285,8 @@ def mock_should_pause(event):
285285 # Verify that the sub-agent state was NOT reset
286286 assert agent .name in parent_ctx .agent_states
287287 assert parent_ctx .agent_states [agent .name ] == {'some_key' : 'some_value' }
288+
289+
290+ def test_deprecation_mentions_sub_agent_limitation ():
291+ with pytest .warns (DeprecationWarning , match = 'sub-agent' ):
292+ LoopAgent (name = 'deprecated_loop' , sub_agents = [])
Original file line number Diff line number Diff line change @@ -409,3 +409,8 @@ async def test_merge_agent_run_pre_3_11_no_aclose_error_on_failure():
409409 # would raise RuntimeError here.
410410 for agen in agent_runs :
411411 await agen .aclose ()
412+
413+
414+ def test_deprecation_mentions_sub_agent_limitation ():
415+ with pytest .warns (DeprecationWarning , match = 'sub-agent' ):
416+ ParallelAgent (name = 'deprecated_parallel' , sub_agents = [])
Original file line number Diff line number Diff line change @@ -201,3 +201,8 @@ async def test_run_live(request: pytest.FixtureRequest):
201201 assert events [1 ].author == agent_2 .name
202202 assert events [0 ].content .parts [0 ].text == f'Hello, live { agent_1 .name } !'
203203 assert events [1 ].content .parts [0 ].text == f'Hello, live { agent_2 .name } !'
204+
205+
206+ def test_deprecation_mentions_sub_agent_limitation ():
207+ with pytest .warns (DeprecationWarning , match = 'sub-agent' ):
208+ SequentialAgent (name = 'deprecated_sequential' , sub_agents = [])
You can’t perform that action at this time.
0 commit comments