MindStudio University
  • Documentation
  • Video Courses
  • Newsroom
  • Video Courses
  • 1: Core Building Principles
    • Intro to AI Agents & MindStudio
    • AI Editor Overview
    • Building Your First AI Agents
    • Building an AI Agent for the Chrome Extension
    • Testing & Debugging Basics
    • Designing User Inputs & Forms
    • How to Scrape Web Data for AI Agents
    • Chaining Multiple Blocks Together in AI Agent Workflows
    • How to Generate Content & Media with AI
    • How to Choose the Right AI Model
    • Prompt Writing 101
    • Using Integration Blocks to Connect to External Services
    • Creating & Using Data Sources
  • 2: Workflow Mastery
    • Building AI Agents that Run on a Schedule
    • Using Launch Variables & Global Variables in Workflows
    • Routing, Logic, & Checkpoint Blocks
    • Advanced Testing Using Evaluations
    • Running Blocks in Parallel for Workflow Optimization
    • Working with Structured Data (JSON)
    • Running Sub-Workflows to Iterate and Process Data With AI
    • Creating Dynamic User Inputs
    • How to Generate HTML Assets for Your AI Agents
  • Masterclass Sessions
    • AI Agent Zero to Hero Masterclass (Beginner)
    • AI Agent Monetization Masterclass
    • AI for Content Marketing Masterclass
    • Deep Research Masterclass
    • AI Agents In-Depth Masterclass
    • AI Agents for Partnerships Masterclass
Powered by GitBook
On this page
  • Scenario: Extracting Entities from a Scraped URL
  • Adding a Dynamic User Input Block
  • Advanced Use Case: Refining Research Topics
  • Example: Deep Research Agent Flow
  • Benefits of Dynamic Inputs
  • Summary
Export as PDF
  1. 2: Workflow Mastery

Creating Dynamic User Inputs

Learn to dynamically render user choices, gather additional context interactively, and enhance decision-making within your AI agents.

Last updated 1 day ago

Dynamic user inputs allow your AI workflows to adapt and respond to earlier outputs by presenting users with choices or prompts that reflect prior data. This approach makes your AI agents more interactive, relevant, and powerful.

Scenario: Extracting Entities from a Scraped URL

In a basic setup, you might scrape a URL and extract entities (e.g., people, organizations) mentioned in an article. The next step could involve presenting the user with these entities to choose one for further research.

To do this:

  1. Use a Generate Text block to return a list of entities in a specific JSON format.

  2. The JSON should be an array of objects, each with label and subtitle keys:

    jsonCopyEdit[
      { "label": "NASA", "subtitle": "Space agency mentioned in article" },
      { "label": "SpaceX", "subtitle": "Private aerospace company" }
    ]
  3. Save this as a variable, e.g., entities.

Adding a Dynamic User Input Block

  1. Add a User Input block.

  2. Select Text Choice.

  3. Set the prompt (e.g., "Which entity would you like to research further?").

  4. Under Dynamic Source, specify the variable holding your JSON (e.g., entities).

  5. The selected label will be stored as the input value.

This enables workflows to dynamically populate input options based on AI-generated data.

Advanced Use Case: Refining Research Topics

Sometimes user input is too broad (e.g., just entering "dogs"). To handle this, MindStudio offers a User Context block to gather deeper context through AI-generated questions.

How It Works:

  1. Collect a general topic input from the user.

  2. Use a User Context block:

    • Set the topic as input.

    • Provide a prompt like: "Help the user refine the topic they’d like to research. Gather more contextual information in order to perform a full research report."

    • Choose the Interview Depth (Quick, Medium, or Thorough).

    • Set a Maximum Question Limit.

    • Save the results in a variable, e.g., topicDetails.

  3. Use topicDetails downstream to:

    • Generate refined search queries

    • Provide detailed context to summarization or report-generation blocks

This results in much more specific, targeted output.

Example: Deep Research Agent Flow

  1. Collect topic from the user.

  2. Run a User Context block to gather more details.

  3. Use topicDetails to generate Google search queries.

  4. Scrape and summarize each result in sub-workflows.

  5. Aggregate findings and generate a detailed report.

This method creates highly accurate and contextual results.

Benefits of Dynamic Inputs

  • User-Adaptive: Tailors the experience based on AI or previous input

  • Flexible: Works with structured JSON or free-text context

  • Scalable: Enables detailed processing of dynamic lists or open-ended tasks

Summary

Use dynamic user inputs when:

  • The user's next step should be informed by previous AI outputs

  • You need to collect deeper, more relevant context

  • You want to make AI workflows more flexible and responsive

Dynamic inputs are essential for building smart, adaptive AI agents that can guide users and gather meaningful context in real time.