activities
latest
false
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。
UiPath logo, featuring letters U and I in white

Integration Service のアクティビティ

最終更新日時 2025年10月29日

Execute Google Vertex Agent

説明

Vertex AI Agents are autonomous software systems on Google Cloud's Vertex AI platform that use generative AI to understand, reason, plan, and complete tasks with users or other agents.

A core part of these agents is the Vertex AI Agent Engine, which provides a managed runtime for developing, deploying, and scaling agents in production.

This activity enables the use of agents deployed to the Agent Engine as participants in an automated process orchestrated by Maestro.

Creating the Vertex Agent

The ways in which you can deploy agents based on the Vertex AI Agent Engine are constantly evolving. Currently, this is a code-first configuration in Vertex AI. All frameworks supported by Agent Engine are supported by the Google Vertex connector. (e.g. google-adk). When a Vertex AI agent is successfully deployed, it is organized under a Google Cloud Project under Vertex AI > Agent Builder > Agent Engine. An agent that is ready for integration with UiPath must be visible with a resource name assigned under a URL such as this:

projects/771273109380/locations/us-central1/reasoningEngines/7522902537708503040projects/771273109380/locations/us-central1/reasoningEngines/7522902537708503040
In this example, the project ID is 771273109380.

In most Maestro scenarios, you prompt the agent to generate output in the form of a JSON structure. e.g. {"sku1": "9735A45", "sku2": "1735A50"}.

アクティビティの使用方法

このアクティビティを Maestro のエージェンティック プロセスで使用するには、以下の手順に従います。

  1. キャンバスにサービス タスク要素を追加し、タスクの [ プロパティ ] パネルを開きます。
  2. このサービス タスクの名前を Vertex Hello Worldとします。
  3. [ 実装 ] セクションの [ アクション ] ドロップダウン リストから、[ 外部エージェントを起動し、待機] を選択します。
  4. Select the Google Vertex connector.
  5. Select an existing connection or create a new one. For more information, see Google Vertex authentication.
  6. From Activity, select Execute Google Vertex Agent.

  7. From Agent Name, select an agent that you previously created in Vertex AI (e.g. ORDERS_AGENT). Please note that using the wrong service account key will result in you getting a dropdown that includes unexpected agents or no agents at all.

  8. in the Message field, enter "What can you do?". Make sure to include the quotes in the prompt.
  9. In the User id field, enter user.
  10. 開始イベントをサービス タスクに接続し、サービス タスクをキャンバス上の終了イベント ノードに接続します。

  11. Select Debug to run this process. After a successful run, review the Global variables and look for the {:} response from the source Vertex. Take note of the structure of the reply. For example, this is the agent's response to the prompt "What can you do?":

    {
      "usage_metadata": {
        "candidates_token_count": 404,
        "thoughts_token_count": 46,
        "total_token_count": 1229,
        "prompt_tokens_details": [
          {
            "token_count": 779,
            "modality": "TEXT"
          }
        ],
        "traffic_type": "ON_DEMAND",
        "candidates_tokens_details": [
          {
            "token_count": 404,
            "modality": "TEXT"
          }
        ],
        "prompt_token_count": 779
      },
      "author": "loan_eligibility_agent",
      "invocation_id": "e-a496b1b8-fb54-4120-9aa2-7fac34e1d04d",
      "session_id": "3080378032481894400",
      "id": "26G1y9He",
      "content": {
        "parts": [
          {
            "text": "I am a loan eligibility evaluation agent. My primary function is to assess whether a loan applicant is eligible for approval based on a predefined set of criteria.\n\nHere's what I can do:\n\n1.  **Receive Loan Application Details:** I expect loan application details in a JSON format. If I don't receive it, I will prompt you to provide it.\n2.  **Evaluate Against Criteria:** I will evaluate each field in the provided JSON against specific eligibility criteria, which include:\n    *   Age (21-60)\n    *   Employment status and duration (employed, min 12 months)\n    *   Monthly net income (min $2,500 USD)\n    *   Credit Score (min 650)\n    *   Debt-to-Income Ratio (monthly obligations <= 40% of income)\n    *   Residency Status (legal resident/citizen)\n    *   Loan Purpose (specific allowed purposes, no disallowed ones)\n3.  **Determine Eligibility:** Based on the evaluation, I will determine one of three outcomes:\n    *   `eligible`: If all standard criteria are met.\n    *   `not eligible`: If one or more core criteria are failed, and no compelling justification is provided.\n    *   `manual review: other_criteria`: If one or more core criteria are failed, but an \"other_criteria\" explanation is provided that might justify an exception (e.g., medical hardship, protected populations, employment transition).\n4.  **Provide Justification:** For every determination, I will provide a detailed explanation outlining how the decision was reached, referencing the specific parameters from the eligibility criteria and the applicant's data.\n5.  **Output in JSON:** My final output will always be a JSON object containing the `determination` and `justification`.\n\nEssentially, I automate the initial screening process for personal loan applications according to established rules."
          }
        ],
        "role": "model"
      },
      "timestamp": 1758552780.125623
    }{
      "usage_metadata": {
        "candidates_token_count": 404,
        "thoughts_token_count": 46,
        "total_token_count": 1229,
        "prompt_tokens_details": [
          {
            "token_count": 779,
            "modality": "TEXT"
          }
        ],
        "traffic_type": "ON_DEMAND",
        "candidates_tokens_details": [
          {
            "token_count": 404,
            "modality": "TEXT"
          }
        ],
        "prompt_token_count": 779
      },
      "author": "loan_eligibility_agent",
      "invocation_id": "e-a496b1b8-fb54-4120-9aa2-7fac34e1d04d",
      "session_id": "3080378032481894400",
      "id": "26G1y9He",
      "content": {
        "parts": [
          {
            "text": "I am a loan eligibility evaluation agent. My primary function is to assess whether a loan applicant is eligible for approval based on a predefined set of criteria.\n\nHere's what I can do:\n\n1.  **Receive Loan Application Details:** I expect loan application details in a JSON format. If I don't receive it, I will prompt you to provide it.\n2.  **Evaluate Against Criteria:** I will evaluate each field in the provided JSON against specific eligibility criteria, which include:\n    *   Age (21-60)\n    *   Employment status and duration (employed, min 12 months)\n    *   Monthly net income (min $2,500 USD)\n    *   Credit Score (min 650)\n    *   Debt-to-Income Ratio (monthly obligations <= 40% of income)\n    *   Residency Status (legal resident/citizen)\n    *   Loan Purpose (specific allowed purposes, no disallowed ones)\n3.  **Determine Eligibility:** Based on the evaluation, I will determine one of three outcomes:\n    *   `eligible`: If all standard criteria are met.\n    *   `not eligible`: If one or more core criteria are failed, and no compelling justification is provided.\n    *   `manual review: other_criteria`: If one or more core criteria are failed, but an \"other_criteria\" explanation is provided that might justify an exception (e.g., medical hardship, protected populations, employment transition).\n4.  **Provide Justification:** For every determination, I will provide a detailed explanation outlining how the decision was reached, referencing the specific parameters from the eligibility criteria and the applicant's data.\n5.  **Output in JSON:** My final output will always be a JSON object containing the `determination` and `justification`.\n\nEssentially, I automate the initial screening process for personal loan applications according to established rules."
          }
        ],
        "role": "model"
      },
      "timestamp": 1758552780.125623
    }

エージェントの出力をプロセス変数に割り当てて、Maestro プロセスの進行状況に影響を与える必要があります。たとえば、Boolean 評価に基づいて決定を下す場合や、分類タスクの回答を使用する場合などです。

  1. デザイン モードで、デザイン キャンバスからエージェントを選択します。

  2. [プロパティ] を選択します。

  3. [出力] で [ 新規追加] を選択し、 agent_reponse という名前の String 型の変数を追加します。

  4. For Value, select Vertex Hello World > response (object) > Content (object) > Content text (string).

先端: 実際には、エージェントから選択した構造化された出力を指定し、式エディターを使用して Maestro 内で出力を評価し、プロセス フローに必要な出力の特定の部分を抽出します。

トラブルシューティングとチューニング

Beyond establishing connectivity, you should test prompts both in the Vertex workspace as well as from Maestro. This ensures you achieve the desired output that can best be consumed by Maestro, assigned to variables, and passed on to other actors in the process.

We recommend that detailed prompts remain within the system prompts of the agent within Vertex. The user prompt which is provided by Maestro to the agent at runtime should be brief and to the point. Its role is primarily to indicate the relevant variables needed by the agent to perform a specific tasks and generate an expected consistent output.

人間向けの出力 (エスカレーションの理由など) には、次のようなものがあります 人間にとって自然なテキストとして簡単に渡されます。に期待される出力 API/ロボット アクションは厳密に構成する必要があります。以下に、次のようなユーザー プロンプトを示します エージェントから特定の出力を生成します。Studio 内で C# の式エディターを使用する 変数を 必要。
"What is the quantity on inventory of Order ID " + vars.orderId_1 + "respond only with a JSON object with the quantity in the key Order_Quantity. No explanations, only JSON""What is the quantity on inventory of Order ID " + vars.orderId_1 + "respond only with a JSON object with the quantity in the key Order_Quantity. No explanations, only JSON"

エージェントは次のように返信します。

{"Order_Quantity":"100"}{"Order_Quantity":"100"}
エージェントへの要求と実際の応答の種類には特に注意してください。応答が JSON型のように見えても、実際には string型である可能性があります。

このページは役に立ちましたか?

サポートを受ける
RPA について学ぶ - オートメーション コース
UiPath コミュニティ フォーラム
Uipath Logo
信頼とセキュリティ
© 2005-2025 UiPath. All rights reserved.