MagureAcademy

How-to · Lesson 8 of 19

Building Your First Enterprise AI Workflow

Build the smallest useful workflow (Start, Agent, End) from an empty canvas: define an input field, give the agent a job, map data between nodes with the variable picker, and run it against a real question.

What You Will Learn

  • Where workflows live in MagOneAI Studio and why the smallest useful one is three nodes
  • Setting up the START node: input fields become both the form your users fill in and the payload your API accepts
  • Adding an AGENT node and giving it a job description rather than a name like agent one
  • Mapping data with the variable picker instead of typing paths by hand
  • Why END is a contract, not a full stop
  • Reading the execution log: what went in, what the agent was asked, what it answered, how long it took and what it cost
  • Why you do not need to save before running, but you do need to publish before anyone else can use it

Step by step guide

Step 1: Create a New Use Case in the Northlight Project

Click the New Use Case button in the Northlight project workspace to create a new workflow.

The New Use Case button in the project workspace

Enter a name for the use case in the Use Case Name field.

The Use Case Name field

Leave the Description field empty, as it is optional.

The optional Description field, left empty

For Interface Type, select Form.

Interface Type options

Form selected as the interface type

Click the button to Create the use case.

The Create button in the new use case dialog

After creation, you will be redirected to the canvas, which by default shows two nodes: Start and End.

Step 2: Configure the Start Node and Input Field

Open the Start node configuration.

The Start node configuration panel

Confirm that the default LLM configuration is set to GPTFast.

Add a new input field for the user’s question.

Adding a new input field to the Start node

  • Set the field name to Question.
  • Set the type to String.
  • Mark this field as Required, so the user must provide a question.

Click Save to store the Start node configuration.

The Save button in the Start node configuration

Step 3: Add and Position the Agent Node

Add an Agent node to the workflow by dragging it from the left-side panel onto the canvas. Place it between the Start and End nodes.

Dragging an Agent node from the left panel onto the canvas

The Agent node positioned between the Start and End nodes

Step 4: Configure the Agent Node

Open the configuration for the Agent node.

The Agent node configuration panel

Give the Agent node a descriptive Name.

The Agent node's Name field

Set the Role to something like: “Answer staff questions in plain language.”

The Role field describing what the agent should do

The Instructions field for the agent

Add clear Instructions for the agent, describing how it should answer questions.

Configure the Data Flow so the question from the Start node is passed into the Agent:

  • In Input Mappings, ensure the field Question is selected and mapped from the Start node’s input field.

Input Mappings, with the Question field mapped from the Start node

Define the Output Schema:

  • Add a new output field and set its name to Answer.

Output Schema, with an Answer field added

When all configurations are complete, click Create to save the Agent node settings.

The Create button that saves the Agent node settings

Confirm that the Agent node has been successfully added and configured on the canvas.

The configured Agent node on the canvas

Step 5: Review the End Node Configuration

Open the End node configuration and keep the default settings, as they are sufficient to output the response generated by the Agent.

The End node configuration with its default settings

Step 6: Run and Test the Workflow

Run the workflow to verify that it works as expected:

Click the Run button.

The Run button on the workflow

When prompted for input, enter a test question, for example: “What is the difference between a purchase order and an invoice?”

Execute the run and review the output.

Run output, with the Answer field populated by the model

You should see the Answer field populated with a concise response (for example, around fifty words) explaining the difference between a purchase order and an invoice.