Skip to content

Commit 444b53c

Browse files
authored
Merge pull request #45 from SachinAkash01/main
Refactor AI Agent Quickstart Guide
2 parents e2120a5 + 3ff7acd commit 444b53c

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

en/docs/quick-start-guides/deploy-your-first-ai-agent.md

+19-4
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,31 @@ This redirects you to the overview page of the AI Agent. Now, let's develop the
6161
2. In the Ballerina Integrator design view, click **Add Artifact**.
6262
3. Select **AI Chat Agent** from the Constructs menu. Since **AI Agent** has been chosen from the Devant console, other options are disabled.
6363
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 |
6881

6982
## Step 5: Push to Devant <!-- Todo Update this if this is supported by the Ballerina Integrator extension itself -->
7083
1. Click the **Source Control** icon on the sidebar.
7184
2. Click **+** to stage all changes.
7285
3. Add an appropriate commit message and commit.
7386
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.
7489

7590
## Step 6: Test and Consume AI Agent
7691
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

Comments
 (0)