
Ask File example
Available Ask APIs
Text Input
Ask the user for a string input.
File
Ask the user to upload a file.
Action
Ask the user to pick an action.
Element
Ask the user to complete a custom form.
Interactive Consent-Gated Forms
TheAskElementMessage
API enables agents to send interactive, consent-gated UI components to users. This feature is particularly useful for:
- Compliance workflows where explicit user consent is required
- Data review scenarios where users need to review and modify AI-generated data
- Form completion with pre-filled values for user confirmation
- Audit trails for sensitive operations
- Agent calls a consent-gated tool (e.g., expense logging API)
- Backend sends a CustomElement to the frontend with editable fields and timeout
- User modifies or confirms the pre-filled values and submits
- Backend receives the updated props and proceeds with the tool call using user-approved data

Ask Element example