Skip to main content
The user_approval method shows an approval card in the Narada browser UI and waits for the user to choose one of two buttons. Use this when a Python agent should not continue until a person explicitly approves or rejects the next action.
For a higher-level guide covering both human-in-the-loop methods, see Human-in-the-Loop Steps.

Method Signature

Parameters

str
required
A stable identifier for this approval step.
str
required
The message shown in the approval card.
str
required
The label for the button that returns True.
str
required
The label for the button that returns False.
int | None
default:"300"
Maximum time in seconds to wait for the user response. The default is 300 seconds, and the maximum is 3600 seconds.

Return Value

bool
True when the user clicks the approve button. False when the user clicks the reject button.
If the interaction is cancelled or aborted, the method raises UserAbortedError.

Example