Skip to main content

Installation

Basic Usage

1. Import the SDK

2. Wrap Your Agent’s Actions

Add Form Fields

Present approvers with context and editable fields:

Auto-approve Rules

Automatically approve requests that meet certain criteria:

Handle Approval States

Add callbacks to handle approval states:

Multiple Approvers

Route approvals to specific team members:

Next Steps

View Examples

Explore industry-specific examples and patterns

Troubleshooting

Synchronous approvals default to a 20-second timeout. Adjust this with the syncTimeout option:
All approval functions throw standard errors that can be caught: