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: generative-ai-agent-adk/adk-installation/adk_install.md
+27-21Lines changed: 27 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,50 +2,53 @@
2
2
3
3
## Introduction
4
4
5
-
This lab will take you through the steps needed to install ADK using python installer .We recommend to use *OCI DATA Science*based notebook to run the operation as it comes with all the necessary software in place,however we have added an optional steps to follow local machine for ADK client setup.
5
+
This lab will take you through the steps needed to install ADK using the Python installer. We recommend using an OCI Data Science-based notebook to run the operation, as it comes with all the necessary software in place. However, we have added optional steps to follow on a local machine for the ADK client setup.
6
6
7
7
Estimated Time: 30 minutes
8
8
9
9
10
10
11
11
## Task 1: Setup OCI Data Science notebook for **ADK** usage.
1. Open the notebook detail page and click *Open*.
33
+
6. Open the notebook detail page and click Open.
33
34
34
35

35
36
36
-
1. Provide credentials and multifactor auth when prompted.Wait for the notebook to be opened.
37
+
7. Provide credentials and multi-factor authentication when prompted.Wait for the notebook to open.
37
38
38
39

39
40
40
-
1. Click *extend* and extend the notebook timeout.
41
+
8. Click Extend and extend the notebook timeout.
42
+
41
43
42
-
**You can skip the next section and follow to Task 3**
44
+
**You can skip the next section and proceed to Task 3**
43
45
44
46
45
47
## Task 2: (Optional) Setup a local machine for **ADK** usage.
46
48
47
49
1. Python ADK requires Python 3.10 or later. Ensure you have the correct version of Python installed in your environment.
48
-
1. Follow below and installed *OCI* with *ADK*
50
+
51
+
2. Follow the steps below and install OCI with ADK:
49
52
50
53
```
51
54
<copy>
@@ -57,49 +60,52 @@ Estimated Time: 30 minutes
57
60
source <myenv>/bin/activate
58
61
</copy>
59
62
```
60
-
1. After you create a project and a virtual environment, install the latest version of ADK:
63
+
64
+
3. After you create a project and a virtual environment, install the latest version of ADK:
61
65
62
66
```
63
67
<copy>
64
68
pip install "oci[adk]"
65
69
pip install oci-cli
66
70
</copy>
67
71
```
68
-
1. Create an *API Signing Key* and store for further usage. Refer [here](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#two) for detailed steps.
72
+
4. Create an *API Signing Key* and store for it further usage. Refer [here](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#two) for detailed steps.
69
73
70
74
## Task 3: Validate ADK installation using OCI Data science.
71
75
72
-
1. Follow below steps if you are using a data science notebook.If not move to Task 4.
76
+
1. Follow the steps below if you are using a Data Science notebook.If not, move to Task 4
73
77
74
-
* Click File > New >Notebook.
78
+
* Click File > New >Notebook.
75
79
76
80

77
81
78
-
1. Rightclick on Untitled notebook and rename the same.
82
+
2. Right-click on the untitled notebook and rename it.
79
83
80
84

81
85
82
-
1. Run below and validate it returns the correct name reference.
86
+
3. Run the following and validate that it returns the correct name reference.
83
87
84
88
```
85
89
<copy>
86
90
from oci.addons import adk
87
91
adk.__name__
88
92
</copy>
89
93
```
90
-

91
94
92
-
## Task 3: Validate ADK installation for local setup.
Copy file name to clipboardExpand all lines: generative-ai-agent-adk/agent-config/agentconfig.md
+22-19Lines changed: 22 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@
2
2
3
3
## Introduction
4
4
5
-
This lab will take details the steps to configure Agent using the tools that created.It will also provide the steps to add additional clientside tools such as Custom tools using function as well as integration with *Model Context Protocol- MCP*.
5
+
This lab details the steps to configure an Agent using the tools that were created.It also provides steps to add additional client-side tools, such as custom tools using functions, as well as integration with Model Context Protocol- MCP.
6
6
7
7
## Task 1: Import ADK modules.
8
-
The tasks imports various ADK python modules as well as some of the optional libraries for our usage.All these instructions works for python script as well as OCI Data science notebooks.
8
+
This task imports various ADK Python modules as well as some optional libraries for our usage.All these instructions work for Python scripts as well as OCI Data Science notebooks.
9
9
10
10
1. Add below to the notebook cell.
11
11
@@ -23,7 +23,8 @@ The tasks imports various ADK python modules as well as some of the optional lib
23
23
from mcp.client.session_group import StreamableHttpParameters
24
24
</copy>
25
25
```
26
-
1. Add below snippet for enabling async run for notbook.
26
+
27
+
2. Add the below snippet to enable async run for the notebook.
27
28
28
29
```
29
30
<copy>
@@ -33,20 +34,22 @@ The tasks imports various ADK python modules as well as some of the optional lib
33
34
```
34
35
35
36

36
-
1. For notebook,you may use the *Play* button and run these commands.For python script ,you may use your editor or run using *python scrip.py* format.
37
+
38
+
3. For notebooks, you may use the Play button and run these commands. For Python scripts, you may use your editor or run using the python script.py format.
37
39
38
40
39
41
## Task 2: Define variables.
40
42
41
-
1. Define variables for agent endpoint and RAG knowledge based IDs.
43
+
1. Define variables for the agent endpoint and RAG knowledge base IDs.
42
44
43
45
```
44
46
<copy>
45
47
agent_endpoint="endpoint OCID"
46
48
knowledge_id="knowledgeBase OCID"
47
49
</copy>
48
50
```
49
-
1. Define instructions for agents.
51
+
52
+
2. Define instructions for agents.
50
53
51
54
```
52
55
<copy>
@@ -63,7 +66,7 @@ The tasks imports various ADK python modules as well as some of the optional lib
63
66
64
67
## Task 3: Define a custom tool based on function.
65
68
66
-
1. Use below code to set a simple custom functionbased tool,which will return the season based on a location.
69
+
1. Use the below code to set a simple custom function-based tool,which will return the season based on a location.
67
70
68
71
```
69
72
<copy>
@@ -92,13 +95,13 @@ The tasks imports various ADK python modules as well as some of the optional lib
92
95
93
96

94
97
95
-
## Task 4: Define mcp call using stdIO mode.
98
+
## Task 4: Define MCP call using stdIO mode.
96
99
97
-
* We are using an opensource mcp library to fetch information from public internet.
100
+
* We are using an open-source MCP library to fetch information from the public internet.
98
101
* The library details and credit goes to https://github.com/openbnb-org/mcp-server-airbnb.
99
-
* If you are using local client execution ,ensure nodejs and npx is available for run.
102
+
* If you are using local client execution, ensure Node.js and npx are available to run.
100
103
101
-
1. Copy the below to notebook or local script to define the MCP.
104
+
1. Copy the below to a notebook or local script to define the MCP.
102
105
103
106
```
104
107
<copy>
@@ -114,9 +117,9 @@ The tasks imports various ADK python modules as well as some of the optional lib
114
117

115
118
116
119
117
-
## Task 5: Connect Knowledge base to the RAG too.
120
+
## Task 5: Connect Knowledge Base to the RAG tool.
118
121
119
-
1. Connect knowledge base id and RAG tool with the agent.To do so copy below snippet and pase to the notebook or python script.
122
+
1. Connect the knowledge base ID and RAG tool with the agent.To do so, copy the below snippet and paste it into the notebook or Python script.
120
123
121
124
```
122
125
<copy>
@@ -133,7 +136,7 @@ The tasks imports various ADK python modules as well as some of the optional lib
133
136
134
137
## Task 6: Define an agent and connect with the tools.
135
138
136
-
1. Use below snippet to define an agent along with the tools.You need to update the placeholders accordingly.
139
+
1. Use the below snippet to define an agent along with the tools.You need to update the placeholders accordingly.
137
140
138
141
```
139
142
<copy>
@@ -167,11 +170,11 @@ The tasks imports various ADK python modules as well as some of the optional lib
167
170
168
171
169
172
170
-
## Task 7: Initialize and setup the agent.
171
-
During the process the ADK will check the tools defined and associate with the Agent.
172
-
The process may take several minutes depends on the tools and their configuration.
173
+
## Task 7: Initialize and set up the agent.
174
+
During the process, the ADK will check the tools defined and associate them with the Agent.
175
+
The process may take several minutes depending on the tools and their configuration.
173
176
174
-
1. Run below to setup and run a sample query.A setup process is only needed for the first time or for any configuration changes that needs to push from local or notebook to agents.You may update your query as well.
177
+
1. Run the below to set up and run a sample query. The setup process is only needed for the first time or for any configuration changes that need to be pushed from the local environment or notebook to agents.You may update your query as well.
175
178
176
179
```
177
180
<copy>
@@ -183,7 +186,7 @@ The process may take several minutes depends on the tools and their configuratio
183
186

184
187
185
188
186
-
1. Wait for the execution to complete and validate the result.A result would look like as below.
189
+
2. Wait for the execution to complete and validate the result.A result would look like the one below.
Copy file name to clipboardExpand all lines: generative-ai-agent-adk/agent-run/agentrun.md
+16-12Lines changed: 16 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,12 @@
2
2
3
3
## Introduction
4
4
5
-
This lab will take provide various run modes with the *Agent* we have configured.
5
+
This lab will provide various run modes with the Agent we have configured.
6
+
6
7
7
8
## Task 1: Run a query using RAG tool.
8
9
9
-
1. Run below query to fetch answers from OCI Agent RAG tool based on the knowledge base attached.
10
+
1. Run the query below to fetch answers from the OCI Agent RAG tool based on the attached knowledge base.
10
11
11
12
```
12
13
<copy>
@@ -15,14 +16,14 @@ This lab will take provide various run modes with the *Agent* we have configured
15
16
response.pretty_print()
16
17
</copy>
17
18
```
18
-
* The agent will run and share the information based on the RAG too.
19
19
20
+
The agent will run and share the information based on the RAG tool.
20
21
21
22

22
23
23
24
## Task 2: Validate SQL tool execution.
24
25
25
-
1. Run below query to fetch information via agent ,which will fetch and report the information from OCI Autonomous Data Base.
26
+
1. Run the query below to fetch information via the agent, which will retrieve and report the data from the Autonomous AI Database.
26
27
27
28
```
28
29
<copy>
@@ -31,13 +32,13 @@ This lab will take provide various run modes with the *Agent* we have configured
31
32
response.pretty_print()
32
33
</copy>
33
34
```
34
-
* Here the query about secondary category will translate to product subcategory based on the column description that we defined during SQL Tool setup.
35
+
* Here, the query about the secondary category will be translated to the product subcategory based on the column description defined during SQL tool setup.
35
36
36
37

37
38
38
-
## Task 3: Validate function exeuction.
39
+
## Task 3: Validate function execution.
39
40
40
-
1. Run below to understand how agent reacts based on the function tool we defined.
41
+
1. Run the command below to see how the agent reacts based on the function tool we defined.
41
42
42
43
```
43
44
<copy>
@@ -49,8 +50,10 @@ This lab will take provide various run modes with the *Agent* we have configured
49
50

50
51
51
52
## Task 4 : Sample agent run using OCI SDK.
52
-
Here we are using OCI python SDK to run the agent endpoint and fetch results.
53
-
1. Use below snippet to fetch results using OCI SDK.You may comment/uncomment the Auth section/Region and endpoint details accordingly.
53
+
54
+
Here we are using the OCI Python SDK to run the agent endpoint and fetch results.
55
+
56
+
1. Use the snippet below to fetch results using the OCI SDK. You may comment/uncomment the Auth section, region, and endpoint details accordingly.
54
57
55
58
```
56
59
<copy>
@@ -114,13 +117,14 @@ Here we are using OCI python SDK to run the agent endpoint and fetch results.
114
117
```
115
118

116
119
117
-
1. A sample execution result will be as follows.Its for demo purpose only and the same can be achieved using ADK .As you may refer the SDK goes at a lower API level while ADK remains at the upper layer.
120
+
2. A sample execution result will be as follows. It is for demo purposes only, and the same can be achieved using ADK. As you may observe, the SDK operates at a lower API level, while ADK remains at a higher abstraction layer.
118
121
119
122

120
123
121
124
122
-
## Task 5 : Additional samples.
123
-
* You may refer [here](https://docs.oracle.com/en-us/iaas/Content/generative-ai-agents/adk/api-reference/examples.htm) for additional samples and can run against the setup.
125
+
## Task 5 : Additional samples
126
+
127
+
* You may refer [here](https://docs.oracle.com/en-us/iaas/Content/generative-ai-agents/adk/api-reference/examples.htm) for additional samples and run them against your setup.
0 commit comments