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
1. Go to the Overview page of the integration you have created and click **Develop in Ballerina Integrator**. This will clone your project and open it in Ballerina Integrator.
69
-
2. In the Ballerina Integrator design view, click **Add Artifact**.
70
-
3. Select **AI Chat Agent** from the Constructs menu. Choosing the **AI Agent** from the Devant console disables the other options.
71
-
4. Provide the name of the Agent as `MathTutor` and click **Create**. This directs you to the AI Chat Agent diagram view.
72
-
5. Click the OpenAI icon in the diagram view to configure the LLM model, and add the following configurables:
73
-
74
-
| Field | Value |
75
-
|-------------------------|--------------------|
76
-
|**Select Model Family**|`AzureOpenAiModel`|
77
-
|**Variable Name**|`_mathTutorModel`|
78
-
|**API Key**|`apiKey`|
79
-
|**API Version**|`apiVersion`|
80
-
|**Deployment ID**|`deploymentId`|
81
-
|**Service URL**|`serviceUrl`|
82
-
83
-
6. Click **Save**.
84
-
85
-
<ahref="{{base_path}}/assets/img/get-started/deploy-your-first-ai-agent/initialize-agent.gif"><imgsrc="{{base_path}}/assets/img/get-started/deploy-your-first-ai-agent/initialize-agent.gif"alt="Initialize AI Agent"width="80%"></a>
86
-
87
-
7. From the left side panel, click **+** on the **Functions** to create a new function. Name it as `mult`.
88
-
8. Click **+ Add Parameter** and add two `decimal` parameters, `a` and `b`.
89
-
9. Set the **Return Type** as `decimal` and click **Create**.
90
-
10. Now, let's create the function return logic. Click the plus icon after the **Start** node to open the node panel.
91
-
11. Select **Return** and enter the **Expression** as `a * b`.
92
-
12. Click the source icon `(<\>)` in the top right corner to view the source code of the function.
93
-
13. Add the `isolated` keyword before the function definition to make it an isolated function.
94
-
95
-
<ahref="{{base_path}}/assets/img/get-started/deploy-your-first-ai-agent/add-function.gif"><imgsrc="{{base_path}}/assets/img/get-started/deploy-your-first-ai-agent/add-function.gif"alt="Initialize AI Agent"width="80%"></a>
96
-
97
-
14. Now, let's add the `mult` function as a tool to the AI Agent. Click `mathTutor` under **Entry Points** on the left navigation. This brings up the AI Agent diagram view.
98
-
15. In the Agent box, click the plus icon to create a tool and click **+ Create New Tool** on the right panel.
99
-
16. Select the `mult` function you just created under **Current Integrations**.
100
-
17. Provide the **Tool Name** as `getMult` and click **Save Tool**.
101
-
18. 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 **Save**.
102
-
19. From the left side panel, click **+** on the **Configurations**, and add the following configurables,
103
-
104
-
| Variable | Type |
105
-
|---------------------|------------|
106
-
|`apiKey`|`string`|
107
-
|`apiVersion`|`string`|
108
-
|`deploymentId`|`string`|
109
-
|`serviceUrl`|`string`|
110
-
111
-
<ahref="{{base_path}}/assets/img/get-started/deploy-your-first-ai-agent/add-tool.gif"><imgsrc="{{base_path}}/assets/img/get-started/deploy-your-first-ai-agent/add-tool.gif"alt="Add as a Tool"width="80%"></a>
67
+
## Step 4: Develop the AI Agent in VS Code
68
+
To build your AI Agent using Ballerina Integrator, refer to the [AI Agent Integration](https://wso2.github.io/docs-bi/learn/ai-agent-integration) guide on the Learn page.
112
69
113
70
## Step 5: Push to Devant
114
71
1. Click the **Source Control** icon on the sidebar.
@@ -125,9 +82,10 @@ This redirects you to the overview page of the AI Agent. Now, let's develop the
125
82
The build process may take some time. Once complete, the build status changes to **Success**. You can see the Build History by clicking **Build** in the left navigation.
126
83
127
84
2. Once the **Build Status** shows `Build completed`, it will be automatically deployed into the development card.
128
-
3. Send the prompt `What is 2343282 * 392011` to test your Math Tutor agent. Even though typically LLMs are bad at large multiplication, this agent has tool support to give an accurate answer.
85
+
3. Then, click the **Configure to Continue** button, enter the configurable values, and click **`Apply`**.
86
+
4. Send the prompt `What is 87,657 * 67,997` to test your Math Tutor agent. Even though typically LLMs are bad at large multiplication, this agent has tool support to give an accurate answer.
0 commit comments