Skip to content

Commit 6f25cf9

Browse files
reset next_agent in multi agent workflows (#18782)
1 parent ba78377 commit 6f25cf9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llama-index-core/llama_index/core/agent/workflow/multi_agent_workflow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ async def aggregate_tool_results(
502502
next_agent_name = await ctx.get("next_agent", default=None)
503503
if next_agent_name:
504504
await ctx.set("current_agent_name", next_agent_name)
505+
await ctx.set("next_agent", None)
505506

506507
if any(
507508
tool_call_result.return_direct for tool_call_result in tool_call_results

0 commit comments

Comments
 (0)