Skip to content

Latest commit

 

History

History
120 lines (67 loc) · 4.69 KB

workflow-generator.md

File metadata and controls

120 lines (67 loc) · 4.69 KB
description
Automatically generate your workflows with AI

Workflow Generator

The Workflow Generator feature in MindStudio is a powerful tool that simplifies the creation of AI Workers. By describing your desired outcome, the feature automatically generates a detailed workflow plan, complete with prompts, variables, automation steps, and custom functions.

{% embed url="https://www.loom.com/share/9fc1b9ec3a5c465f86014d8a996a5069?sid=95bceb22-4263-4c22-a6d4-66b70b00fd8f" %} Workflow Generator Tutorial {% endembed %}

How to use the Workflow Generator

Step 1: Access the Workflow Generator

  1. Open a new or existing project in MindStudio.
  2. Navigate to the bottom bar and select the Generate Workflow button.

Step 2: Describe your AI Worker

A modal will appear asking you to describe what you want your AI Worker to do. Click Generate to let MindStudio process your request.

Example:

Ask the user for their name and birthday, then write them a horoscope.

Step 3: View the AI Generated Workflow Proposal

Once the workflow is generated:

Left Panel: Displays a detailed plan of the workflow, including the system prompt, steps, and variable definitions.

Right Panel: Translates the plan into executable automation steps, complete with code and configurations.

Key components generated by AI:

  • System Prompt: Pre-configured text to guide the workflow.
  • Variables: Input fields like name and birthdate.
  • Custom Functions: Auto-generated JavaScript or Python functions, such as one to compute a zodiac sign from a birthdate.
  • Automation Steps: A preview of the blocks added to the workflow.

Step 4: Approve Proposal and Test

  1. If the generated workflow looks good, click Accept and Build.
  2. MindStudio will automatically construct the workflow on the canvas.

Step 5: Debug and Refine

  • Use the Debugger to analyze the execution of the workflow:
    • Review logs for actions, variable updates, and custom function outputs.
    • Identify and fix any issues or edge cases.
  • Refine the workflow by adjusting blocks, variables, or custom function code.
  • Use the preview mode to test the draft:
    • Input test data.
    • Observe the execution in real-time, including the generated outputs.

Important: Review Your AI Generated Builds

While the Generate Workflow feature in MindStudio is a powerful tool for automating workflow creation, it’s essential to review all generated outputs when accepting an auto-generated build. The feature uses AI to interpret your descriptions and generate workflows, but it is still prone to occasional errors or misconfigurations.


Potential Issues to Watch For

Incorrect or Missing Variable Connections

Variables used in prompts, automation blocks, or custom functions may not always be wired correctly.

Example: A variable like birthdate might be declared but not correctly referenced in a custom function or automation step.

Custom Function Errors

Auto-generated functions may contain logical gaps or mismatched input expectations.

Example: A function might expect a variable in one format (e.g., a string) but receive it in another (e.g., an object).

Incomplete Automation Steps

Sometimes, blocks may not be fully configured, leaving placeholders or missing settings.

Example: An API call block might not have the correct headers or endpoint set up.

Unclear Edge Case Handling

The workflow may not account for scenarios like invalid inputs, empty responses, or unexpected user behavior.


Best Practices

Thoroughly Review the Workflow Plan

Before clicking Accept and Build, carefully examine the generated plan, especially variable assignments, function configurations, and block connections.

Test Custom Functions

Use the test interface in the function editor to validate inputs, outputs, and logic. Adjust the code as necessary.

Run the Workflow in Preview Mode

Test the workflow with various inputs to identify gaps or inconsistencies in execution.

Use the Debugger

Analyze runtime logs to ensure all variables and blocks function as intended. Pay close attention to variable updates and outputs.

Iterate on the Build

Treat the generated workflow as a scaffold. Refine and enhance it to meet your specific needs and address any issues.


Final Note

The Workflow Generator is designed to save time and provide a strong starting point, but human oversight is crucial. Always validate the output, refine where necessary, and ensure your workflows are robust and error-free before deploying them in production.