Get Started

Using AI Nodes (LLM)

Using AI Nodes (LLM)

Using AI Nodes (LLM)

The tutorial in the Beginner Guide covers the most fundamental yet essential steps for newcomers to Agentria.

In this tutorial, you will create and run an ability that inputs your name and birthday, then checks your ‘Today's Fortune’ generated by an LLM node.


Prerequisites


To begin, create a project in Agentria and enter the Ability Editor canvas.

Please refer to Step 1 (Project Creation and Editor Selection) of the 3-Step Core Guide for the Canvas entry procedure.


Upon completing this tutorial, you will be able to perform the following tasks:

  1. Add nodes

  2. Declare variables in the Start node

  3. Connect nodes

  4. Write prompts in the LLM node

  5. Pass the generated response from the LLM node to the End node

  6. Verify workflow execution results via Run Test


Step 1: Declaring Input Variables



The Agentria canvas is pre-configured with one Start node and one End node.

The Start node initiates the entire workflow, while the End node concludes it.

Therefore, to build the ‘Today's Fortune’ workflow, you must first declare the required variables at the Start node.

Double-clicking an Input node opens the node editor in a pop-up window, where you can declare variables by setting their data type, name, and description.



We will set the variables ‘Name’ and ‘Birthday’ as the information needed to check the fortune.

First, set the name variable's data type to String and save it as Name.

Second, set the birthday variable's data type to String and save it as BirthDay.

Once variable declaration is complete, return to the editor canvas.


Step 2: Adding Nodes via Drag and Drop



Now it's time to add the nodes that will generate your fortune.

Using the LLM node, you can generate output based on input values simply by writing a prompt.

Click the +Add Node button at the bottom of the canvas, then drag and drop the LLM node from the AI category onto the canvas.

This tutorial uses Azure OpenAI LLM.


Step 3: Connecting Nodes with Edge



To use the variables received at the Start node in the LLM node, you must connect the two nodes.

This connecting line is called an edge.

Connecting the right edge connector (Out-Connector) of the Input node to the left edge connector (In-Connector) of the LLM node transmits the input values to the LLM node.


Step 4: Writing System Prompts


Double-click the LLM node to open the node editor.

If Name and BirthDay appear in the Input area, the two nodes are connected correctly.

The LLM node includes a Credential Settings section, a system prompt creation area, a user prompt creation area, and a Detailed Settings section for adjusting performance and output characteristics.



In the system prompt field, write instructions specifying the role the AI should perform and the output format.

The more specifically you instruct the AI on its role and output rules, the higher the quality of the results.

Example:


You are the ‘Today's Horoscope Notifier’. Use positive and kind language.
This horoscope is for entertainment only and must include a final sentence suggesting that something better than expected awaits.

<p>Format:</p>
<ul>
<li>Today's Horoscope One-Line Summary</li>
<li>Detailed Daily Horoscope</li>
</ul>
<p>(Finance, Love, Health, Other)</p>


Step 5: Writing the User Prompts



The user prompt contains the request to pass input values.

Specifically, this is the step where data received from the Start node is passed to the AI.

Example:


Name:

<p>Birthday:</p>
<p>Using the above information, write today's fortune in approximately 100 characters.</p>
<p>Address the user by name in the first sentence. Example: “Hello, (Name).”<br>Based on their birthday, estimate their age and season of birth, then output a suitable fortune.</p>


Step 6: Bind Variables with Drag and Drop



In Agentria, you can easily import variables using drag and drop without writing any additional code.

Place the variables as follows.


Name : Name

BirthDay : BirthDay


Step 7: Declaring the LLM Output Variable



To connect to the End node for final output, you must declare an Output variable in the LLM node.

Set the data type to String and name the variable Fortune to complete all settings for the LLM node.

For this tutorial, proceed with the LLM node's detailed settings using the default values.


Step 8: Run a Single Test



After configuring the prompt, press the TEST button in the Input area to run a single test.

Node testing is a verification task that can be performed individually within the node editor.

By verifying that the node is correctly configured in this manner, connecting it to other nodes minimizes errors and ensures a stable flow.

If a fortune sentence outputs correctly after entering your name and birthday and running the test, the LLM node is configured correctly.


Step 9: Connecting the End Node



Now, pass the generated fortune result to the End node.

Return to the canvas and connect the LLM node to the End node with an edge.

Double-click the End node to open the node editor and add a String-type variable named Today.

Select or drag and drop the Fortune variable created by the LLM node to connect it to the Today variable.

This completes the ‘Today's Fortune’ generation workflow.


Step 10: Run the Entire Workflow with Run Test



Click the Run Test button in the lower-right corner of the canvas to execute the completed workflow.

Just like a single test, after entering your name and birthday and running the test, the Today output variable will display today's fortune result.


Output:<br>{<br>  "Today": "- <strong>Today's Horoscope One-Line Summary</strong>  \nGood energy surrounds you today, Joy—embrace opportunities with confidence and optimism.\n\n- <strong>Detailed Daily Horoscope</strong>  \nHello, Joy! At 23 years old, born in the heart of winter, your natural resilience shines bright today.  \n\n  - <strong>Finance</strong>: A small but meaningful financial opportunity may come your way—stay alert to seize it.  \n  - <strong>Love</strong>: Open communication will strengthen your connections. A kind word will go a long way.  \n  - <strong>Health</strong>: Your energy is steady, but remember to hydrate and give yourself a quiet moment to reflect.  \n  - <strong>Other</strong>: A surprise interaction or discovery could light up your day and inspire a new idea.  \n\n- <strong>Lucky Item</strong>: A cozy scarf or shawl—perfect for winter-born warmth.  \n- <strong>Encouraging Word</strong>: "You are capable of more than you know."  \n\nSomething better than you expect is just around the corner—stay hopeful! 🌟"<br>


Next Steps



🎉 Congratulations! You've completed your first Agentria workflow: Today's Fortune.

Now experiment with different inputs to see the results, and refine the LLM prompts to improve the workflow's performance.


Agentria is a space of possibilities where ideas become reality.

Your imagination can infinitely expand the workflow.


If you're curious about more introductory examples, check out the Beginner Guide page.