Skip to content

Commit 790dab5

Browse files
authored
docs(adk): update Application Integration Tools section in Google Cloud Tools (#513)
* Update "Application Integration Tools" in google-cloud-tools.md - Fixed b/425843277 and b/427619667 bugs. * Added required IAM roles in the prerequites with a note, linked them in subsections * Replaced service-account-credentials with service-account json - Fixed grammar and structure throughout the document. * Update google-cloud-tools.md * Update google-cloud-tools.md * Update google-cloud-tools.md
1 parent 32b0be6 commit 790dab5

File tree

1 file changed

+60
-52
lines changed

1 file changed

+60
-52
lines changed

docs/tools/google-cloud-tools.md

Lines changed: 60 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -136,35 +136,27 @@ you only need to follow a subset of these steps.
136136

137137
## Application Integration Tools
138138

139-
With **ApplicationIntegrationToolset** you can seamlessly give your agents a
140-
secure and governed to enterprise applications using Integration Connector’s
141-
100+ pre-built connectors for systems like Salesforce, ServiceNow, JIRA, SAP,
142-
and more. Support for both on-prem and SaaS applications. In addition you can
143-
turn your existing Application Integration process automations into agentic
144-
workflows by providing application integration workflows as tools to your ADK
145-
agents.
139+
With **ApplicationIntegrationToolset**, you can seamlessly give your agents secure and governed access to enterprise applications using Integration Connectors' 100+ pre-built connectors for systems like Salesforce, ServiceNow, JIRA, SAP, and more.
146140
147-
**Prerequisites**
141+
It supports both on-premise and SaaS applications. In addition, you can turn your existing Application Integration process automations into agentic workflows by providing application integration workflows as tools to your ADK agents.
148142
149-
1. [Install ADK](../get-started/installation.md)
150-
2. An existing
143+
### Prerequisites
144+
145+
1. [Install ADK](../get-started/installation.md).
146+
2. Use an existing
151147
[Application Integration](https://cloud.google.com/application-integration/docs/overview)
152148
workflow or
153149
[Integrations Connector](https://cloud.google.com/integration-connectors/docs/overview)
154-
connection you want to use with your agent
155-
3. To use tool with default credentials: have Google Cloud CLI installed. See
156-
[installation guide](https://cloud.google.com/sdk/docs/install#installation_instructions)*.*
157-
158-
*Run:*
159-
150+
connection you want to use with your agent.
151+
3. To use tool with default credentials, install the [Google Cloud CLI](https://cloud.google.com/sdk/docs/install#installation_instructions) and run the following commands:
152+
160153
```shell
161154
gcloud config set project <project-id>
162155
gcloud auth application-default login
163156
gcloud auth application-default set-quota-project <project-id>
164157
```
165-
166-
5. Set up your project structure and create required files
167-
158+
159+
4. Set up your project structure and create required files.
168160
```console
169161
project_root_folder
170162
|-- .env
@@ -173,39 +165,52 @@ agents.
173165
|-- agent.py
174166
`__ tools.py
175167
```
168+
When running the agent, make sure to run `adk web` in the `project\_root\_folder`.
176169
177-
When running the agent, make sure to run adk web in project\_root\_folder
170+
5. To get the permissions that you need to set up **ApplicationIntegrationToolset**, you must have the following IAM roles on the project (common to both Integration Connectors and Application Integration Workflows):
171+
172+
- `roles/integration.editor`
173+
- `roles/connectors.user`
174+
- `roles/secretmanager.secretAccessor`
175+
176+
> **Note:** For Agent Engine (AE), don't use `roles/integration.invoker`, as it can result in 403 errors. Use `roles/integration.editor` instead.
178177

179178
### Use Integration Connectors
180179

181180
Connect your agent to enterprise applications using
182181
[Integration Connectors](https://cloud.google.com/integration-connectors/docs/overview).
183182

184-
**Prerequisites**
185-
186-
1. To use a connector from Integration Connectors, you need to [provision](https://console.cloud.google.com/integrations)
187-
Application Integration in the same region as your connection by clicking on "QUICK SETUP" button.
183+
#### Before you begin
184+
> **Note:** The *ExecuteConnection* integration is typically created automatically when you provision Application Integration in a given region. If the *ExecuteConnection* doesn't exist in the [list of integrations](https://pantheon.corp.google.com/integrations/list?hl=en&inv=1&invt=Ab2u5g&project=standalone-ip-prod-testing), you must follow these steps to create it:
188185
186+
1. To use a connector from Integration Connectors, click **QUICK SETUP** and [provision](https://console.cloud.google.com/integrations)
187+
Application Integration in the same region as your connection.
189188
190189
![Google Cloud Tools](../assets/application-integration-overview.png)
190+
191+
191192
192-
2. Go to [Connection Tool](https://console.cloud.google.com/integrations/templates/connection-tool/locations/us-central1)
193-
template from the template library and click on "USE TEMPLATE" button.
193+
3. Go to the [Connection Tool](https://console.cloud.google.com/integrations/templates/connection-tool/locations/us-central1)
194+
template in the template library and click **USE TEMPLATE**.
194195
195196
196197
![Google Cloud Tools](../assets/use-connection-tool-template.png)
197198
198-
3. Fill the Integration Name as **ExecuteConnection** (It is mandatory to use this integration name only) and
199-
select the region same as the connection region. Click on "CREATE".
199+
4. Enter the Integration Name as *ExecuteConnection* (it is mandatory to use this exact integration name only).
200+
Then, select the region to match your connection region and click **CREATE**.
200201
201-
4. Publish the integration by using the "PUBLISH" button on the Application Integration Editor.
202+
5. Click **PUBLISH** to publish the integration in the <i>Application Integration</i> editor.
202203
203204
204205
![Google Cloud Tools](../assets/publish-integration.png)
206+
207+
205208
206-
**Steps:**
209+
#### Create an Application Integration Toolset
207210
208-
1. Create a tool with `ApplicationIntegrationToolset` within your `tools.py` file
211+
To create an Application Integration Toolset for Integration Connectors, follow these steps:
212+
213+
1. Create a tool with `ApplicationIntegrationToolset` in the `tools.py` file:
209214
210215
```py
211216
from google.adk.tools.application_integration_tool.application_integration_toolset import ApplicationIntegrationToolset
@@ -216,19 +221,19 @@ Connect your agent to enterprise applications using
216221
connection="test-connection", #TODO: replace with connection name
217222
entity_operations={"Entity_One": ["LIST","CREATE"], "Entity_Two": []},#empty list for actions means all operations on the entity are supported.
218223
actions=["action1"], #TODO: replace with actions
219-
service_account_credentials='{...}', # optional. Stringified json for service account key
224+
service_account_json='{...}', # optional. Stringified json for service account key
220225
tool_name_prefix="tool_prefix2",
221226
tool_instructions="..."
222227
)
223228
```
224229
225230
**Note:**
226231
227-
* You can provide service account to be used instead of using default credentials by generating [Service Account Key](https://cloud.google.com/iam/docs/keys-create-delete#creating) and providing right Application Integration and Integration Connector IAM roles to the service account.
228-
* To find the list of supported entities and actions for a connection, use the connectors apis: [listActions](https://cloud.google.com/integration-connectors/docs/reference/rest/v1/projects.locations.connections.connectionSchemaMetadata/listActions) or [listEntityTypes](https://cloud.google.com/integration-connectors/docs/reference/rest/v1/projects.locations.connections.connectionSchemaMetadata/listEntityTypes)
232+
* You can provide a service account to be used instead of default credentials by generating a [Service Account Key](https://cloud.google.com/iam/docs/keys-create-delete#creating), and providing the right [Application Integration and Integration Connector IAM roles](#prerequisites) to the service account.
233+
* To find the list of supported entities and actions for a connection, use the Connectors APIs: [listActions](https://cloud.google.com/integration-connectors/docs/reference/rest/v1/projects.locations.connections.connectionSchemaMetadata/listActions) or [listEntityTypes](https://cloud.google.com/integration-connectors/docs/reference/rest/v1/projects.locations.connections.connectionSchemaMetadata/listEntityTypes).
229234
230235
231-
`ApplicationIntegrationToolset` now also supports providing auth_scheme and auth_credential for dynamic OAuth2 authentication for Integration Connectors. To use it, create a tool similar to this within your `tools.py` file:
236+
`ApplicationIntegrationToolset` also supports `auth_scheme` and `auth_credential` for dynamic OAuth2 authentication for Integration Connectors. To use it, create a tool similar to this in the `tools.py` file:
232237
233238
```py
234239
from google.adk.tools.application_integration_tool.application_integration_toolset import ApplicationIntegrationToolset
@@ -270,7 +275,7 @@ Connect your agent to enterprise applications using
270275
connection="test-connection", #TODO: replace with connection name
271276
entity_operations={"Entity_One": ["LIST","CREATE"], "Entity_Two": []},#empty list for actions means all operations on the entity are supported.
272277
actions=["GET_calendars/%7BcalendarId%7D/events"], #TODO: replace with actions. this one is for list events
273-
service_account_credentials='{...}', # optional. Stringified json for service account key
278+
service_account_json='{...}', # optional. Stringified json for service account key
274279
tool_name_prefix="tool_prefix2",
275280
tool_instructions="...",
276281
auth_scheme=oauth_scheme,
@@ -279,7 +284,7 @@ Connect your agent to enterprise applications using
279284
```
280285
281286
282-
2. Add the tool to your agent. Update your `agent.py` file
287+
2. Update the `agent.py` file and add tool to your agent:
283288
284289
```py
285290
from google.adk.agents.llm_agent import LlmAgent
@@ -293,48 +298,51 @@ Connect your agent to enterprise applications using
293298
)
294299
```
295300
296-
3. Configure your `__init__.py` to expose your agent
301+
3. Configure `__init__.py` to expose your agent:
297302
298303
```py
299304
from . import agent
300305
```
301306
302-
4. Start the Google ADK Web UI and try your agent.
307+
4. Start the Google ADK Web UI and use your agent:
303308
304309
```shell
305310
# make sure to run `adk web` from your project_root_folder
306311
adk web
307312
```
308313
309-
Then go to [http://localhost:8000](http://localhost:8000), and choose
310-
my\_agent agent (same as the agent folder name)
314+
After completing the above steps, go to [http://localhost:8000](http://localhost:8000), and choose
315+
`my\_agent` agent (which is the same as the agent folder name).
316+
311317
312318
### Use App Integration Workflows
313319
314-
Use existing
320+
Use an existing
315321
[Application Integration](https://cloud.google.com/application-integration/docs/overview)
316322
workflow as a tool for your agent or create a new one.
317323
318-
**Steps:**
324+
#### Create an Application Integration Workflow Toolset
325+
326+
To create an Application Integration Toolset for Application Integration Workflows, follow these steps:
319327
320-
1. Create a tool with `ApplicationIntegrationToolset` within your `tools.py` file
328+
1. Create a tool with `ApplicationIntegrationToolset` in the `tools.py` file:
321329
322330
```py
323331
integration_tool = ApplicationIntegrationToolset(
324332
project="test-project", # TODO: replace with GCP project of the connection
325333
location="us-central1", #TODO: replace with location of the connection
326334
integration="test-integration", #TODO: replace with integration name
327335
triggers=["api_trigger/test_trigger"],#TODO: replace with trigger id(s). Empty list would mean all api triggers in the integration to be considered.
328-
service_account_credentials='{...}', #optional. Stringified json for service account key
336+
service_account_json='{...}', #optional. Stringified json for service account key
329337
tool_name_prefix="tool_prefix1",
330338
tool_instructions="..."
331339
)
332340
```
333341
334-
Note: You can provide service account to be used instead of using default
335-
credentials by generating [Service Account Key](https://cloud.google.com/iam/docs/keys-create-delete#creating) and providing right Application Integration and Integration Connector IAM roles to the service account.
342+
**Note:** You can provide service account to be used instead of using default
343+
credentials by generating [Service Account Key](https://cloud.google.com/iam/docs/keys-create-delete#creating) and providing right [Application Integration and Integration Connector IAM roles](#prerequisites) to the service account. For more details about the IAM roles, refer to the [Prerequisites](#prerequisites) section.
336344
337-
2. Add the tool to your agent. Update your `agent.py` file
345+
2. Update the `agent.py` file and add tool to your agent:
338346
339347
```py
340348
from google.adk.agents.llm_agent import LlmAgent
@@ -348,21 +356,21 @@ workflow as a tool for your agent or create a new one.
348356
)
349357
```
350358
351-
3. Configure your \`\_\_init\_\_.py\` to expose your agent
359+
3. Configure \`\_\_init\_\_.py\` to expose your agent:
352360
353361
```py
354362
from . import agent
355363
```
356364
357-
4. Start the Google ADK Web UI and try your agent.
365+
4. Start the Google ADK Web UI and use your agent:
358366
359367
```shell
360368
# make sure to run `adk web` from your project_root_folder
361369
adk web
362370
```
363371
364-
Then go to [http://localhost:8000](http://localhost:8000), and choose
365-
my\_agent agent (same as the agent folder name)
372+
After completing the above steps, go to [http://localhost:8000](http://localhost:8000), and choose
373+
` my\_agent` agent (which is the same as the agent folder name).
366374
367375
---
368376

0 commit comments

Comments
 (0)