Best Practices for Nodes in Workflows
Here are some best practices related to creating nodes for workflows, to be used in agentic apps:
- Start by deciding which app stages your workflow should handle.
- Branch early on
OraMessageHintso each stage stays simple. - For
InitDisplay, return display output and optionally include actions ororaCommswhen that improves the startup experience. ForInitCommunications, returnoraComms. ForInitActions, return actions. - Use
OraAppContextandOraUserContextwhenever the app experience depends on who the user is or what object the app is currently showing. - If a node needs the current question or a derived prompt, pass it explicitly instead of assuming a downstream node will reconstruct it for you.
- Test the exact stage you're writing before including that workflow into the app.