Create Custom AI Agents of Type Workflow

A Workflow is a sequence of nodes agent teams of type Workflow use for deterministic, rule-based orchestration of tasks in which every step is preconfigured. Workflows are ideal for scenarios where compliance, repeatability, and governance are essential. The workflow tasks are represented as a connected sequence of nodes. Each node within the workflow performs a defined function, such as extracting data, calling a business object function, running an LLM, or sending an email. The output from each node is seamlessly passed to the subsequent step, ensuring a controlled and efficient process flow.

Let’s look at an example to illustrate how a workflow operates in practice. Imagine a scenario where files are uploaded and need to be processed based on their current status:

  • If a file is currently being indexed, the workflow extracts the file’s content and stores it in a vector database.
  • If a file has already been indexed, the workflow retrieves relevant content directly from the vector database.

In both cases, the final response to the user is generated by an LLM. This image shows how the workflow nodes are arranged for this use case.

Example workflow in AI Agent Studio

Callout Number Node Name Node Type Description
1 defaults Set Variables Sets the default values for the variables specified, such as attachmentId, documentId, and toolId, to point to a an uploaded document in the WebCenter Content server.
2 indexing If Condition Decides whether or not to index the information in the document.
3 file node Document Processor If indexing is true, processes the file by extracting its text, which is then stored in a vector database using the next node.
4 VECTOR_WRITER Vector DB Writer Stores the extracted file contents from the previous node in the vector database.
5 VECTOR_READER Vector DB Reader If indexing is false, retrieves the content directly by performing a semantic search of the extracted text in the vector database.
6 golden answer LLM Uses the LLM to process information extracted from the vector reader, generate an answer to the question, and return the desired output.

Here are the steps to create your own workflow.

  1. Go to Navigator > Tools > AI Agent Studio.
  2. From the Agent Teams tab, add an agent team and provide details for the new agent team.

    Details tab

    Field Description
    Family Select the family to which this agent team belongs.
    Product Select the product within the family to which this agent team belongs.
    Type Select Workflow.

    LLM tab

    Field Description
    Provider Select the LLM for your agent team.

    Security tab

    Field Description
    Add Select the roles which will have access to this agent team.

    Triggers tab

    Create triggers to initiate the workflow. Triggers define the conditions or events that start the workflow and determine when and why it begins.
    Field Description
    Type Select the data type of the trigger.

    Variables tab

    Define workflow-level variables, making them accessible to all nodes within the workflow. Variables are ideal for storing IDs, constants, or any values you need to share and use across different parts of the workflow.
    Field Description
    Type Select the data type of the variable.

    Output tab

    Define the overall structure of the workflow’s output using JSON schema, to specify exactly what you will receive when the workflow is completed. If no schema is specified, the output type defaults to that of the individual node. When a schema is provided, the system validates the outputs against the schema and enables auto-complete for those fields.
    Field Description
    Specification Mode Select this mode to directly modify the JSON schema for the output.
    Simple Mode Use this mode to define output values and types. The corresponding JSON schema will be generated automatically and displayed in the specification mode for you to edit.

    Error Handling tab

    Specify where to send an email when a workflow instance encounters a permanent error. You can also use context expressions in these fields for additional clarity.
  3. Click Create.
  4. Add nodes to the workflow by hovering over the line between the start and end of the workflow. Click Plus icon to choose the type of node you want to add.

    Add nodes to workflow

    Tips
    • Connect nodes in sequence to control how inputs are received, processed, and forwarded throughout the workflow.
    • You can insert new nodes before, after, or between existing nodes as needed.
    • Once created, you can’t rearrange the nodes. To change a node’s position, delete it and create it again in the desired spot.
  5. If needed, use Debug icon to test the agent team. For any required fine-tuning, you can edit the agent team using Agent Team Settings icon.
  6. Publish the agent team.

    Users can view the published agentic workflows from the AI Agents page. To open this page, add agent-explore to the end of the URL for AI Agent Studio. For example, https://example.com/myApp/redwood/human-resources/ai-studio/agent-explore.