Member Junction
    Preparing search index...

    Form definition for collecting structured user input.

    Agents can return this in their response to request information from users. The UI will render the form appropriately based on complexity:

    • Single question with buttongroup/radio and no title → Simple button UI
    • Everything else → Full form with title, validation, and submit button
    {
    "questions": [
    {
    "id": "choice",
    "label": "Which customer?",
    "type": {
    "type": "buttongroup",
    "options": [
    { "value": "cust-123", "label": "Acme Corp" },
    { "value": "cust-456", "label": "Acme Industries" }
    ]
    }
    }
    ]
    }
    {
    "title": "New Customer",
    "submitLabel": "Create Customer",
    "questions": [
    {
    "id": "name",
    "label": "Company Name",
    "type": { "type": "text", "placeholder": "Acme Corp" },
    "required": true
    },
    {
    "id": "revenue",
    "label": "Annual Revenue",
    "type": { "type": "currency", "prefix": "$" },
    "helpText": "Estimated annual revenue in USD"
    }
    ]
    }
    interface AgentResponseForm {
        description?: string;
        questions: FormQuestion[];
        submitLabel?: string;
        title?: string;
    }
    Index

    Properties

    description?: string

    Optional description/instructions for the form

    questions: FormQuestion[]

    Array of questions to ask the user

    submitLabel?: string

    Optional custom label for submit button (default: "Submit")

    title?: string

    Optional title shown at top of form