In a multi-agent system, how to end the process early when the conditions are met

I have built a multi-agent system that executes serially.
For example, it contains three agents, A, B, and C. The general execution process is: execute B after A is completed, and execute C after B is completed.
How can I stop the process when the execution result of A/B meets certain conditions?

Alright, so one solid way to handle that is with Flows. You’ll want to pay close attention to Flow Control. And if you’re looking to really get a grip on Flows, I’d definitely recommend checking out this YouTube video by Brandon Hancock. Hope that helps you out!

@Max_Moura Thanks for your reply
I have also considered this approach, but it is more like if…else…, and does not reflect the model’s ability to make autonomous decisions.
The effect I want to achieve is: when agent A has no output, the model can decide to terminate the entire process based on the current state, and the process will no longer be executed to agent B

In this case, if you really need an Agent to figure out the steps required to get a task done, you’ll probably want to check out “Hierarchical Process”. This topic was also broken down in this other thread. Hope it helps.