This article explains how to add javascript code in AI Agent workflow in Oracle AI Agent Studio.
1. Add a Code Node
Navigate to Agent Team and drag or add a Code node into your agent workflow.
2. Configure the Code Node
- Enter the Name, Code Identifier, and Return Type.
- Add your JavaScript Source Code.
- In this example, the code node extracts an array from the previous Agent node's JSON response and counts the number of orders.
- The Output Schema is generated automatically based on your selected return type.
You can reference the output of the Code node in subsequent workflow steps. For instance, to continue processing only when orders exist, add an IF Condition node.
No comments:
Post a Comment