Skip to main content
Version: 1.0-beta

Gated Tools vs Durable Agentic Workflow

Gated tools and durable agentic workflows are two ways to keep a human in the loop: both let a person approve an AI agent's call before it runs. A gated tool adds a yes-or-no approval to an agent you already have. A durable agentic workflow goes further: it can wait days for a decision, ask the person for input, and record who decided. Use the tables below to compare what each one covers and what each costs to set up.

Capability comparison​

CapabilityGated ToolsDurable Agentic Workflow
Pause the agent before a tool runs, for a person to approve✓✓
Reject with a reason the agent reads and plans around✓✓
Pause survives a restart and resumes on another replica✓¹✓
Pause only some calls conditionally based on the proposed arguments✓✗
Add approval to an AI agent you already have✓✗
Runs in production without a workflow engine✓✗
Edit the proposed arguments before the call runs✗✓
Ask the person for a typed value, not just yes or no✗✓
A person fixes a step that failed✗✓
Choose who may answer, by role or user✗✓
Record who decided and when✗✓
Deadline on the decision✗✓
Reassign a decision or move its deadline✗✓
Approver inbox✗✓
Pause for a fixed duration, with no person involved✗✓
Wait for an event from another system✗✓
Retry a failed step automatically✗✓
Run history and execution graph✗✓

¹ With a durable memory store (see Infrastructure and setup below).

✗ means not built in. Some of these can be built with your own code.

Infrastructure and setup​

Gated ToolsDurable Agentic Workflow
Infrastructure requiredNone beyond the agent's memory storeTemporal
Setup effortTick Requires Approval on a tool you already haveStand up Temporal
Works today with no new infrastructure✓✗ (The module's own lightweight in-memory engine lets you try it with nothing installed, but it doesn't persist. Production needs Temporal)

If you only need a yes or no before a tool runs and don't want to run a workflow engine, start with gated tools. If you already run durable workflows, or need anything in the capability table above beyond a yes or no, use a durable agent instead. To create one, select Add Agent on the agentic integration's overview, then Create Durable Agent. See Build a Durable Agent for a walkthrough.

By default, gated tools need nothing beyond the agent itself. For a pause that survives a restart or resumes on another replica, attach a durable memory store: PostgreSQL, MSSQL, SQLite, Redis, or Amazon DynamoDB.

For a first try with nothing installed, durable agentic workflows can run on the ballerina/workflow module's own lightweight in-memory engine, though it doesn't persist. For a run that survives a restart, use Temporal: a local server for development, and self-hosted or cloud for production.