Skip to main content
Forms let you collect structured data from users during conversations. You can trigger forms programmatically from your application code, define forms client-side with custom schemas, or use server-side forms created in the dashboard.

Quick Start

Trigger a Server-Side Form

Forms created in the dashboard can be triggered by their tool name:

Trigger a Client-Side Form

Define and display forms entirely in your frontend code:

Form Schema Reference

Client-side forms are defined using a schema object:

Field Types

Field Definition

Validation Rules

Complete Examples

Contact Form

Lead Qualification Form

Appointment Booking

Dynamic Forms

Using registerFormSchema

Register form schema providers that generate forms dynamically based on context:
The agent can then trigger this form:

Context-Aware Pre-filling

Handling Submissions

Client-Side Callback

Send to Agent

When sendToAgent: true, the form data is also sent to the agent as a chat message:
The agent sees:

Triggering Patterns

On Page Load (Delayed)

On User Action

Exit Intent

Best Practices

Keep forms short. Each additional field reduces completion rates. Start with 2-3 essential fields.
  1. Progressive disclosure — Ask for minimal info first, then follow up for details
  2. Pre-fill when possible — Use identify() to pass user data for pre-filling
  3. Validate client-side — Use validation rules to catch errors before submission
  4. Provide context — Use title and description to explain why you need the info
  5. Handle errors gracefully — Throw errors in onSubmit to show error state in form

Next Steps

Custom Events

Trigger automations based on user actions

Identity

Pre-fill forms with user data