Documentation / How-to guides
Add an AI step with sign-off
Let an agent propose a result in a workflow, and have a person approve it before the workflow acts on it.
Applies to Glyphox 1.0.10
Before you begin
- A solution with at least one role and one agent, for example the Acme Service Desk sample.
- A workflow whose inputs include the record the agent works on. In the sample, Ticket Escalation receives
ticketId. - A model the agent can reach. The sample's agents use a locally hosted Ollama model.
In this pattern the agent proposes and the workflow acts. The agent's result waits in the instance while a person decides, and only an approved result reaches your data. The workflow built here has this shape: Start, Agent Task, Approval, then a Service Call that applies the result, and End.
Step 1: Prepare the agent
Open the agent in the agent editor. Connect it only to what it needs to read, so that it makes no change itself. A Data connector reads a table's records and writes nothing unless Allow creating records is selected.
In the agent's Properties, describe the result in Output format, for example { "reply": string }. The next steps then read each field of the result by name. The sample's Reply Drafter is an agent of this kind: it reads the ticket and the knowledge notes and returns a reply.
Step 2: Add the Agent Task
Open the workflow in the workflow editor. Drag Agent Task from the toolbox onto the canvas. A node dropped onto a connection is inserted into it.
In Properties, select the Agent. Give each of its Inputs a value from the workflow, such as {{ticketId}}, and enter an Output variable, such as draft.

The instance waits while the agent runs and continues with the agent's result in the output variable. A run that does not complete fails the step, and the instance stops there.
Step 3: Add the sign-off
Add an Approval node after the Agent Task and connect the Agent Task to it. In Properties, set its Title, which the Task Inbox shows, and select the Assignee role. Everyone with that role sees the task, and any of them can complete it.
The Approval's Outcomes are approved and rejected by default. To show the proposal to the approver, set Page to an external link of the module and give its parameters values from the workflow, such as {{ticketId}}. The Task Inbox then shows Open beside the task.
To let the approver correct the proposal, add a form field under Form fields. The value the approver enters is added to the instance's variables when the task is completed, so the next step can read it.
Step 4: Connect the outcomes
Each outcome is a connection point on the Approval node, shown with the outcome's name. Connect approved to a Service Call whose action applies the result, with inputs that read it, such as {{draft.reply}}. Connect rejected to an End node.
Connect every outcome. When a person chooses an outcome that has no connection, the instance fails at the Approval.
Step 5: Set a due time
Set Due in (minutes) on the Approval. In the toolbar, open Settings and add an escalation rule: after a number of minutes overdue, it runs an action, reassigns the task to another role, or both. Without a rule, an overdue task does not escalate.

Step 6: Run and test
Press F5 and start the workflow. In the sample, open a ticket and select Escalate, which starts Ticket Escalation.
On the application's sign-in page, open Sign in as a role… and sign in with the role the Approval is assigned to. Open the Inbox page and select the outcome.
In the Console, Workflows lists the instance, and Trail shows each step it took. Agents lists the agent's run, and Inspect shows how the agent reached its result.
Alternative: approve the agent's own changes
An agent can also make changes itself and wait for approval of each one. In the agent's Properties, Approval offers Before changes, which is the default, Every step and No approval. A run that needs an approval waits, and the platform administrator approves or rejects it in the Console under Agents. An Agent Task waits for that decision and then continues.
A Run Agent step in an action cannot wait for an approval, so an agent called from an action cannot make a change that needs one. Use an Agent Task when an agent's changes must be approved.
Related articles
The Agents overview, under Reference, describes everything an agent is made of. Add an approval step, in this section, covers human tasks and escalation in more detail.
If a step fails, see Troubleshoot the first run or contact support.