Skip to content
Docs

How to add human approval to an agent

When an agent can call tools that change the outside world, you may want a person in the loop before those calls run. Publicus pauses the agent on a sensitive tool call, records a pending request, and waits for someone to approve or deny it. This guide shows you which tool calls pause, where the requests appear, and what happens to the run after a decision.

Publicus treats a tool call as sensitive when it can change something outside the flow. The following tools pause for approval before they run:

  • Channel sends: Channel / Slack, Channel / Discord, Channel / Teams, Channel / Telegram, Channel / WhatsApp.
  • Write API calls: Rest / Operation and OpenApi / Operation requests that are not read-only.
  • MCP server tools: tools exposed through an Mcp / Tools node.
  • Subflows that wrap a gated node: when a subflow contains any of the tools above, calling it pauses for approval too. Wrapping a sensitive tool in another flow does not bypass the gate.

Read-only tools (lookups, expressions, mapping, and similar) run without pausing. You do not wire anything extra onto the canvas. When an agent decides to call one of the gated tools, Publicus opens an approval request automatically and holds the call until it is resolved.

The list above is what pauses in the default mode. How much stops for you is set by the agent’s approval mode, described next.

An agent runs in one of four approval modes, which decide how much of its work stops for you. You choose the mode; the rules for each are fixed, so what pauses is always predictable. There is deliberately no “let the agent decide what is safe” mode — the agent reads untrusted content (fetched pages, tool results), so it is not the thing that should decide when the gate applies.

Mode What it does
Read-only The agent can research and plan, but nothing changes — write, delete, and external tools are not even offered to it, except the ones you list under May change things. A web page read stays: it reads the addresses in the message and in its search results, and is refused any other. Use it for an advisor or audit agent, for an agent your customers talk to, or to let a colleague explore safely.
Ask first (default) Every change asks you first. A step’s requests arrive bundled into one card, so you approve a batch of related edits in a single action instead of clicking through them one by one.
Auto-write Reversible changes inside your workspace (building and configuring a flow) run on their own, each recorded. Deletes, starting a run, and anything that leaves your workspace (messages, write API calls) still ask. This is how the AI flow builder ships.
Autopilot The agent acts without asking. A small protected set still stops for you: deleting credentials, filing anything that leaves your workspace, and going live. Every released call is still recorded as an audit trail.
  • On the agent — the Agent node has an Approval mode setting. This is the authoring default, and the only control for agents triggered headlessly (by a schedule, a webhook, or a chat channel) where no one is watching to approve. Under the setting, the node lists each tool wired to the agent and what the chosen mode does to it: runs, runs and is logged, asks first, is refused, or is not offered at all. When the answer differs between a chat and a run nobody chats in (asking the person, watching a run and following up only message someone or wait in the second), it shows both.

  • Per conversation — in the AI builder chat you can switch the mode for that conversation; it wins over the agent’s default.

  • Per workspace — an administrator can set a default mode and a ceiling: the most permissive mode anyone may choose. Setting the ceiling below Autopilot forbids unattended agents across the whole workspace.

    The Agent approval policy page on its Policy tab, with Default mode set to Ask first (built-in default), the Ceiling set to No ceiling, and Save policy
    The Agent approval policy page on its Policy tab, with Default mode set to Ask first (built-in default), the Ceiling set to No ceiling, and Save policy
  • Per tool — a tool node’s Approval setting is a three-way pin: inherit the mode, always ask (survives every mode, including Autopilot), or never ask (except the protected set).

    A tool node's Approval setting set to Always, with help saying that following the agent's approval mode is almost always right
    A tool node's Approval setting set to Always, with help saying that following the agent's approval mode is almost always right

Let a Read-only agent make one kind of change

Section titled “Let a Read-only agent make one kind of change”

An agent your customers talk to should mostly read, and change only what you chose: create a ticket, say, but never delete one. Set its mode to Read-only and pick those tools under May change things, in the Agent node’s More settings. The picker lists the tools wired to that agent that change something.

  • A listed tool still asks for approval before it runs, unless the tool itself is set to never ask. Set both when the agent should create tickets without waiting for you.
  • Every tool you did not list stays out of the agent’s reach, so no message can talk it into using one.
  • The list is ignored when the workspace’s ceiling is Read-only, and when someone switched a conversation to Read-only: both mean nothing changes.
  • Only a person can set the list, in the flow editor. The AI builder is refused if it tries.

Most agents only ever move between Ask first and Auto-write.

Approve once for the rest of a conversation

Section titled “Approve once for the rest of a conversation”

When you approve a batch in a chat in the app, you can also tick And allow routine changes for the rest of this conversation: a grant. Later reversible changes in the same conversation then proceed without asking, on your next messages too, each still recorded and pointing back at the grant that released it. Tests, messages and deletes still ask. A grant lasts as long as the conversation’s window (seven days), never covers the protected set or an always-ask tool, and is revocable from the Grants tab of Needs you.

The Grants tab on its Live view, listing a grant for lookup_carrier_rates that covers one run, given by Docs Writer, with its expiry and a Revoke action
The Grants tab on its Live view, listing a grant for lookup_carrier_rates that covers one run, given by Docs Writer, with its expiry and a Revoke action

When a gated tool call starts:

  1. Publicus creates a pending approval request for that exact call, including a preview of the arguments the agent wants to use.
  2. The run pauses on that call and waits for a decision.
  3. The run report shows the agent waiting on approval, with the pending request and its decision actions inline.
A waiting run with a pending approval badge, its Agent entry showing the tool call and an Approvals row with Approve and Deny
A waiting run with a pending approval badge, its Agent entry showing the tool call and an Approvals row with Approve and Deny

The argument preview is trimmed and redacted. Values whose names look like secrets (anything containing secret, token, password, key, or auth) are shown as [REDACTED], and long values are truncated, so a reviewer can judge the request without seeing sensitive data.

Open Needs you, the second row of the sidebar, under Home. It lists the requests still waiting beside everything else that waits on a person, and its amber count tells you at a glance when an agent needs you. You can approve or deny from there. See Needs you.

For every request, decided ones too, open the Approvals tab beside Needs you.

The Approvals tab on its Waiting view, each pending request with its tool, Risk badge, status, when it was requested, and Approve and Deny, under the Needs you, Approvals, Policy and Grants switch
The Approvals tab on its Waiting view, each pending request with its tool, Risk badge, status, when it was requested, and Approve and Deny, under the Needs you, Approvals, Policy and Grants switch

The Approvals table lists each request with:

  • Tool: the tool the agent wants to call, and under it what the agent wants to do, in a plain-language line when the agent stated one, otherwise the redacted, truncated arguments.
  • Risk: what the call would do, such as Deletes something or Leaves your workspace.
  • Status: pending, approved, denied, or expired.
  • Undoable: whether saying yes can be taken back.
  • Requested: when the agent raised the request, and under it when a waiting request times out if no one decides.

Three more columns are hidden until you turn them on in the column menu: Decision set (requests raised in the same agent step share a set, decided together), Run (the run the request belongs to) and Expires (the timeout as its own column, to sort on).

The Tool and Risk columns, with badges such as Reaches an outside system, Changes your workspace, Deletes something, Runs a flow for real and a locked Leaves your workspace
The Tool and Risk columns, with badges such as Reaches an outside system, Changes your workspace, Deletes something, Runs a flow for real and a locked Leaves your workspace

The table opens on the Waiting view. Destructive narrows it to waiting requests for tools that delete or overwrite, and Decided shows past requests, and so does Expired, which sits in the views menu rather than beside the tabs. The Approvals, policy and grants page describes every column and view.

The Approvals tab with its Destructive view selected
The Approvals tab with its Destructive view selected

Pending requests also appear directly on the run report, so you can decide without leaving the page you are watching. See Runs for the report itself.

Each pending row, in Needs you, in the Approvals table and inline on the run report, has two actions:

  • Approve: confirm the action and let the tool call run. Publicus asks you to confirm, then resolves the request.

  • Deny: block the call. Publicus asks for a reason (required) before it records the denial.

    The Deny dialog with a required Reason field, Submit and Cancel
    The Deny dialog with a required Reason field, Submit and Cancel

Both actions record who decided and when, alongside the reason for a denial, in the request’s audit trail. Open a request to see its full history on the view page.

A pending request's page with Approve and Deny in the header, its details, the arguments preview and the audit trail
A pending request's page with Approve and Deny in the header, its details, the arguments preview and the audit trail

By default any user in the workspace can decide. Set AGENT_APPROVALS_APPROVERS=admin to restrict decisions to administrators; the restriction applies everywhere a decision can be made, including the inline actions on the run report.

The agent run reacts to the decision as soon as it lands:

  • Approved: the tool call runs with the previewed arguments, and the agent continues with the result.
  • Denied: the tool call does not run. The agent is told the tool was denied and keeps going from there, so it can explain the outcome or try a different approach instead of crashing. If earlier tool calls in the same run already had side effects and those tools declare a compensating tool (see the Subflow node), Publicus rolls those side effects back before the agent continues.

If the agent repeats the exact same call (same tool, same arguments) within the same turn, Publicus reuses the existing decision rather than asking again. The same call in a later turn raises a fresh request, so a reviewer sees each new attempt.

A waiting agent does not hold anything open. The run suspends on the pending request, consuming no resources, and a decision resumes it automatically. You never need to re-run the flow: approve or deny whenever you get to it, and the agent picks up from the tool call.

A request stays decidable until its expires time. When that time passes without a decision, Publicus marks the request expired, treats the tool call as not approved, and wakes the suspended run (within about a minute of expiry) so the agent can continue and report the outcome.

You can tune these windows through environment configuration:

Setting What it controls Default
AGENT_APPROVALS_TTL_SECONDS How long a request stays decidable before it expires. 1800
AGENT_APPROVALS_AUTO_APPROVE_ON_EXPIRY When a request expires, approve it instead of treating it as not approved. false
AGENT_APPROVALS_AUTO_APPROVE Approve every request immediately, with no human decision. Requests are still recorded as an audit trail. false

AGENT_APPROVALS_AUTO_APPROVE is a deployment-wide break-glass switch that applies to every tenant. To let a specific agent act without asking, set its approval mode to Autopilot instead — it is scoped to that agent, still stops for the protected set, and stays visible in the workspace.

The red Break-glass is on banner, saying AGENT_APPROVALS_AUTO_APPROVE approves every gated tool call the moment it is requested while cards and the audit trail still appear
The red Break-glass is on banner, saying AGENT_APPROVALS_AUTO_APPROVE approves every gated tool call the moment it is requested while cards and the audit trail still appear
  1. Build an agent with a gated tool, such as a Channel / Slack send wired to the agent’s TOOL handle. See build an AI agent for the wiring.
  2. Run the flow with a prompt that makes the agent call that tool.
  3. Open Needs you and confirm an approval row appears for the tool call. The Approvals tab shows the same request with its tool name and an argument preview.
  4. Approve it and confirm the tool runs and the agent finishes. Run again, deny it with a reason, and confirm the tool does not run.