MindStudio Docs
  • Get Started
    • Overview
    • MindStudio Chrome Extension
    • Quickstart Guide
    • What is an AI Agent?
    • AI Agent Use Cases
  • Free vs. Paid AI Agents
  • Building AI Agents
    • Editor Overview
    • Workflow Generator
    • Writing Prompts
      • Templating
    • AI Models
    • Variables
      • Working with JSON
      • Using Handlebars Templating
    • Dynamic Variables
    • Data Sources
    • Automations
      • Start Block
      • Generate Text Block
      • Generate Image Block
      • Generate Chart Block
      • Generate Asset Block
      • Display Content Block
      • Text to Speech Block
      • Analyze Image Block
      • User Input Block
      • User Context Block
      • Query Data Block
      • Run Function Block
      • Scrape URL Block
      • Extract Text from File Block
      • Post to Slack Block
      • Menu Block
      • Logic Block
      • Checkpoint Block
      • Jump Block
      • Run Workflow Block
      • Terminator Block
    • Integrations
      • Search Bluesky Posts
      • Scrape Facebook Page
      • Scrape Meta Threads Profile
      • Scrape Instagram Comments
      • Scrape Instagram Mentions
      • Scrape Instagram Posts
      • Scrape Instagram Profile
      • Scrape Instagram Reels
      • Create LinkedIn Post
      • Create X Post
      • Search X Posts
      • Search Google
      • Search Google Images
      • Search Google Trends
      • Search Google News
      • Create Google Doc
      • Fetch Google Doc
      • Update Google Doc
      • Create Google Sheet
      • Fetch Google Sheet
      • Update Google Sheet
      • Enrich Company via Domain
      • Find Contact Email for Website
      • Find Email
      • Verify Email
      • Enrich Person via Email
      • Fetch YouTube Captions
      • Fetch YouTube Channel
      • Fetch YouTube Comments
      • Fetch YouTube Video
      • Search YouTube
      • Search YouTube Trends
      • Create Notion Page
      • Update Notion Page
      • Apify
      • Run Scenario
      • Post to Slack
      • HTTP Request
      • Run Node
      • Create Contact
      • Add Note
      • Send Email
      • Send SMS
    • Publishing & Versioning
  • Embedding AI Agents
  • Using Webhooks
  • Workspace Management
    • Workspace Overview
    • Workspace Settings
    • Usage Explorer
    • Billing Settings
    • Account Settings
    • Team Settings & Access Controls
  • Test & Evaluate
    • Testing Suite Overview
    • Evaluations
    • Profiler
    • Debugger
  • Integration Guides
    • Zapier + MindStudio
    • Make.com + MindStudio
    • n8n + MindStudio
  • Developers
    • API Reference
    • NPM Package
    • Custom Workflow Functions
  • Additional Resources
    • Glossary
    • Allowing Access to Mindstudio From Your Network
  • Solutions
    • MindStudio Solutions Partners
    • MindStudio For Developers
    • MindStudio for Enterprises
Powered by GitBook
On this page
  • Configurations
  • Conditions
  • Evaluation Settings
  • Engine
  • How It Works
  • Best Practices
Export as PDF
  1. Building AI Agents
  2. Automations

Logic Block

Route block paths based on AI decision making

The Logic Block uses AI to dynamically decide which route to take based on the most likely condition. Unlike the Menu Block, where users make the choice, the Logic Block evaluates predefined conditions and autonomously selects the appropriate path. This is ideal for automating decisions without direct user input.

Configurations

Conditions

Define the conditions the AI will evaluate to determine the most likely path. Each condition corresponds to a case that the workflow can route to.

Add a Condition:

Use the + Add Condition button to define multiple cases. Each condition should describe a unique scenario the AI can evaluate. Conditions should incorporate variables to make routing dynamic and context-aware.

Example 1: Customer Sentiment

  • Case #1: The customer is satisfied with the service based on the following interaction: {{message_transcript}}

  • Case #2: "The customer is requesting support based on the following interaction: {{message_transcript}}"

Example 2: Order Status

  • Case #1: {{order_status}} == "complete"

  • Case #2: {{order_status}} == "incomplete"

Set a Destination:

For each condition, click the Select Destination button and choose a block on the canvas where the Logic Block should route if that condition is selected. Once connected, the circle next to the destination button will fill in, confirming the route.

Evaluation Settings

Configure how the AI evaluates the conditions.

Engine

The Logic Block uses AI engines to evaluate conditions and make routing decisions. Choose an engine based on your workflow's complexity and precision requirements:

  • Default Engine

    • Reliable and general-purpose engine for most use cases.

    • Optimized for simple workflows requiring consistent and predictable decisions.

  • Experimental Engine

    • Suitable for advanced use cases exploring cutting-edge capabilities.

    • May include beta features, offering innovative decision-making strategies.

    • Recommended for testing new workflows or unconventional logic setups.

  • Haiku Engine

    • Low cost, low latency engine for quick decision making

    • May not be as accurate as other engines


How It Works

  1. The Logic Block presents multiple conditions to the AI engine.

  2. Based on the input and context, the AI evaluates the conditions and determines the most likely match.

  3. The Logic Block routes the workflow to the destination associated with the selected condition.


Best Practices

  • Clearly Define Conditions: Use specific and distinct criteria for each case to avoid overlaps.

  • Test Scenarios: Simulate workflows to ensure the AI selects the expected routes.

  • Use Variables: Incorporate variables in conditions to dynamically adjust the decision-making process.

Last updated 5 months ago