Docs
AgentsPro

Agent ApprovalNew

An agent asks before it acts: the action, its risk and a preview of the change, then Allow once, Always allow or Deny.

$npx swiftpieces add AgentApprovalBlock

Needs a SwiftPieces Pro license: npx swiftpieces login first.

Open in the Pro library View pricing Live preview in every Pro style, and its source with SwiftPieces Pro.
ProPattern · AgentsiOS 17+Themed by Pro's design system
Type
AgentApprovalBlock
Inside
Action with a risk chip, Preview of the change, Allow once, always or deny, Optional countdown
Install, with a Pro license
npx swiftpieces add AgentApprovalBlock
Depends on
Pro's Design System, which installs with it

The permission prompt for an agent about to act. A card names the agent and tool with a tinted risk chip, states the action and why, counts down to an automatic deny when it has a deadline, and previews the change as an email, a list of affected items or a value before and after. Each answer runs your closure in place, and the block folds to a one-line outcome.

Its SwiftUI source comes with SwiftPieces Pro: Agent Approval in the Pro library.

All patterns →
SwiftPiecesPro

Build the whole app with one library.

Production-ready screens, whole flows, complete app templates, a Build Kit your agent follows and Pro remixing.

54 screens · 46 patterns · 48 flows · 12 templates · 31 Build Kit skills

Explore Pro