Aller au contenu
Agentivity
Star on GitHub Commencer gratuitement

Let an agent ask a person before it decides

Ce contenu n’est pas encore disponible dans votre langue.

An agent can stop in the middle of its work and ask a person: a missing detail, a choice, or an approval. The execution waits, and continues when the person has answered. For this, the agent needs a channel: the way its question reaches the person.

The channels are in the Nodes catalog, under AI > Interactions.

ChannelWhere the person answers
Chat ChannelIn the chat of the execution, inside the Studio or inside an application built on Agentivity.
Forms ChannelIn a form.
Email ChannelBy e-mail.
Slack ChannelIn Slack.

This page uses Chat Channel, which needs no account elsewhere.

  1. Drag Chat Channel onto the canvas, below the agent.
  2. Drag from its diamond to the diamond of the agent named Human Loop Channel.
  3. Select Publish.

An agent has one channel only.

A channel makes the question possible. The instructions say when to ask. Be precise. For the Reminder Writer:

Before you give your final answer, show the e-mail to the person and ask whether it can be sent. If the person asks for a change, make it and ask again.

See Write the role and the instructions of an agent.

  1. Run the agent. See Run an agent and read its answer.
  2. When the agent asks, its question appears in the panel on the right, and the field at the bottom says Type your response…
  3. Type the answer and send it. The agent continues.

An execution that waits for a person has the label ACTION REQUIRED in the section Executions.

Sometimes an agent must always give its answer at once, without stopping. For example when it is one step of a workflow that already has its own approval step.

  1. Right-click AI Agent and select Edit.
  2. Open the tab Advanced.
  3. Under Interaction, turn off the setting “Allow this agent to ask the user a question and wait for a reply.”
  4. Select Apply, then Publish.

This setting is on at the start.

The window of the AI Agent node, tab Advanced: Creativity, the limits, the tool settings, and at the bottom the setting Interaction

When you run the agent, it stops, you see its question, and it continues after your answer.

  • An agent decides by itself when to ask, from its instructions. If an approval must happen every time, without exception, do not rely on an agent: put the agent in a workflow, with a step that waits for a person. See Ask a person to approve or answer.
  • Agentivity has no login, so it does not check who answers.

Run an agent and read its answer.