UiPath Documentation
activities
latest
false
Activités Integration Service
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.

Invoke an Agent

Send a message to a remote Agent2Agent (A2A) agent from a Maestro agentic process and use the agent's response in later process steps.

Description​

This activity sends a message to a remote A2A agent and returns the agent's response, so the agent can take part in a process orchestrated by Maestro.

The agent answers in one of two ways:

  • Immediate reply: the agent returns a message, and the task completes with that message.
  • Long-running task: the agent returns a task. Integration Service polls the agent for the task status, and the task completes when the agent task reaches a final state. For details, refer to Agent 2 Agent events.

Prérequis​

Ajout de l'activité à un processus Maestro​

  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. Dans la section Implementation , de la liste déroulante Action , sélectionnez Start and wait for external agent.
  3. Select the Agent 2 Agent connector.
  4. Sélectionnez une connexion existante ou créez-en une nouvelle.
  5. From Activity, select Invoke an Agent.
  6. From Agent Skills, select the skill to use.
  7. In Message content, enter the message to send to the agent.

At runtime, Maestro sends the message to the agent and waits for the response before moving to the next step.

Configuration​

ChampDirectionDescription
Connexion (Connection)EntréeLa connexion établie dans Integration Service. Accédez au menu déroulant pour choisir, ajouter ou gérer des connexions.
Agent SkillsEntréeRequired. A skill from the Agent Card of the agent. Selecting a skill shows its description, examples, and parameters, to help you write the message.
Contenu du messageEntréeRequis. Le texte du message envoyé à l’agent.
RôleEntréeOptional. The role of the message sender, for example user.
Context identifierInput and outputOptional. The ID of an existing conversation context. Enter the Context identifier output of an earlier Invoke an Agent task to continue that conversation.
BlocageEntréeOptional. Whether to ask the agent for a synchronous reply instead of a long-running task.
Accepted output modesEntréeOptional. The response formats you accept, for example text.
History lengthEntréeOptional. The number of previous messages to include in the context.
MetadataInput and outputOptional. Key-value pairs for additional context or tracking information.
Current status stateSortieThe final state of the agent task, for a long-running task.
Status errorSortieError information, if the agent task failed.
ArtefactsSortieThe results produced by the agent task. Each artifact has an identifier, a name, and parts. The Artifact part text field holds the text of each part.
HistoriqueSortieThe messages exchanged in the task, with their role and text.

Utiliser la réponse de l’agent dans le processus​

Pour permettre à la réponse de l'agent d'influencer le processus, par exemple pour prendre une décision à la passerelle, affectez-la à une variable de processus.

  1. En mode Conception, sélectionnez la tâche de service sur le canevas.
  2. Sélectionnez Propriétés.
  3. Sous Sortie, sélectionnez Ajouter nouveau.
  4. Ajoutez une variable de type Chaîne, par exemple agent_response.
  5. For Value, select the field that holds the agent's answer from the task's response. For a long-running task, this is usually the Artifact part text field.
Astuce :

When a later step needs structured data, ask the agent to respond only with a JSON object, then parse the response in Maestro.

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

Connecter

Besoin d'aide ? Assistance

Vous souhaitez apprendre ? UiPath Academy

Vous avez des questions ? UiPath Forum

Rester à jour