activities
latest
false
Important :
Veuillez noter que ce contenu a été localisé en partie à l’aide de la traduction automatique. La localisation du contenu nouvellement publié peut prendre 1 à 2 semaines avant d’être disponible.
UiPath logo, featuring letters U and I in white

Activités Integration Service

Dernière mise à jour 29 oct. 2025

Execute Google Vertex Agent

Description

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"}.

Comment utiliser l’activité

Pour utiliser cette activité dans un processus agentique Maestro, procédez comme suit :

  1. Ajoutez un élément de tâche de service à la zone de dessin et ouvrez le panneau Propriétés de la tâche.
  2. Nommez la tâche de service Vertex Hello World.
  3. Dans la section Implementation , de la liste déroulante Action , sélectionnez Start and wait for external agent.
  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. Connectez l'événement de début à la tâche de service et la tâche de service à un nœud d'événement de fin sur le canevas.

  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
    }

La sortie de l'agent doit être affectée à une variable de processus afin qu'il puisse influencer la progression du processus Maestro, par exemple pour prendre une décision basée sur une évaluation booléenne, ou pour utiliser la réponse d'une tâche de classification.

  1. En mode Conception, sélectionnez l'agent dans le canevas de conception.

  2. Sélectionnez Propriétés.

  3. Sous Sortie, sélectionnez Add new et ajoutez une variable de type String nommée agent_reponse.

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

Astuce : en pratique, spécifiez la sortie structurée de votre choix à partir de l'agent, puis évaluez la sortie dans Maestro à l'aide de l'éditeur d'expressions pour extraire la partie spécifique de la sortie dont vous avez besoin dans le type nécessaire pour votre flux de processus.

Dépannage et réglage

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.

La sortie qui est destinée aux humains, par exemple les raisons d’une escalade, peut être facilement passée en texte naturel pour l’humain. La sortie attendue pour une action d’API/robot doit être strictement composée. Voici un exemple de requête utilisateur qui fournit une sortie spécifique à partir d'un agent. Utilisez l’ éditeur d’expression C# dans Studio pour ajouter des variables selon vos besoins.
"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"

L'agent répondra avec les informations suivantes :

{"Order_Quantity":"100"}{"Order_Quantity":"100"}
Faites particulièrement attention aux saisies de votre demande à l’agent et à la réponse réelle. Même si la réponse ressemble à du type JSON, elle peut être de type string.

Cette page vous a-t-elle été utile ?

Obtenez l'aide dont vous avez besoin
Formation RPA - Cours d'automatisation
Forum de la communauté UiPath
Uipath Logo
Confiance et sécurité
© 2005-2025 UiPath Tous droits réservés.