You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/docs/quick-start-guides/deploy-your-first-ai-agent.md
+19-4
Original file line number
Diff line number
Diff line change
@@ -61,16 +61,31 @@ This redirects you to the overview page of the AI Agent. Now, let's develop the
61
61
2. In the Ballerina Integrator design view, click **Add Artifact**.
62
62
3. Select **AI Chat Agent** from the Constructs menu. Since **AI Agent** has been chosen from the Devant console, other options are disabled.
63
63
4. Provide the name of the Agent as `MathTutor` and click **Create**. This directs you to the AI Chat Agent diagram view.
64
-
5. From the left side panel, add a new function. Name it as `multiply`. Add two `decimal` parameters and a `decimal` return type. Add a return node with the expression `a * b`.
65
-
6. In the Agent box, click the plus icon to create a tool. Select the `multiply` function you just created.
66
-
7. Edit the agent and add 'Math Tutor' as role and an appropriate set of instructions. Eg: "You are a school math tutor assistant. Use the tools to provide answers to students' questions".
67
-
64
+
5. From the left side panel, create a new function. Name it as `mult`.
65
+
6. Create two `decimal` parameters, `a` and `b` as the **Function parameters**.
66
+
7. Set the **Return Type** as `decimal` and click **Create**.
67
+
8. Click the plus icon after the **Start** node to open the node panel.
68
+
9. Select **Return** and enter the **Expression** as `a * b`.
69
+
10. In the Agent box, click the plus icon to create a tool and click the **+ Create New Tool** on the right panel.
70
+
11. Select the `mult` function you just created under **Current Integrations**.
71
+
12. Provide the **Tool Name** as `getMult` and click **Save Tool**.
72
+
13. Click the agent box and enter `Math Tutor` as the role and enter the instructions as ***"You are a school tutor assistant. Provide answers to students' questions so they can compare their answers. Use the tools when there is query related to math".*** Then click on save.
73
+
14. From the left side panel, click **Configurations**, and add the following configurables,
74
+
75
+
| Variable | Type |
76
+
|-------------------|----------|
77
+
| apiKey | string |
78
+
| apiVersion | string |
79
+
| deploymentId | string |
80
+
| serviceUrl | string |
68
81
69
82
## Step 5: Push to Devant <!-- Todo Update this if this is supported by the Ballerina Integrator extension itself -->
70
83
1. Click the **Source Control** icon on the sidebar.
71
84
2. Click **+** to stage all changes.
72
85
3. Add an appropriate commit message and commit.
73
86
4. Click **Sync Changes** to push the changes to remote.
87
+
5. Go back to the **Design** view using the back arrow on the top left coner.
88
+
5. From the right side panel, click the **View in Devant** to view this integration in Devant.
74
89
75
90
## Step 6: Test and Consume AI Agent
76
91
1. Once you push the changes, the overview page of the Devant AI Agent will automatically refresh and show you the **Latest Commit** and automatically builds and shows the **Build Status**.
0 commit comments