Designing User Inputs & Forms

Learn how to design user input forms in MindStudio to collect contextual information for your AI workflows.

This guide walks you through how to build structured forms in MindStudio that allow your AI agents to collect valuable information from users. You’ll learn how to create user input blocks, define variable names, configure form fields, and reference them inside prompts.

Planning the Form

In this example, we’re building a blog post generator. To create a more personalized AI output, we’ll collect the following information from the user:

  • Blog topic

  • Desired tone/style

  • Target length (optional for this demo)

Creating a User Input Block

  1. Add a User Input block to your workflow.

  2. On the right-hand panel, click the + button to create your first input field.

Example: Collecting the Topic

  • Input Type: Short text

  • Variable Name: topic

  • Label Text: “What is the topic you'd like to write about?”

  • Help Text: “Hint: Keep it short”

  • Placeholder: e.g., dogs, cats, space, race cars

  • Test Value: dogs (useful for debugger testing)

Only the variable name and label are required. All other fields are optional but help guide the user experience.

Referencing Variables in Prompts

To use the user input in your AI prompt:

cssCopyEditWrite a blog post about the following topic:
<topic>{{ topic }}</topic>

Always wrap variables in double curly braces and surround them with custom tags for clarity and consistency.

Creating Multiple Inputs

To collect more information:

  1. Click the + next to the User Inputs folder in the left Explorer.

  2. Create a new variable named tone.

  3. Set the input type to Multiple Choice.

  4. Provide options such as:

    • Professional

    • Scientific

    • Playful

    • Somber

  5. Configure the label: “What is the preferred tone of the article?”

Connecting Additional Inputs to the Form

By default, new inputs created in the folder aren't added to the User Input block. To include them:

  • Open your User Input block

  • Click the + button

  • Select the tone variable and add it to the form

Using the Additional Variable

Update your prompt with the tone variable:

cssCopyEditMake sure to use the following tone:
<tone>{{ tone }}</tone>

This helps tailor the AI’s style based on user preference.

Testing Your Form

Click Preview to open a draft of your agent.

  • All inputs will appear on a single screen.

  • To split inputs across multiple screens, use multiple User Input blocks.

  • Enter test data (e.g., topic = space, tone = scientific) and proceed to see the generated blog post.

Summary

User Inputs are essential for gathering context that improves the relevance and quality of AI outputs. Key tips:

  • Define clear variable names

  • Use intuitive labels and help text

  • Include placeholder and test values where applicable

  • Always reference variables in prompts using {{ variable_name }} syntax and descriptive tags

User inputs can be created directly from blocks or from the folder. For multi-step forms, use multiple blocks to separate screens.

Keep experimenting with input types and layout to make your AI agents more interactive and tailored to user needs.

Last updated