Get Started
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 and displays a simple ‘Today's Fortune’.
Prerequisites
To begin, create a project in Agentria and enter the Ability Editor canvas.
For the canvas entry procedure, please refer to 3-Step Core Guide.
Upon completing this tutorial, you will be able to perform the following tasks:
Add nodes
Declare variables in the Input node
Connect nodes
Write prompts in the LLM node
Pass the generated response from the LLM node to the Output node
Verify workflow execution results via Run Test
Step 1: Declaring Input Variables
The Agentria canvas is initially populated 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 BirthDate.
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 variables declared in the Input node within the LLM node, you must connect the two nodes.
This connecting line is called an edge.
Connecting the small edge port on the right side of the Input node to the left edge port of the LLM node transmits the value connected in the Input node to the LLM.
Step 4: Writing System Prompts
Double-click the LLM node to open the node editor.
If Name and BirthDate appear in the Input area, the two nodes are connected correctly.
The LLM node includes a Detailed Settings area where you can configure credential settings, write system prompts, write user prompts, and adjust 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:
Step 5: Writing the User Prompts
The user prompt contains the request to pass input values.
Specifically, this step involves passing the name and birthday received from the Input node to the AI.
Example:
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 Name variable to the right of the ‘Name: ’ field and the BirthDate variable to the right of the ‘Birthday: ’ field.
Step 7: Declaring the LLM Output Variable
To connect to the Output 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.
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 Output Node
Now, pass the generated fortune result to the Output 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 bottom-right corner of the canvas to execute the entire completed workflow.
Just like a single test, enter a name and birthday, then run the test. The result of today's fortune will appear in the Output.
Next Steps
Congratulations on completing your first Agentria workflow.
Moving forward, you can experiment with different inputs to observe the results and gradually refine your LLM prompts.
Agentria is a space of possibilities where ideas become reality.
Your workflow can expand infinitely with your imagination.
If you're curious about more introductory examples, check out the Beginner Guide page.