Hello everyone, I was reading the ODC Agentic AI documentation and had trouble understanding something here:
Link to document: https://success.outsystems.com/documentation/outsystems_developer_cloud/building_apps/build_ai_powered_apps/agentic_apps_in_odc/ai_agent_actions/#loops-and-internal-variables
Quote:
"The agent may continue to execute actions as long as your expression evaluates to False." -> do-while-False pattern
But in the example:
Have I misunderstood something here?
Hello.
It is a new course (5 days old), a lot of sections are being improved based on feedback.
Based on 4 reviewers that I know, that error is the only serious one and was reported before.It stops when True so most conditions are wrong and yes, the 8000 should be 3000.It should be fixed soon.
If you spot anything else, feel free to add here as the fix will be communicated here and the team is reading the post.
@Nuno Reis
Got it, appreciate the transparency. Looking forward to the update!
Hi @Trac Duc Anh Luong
The document is a bit obscure, but you can find the other information specifying if the expression is True, the agent stops. So it is wrong example which is on the opposite way, I have proposed the changes to the document. Will keep you posted.
Thanks @Shingo Lam,
I prefer your proposed changes to the current doc. Much clearer & easier to comprehend.
You are welcome. Nice catch on the document. Keep walking!
Hello,
What you should know about the condition is that it is designed to act as a red light for the agent, signaling when it should stop. For example, you’ve created an agent that depends on a specific number, which it uses to distribute among users, for example employees receiving salaries.
This is where the condition plays its role. In the SystemMessage, you define the agent as a distributor of a number. Then, in the Call Agent action, you use an action that outputs the number itself.
If you leave the condition untouched, the agent will continue distributing the number indefinitely until the list of users ends. However, with the condition in place, you instruct the agent to stop once the number reaches zero and of course keeps decrementing the number until it reaches zero, ensuring that the value is distributed evenly.
Hi @Sherif El-Habibi,
Thanks for your explanation & example. I understand that the "Call Condition" acts as a threshold that tells when an Agent should stop. However, the wording in the documentation is somewhat confusing to me.
"The agent may continue to execute actions as long as your expression evaluates to False."
-> I believe this is a do-while-False pattern, meaning the Agent will stop calling action(s) once the expression evaluates to True:
Expression: LoopCount >= 50
However, examples in the documentation are the opposite, following a do-while-True pattern:
Expression: LoopCount < 50
What do you think the pattern should be here?
Based on the sentence “The agent may continue to execute actions as long as your expression evaluates to False,” the current documentation can be little confusing.
While the pattern could technically work either way, to avoid misunderstanding, the sentence should be changed to evaluate to True, or the examples updated to match the False pattern.
Nuno has also approved that this will be fixed.