Configure agent actions

In MagicBlocks, Actions are powerful tools that let you program how your AI Agent behaves based on what users say or do. By setting Conditions, defining Actions, and assigning Goals, you give your Agent the intelligence to adapt conversations in real time and respond in ways that feel intentional, personalized, and useful.

Actions help you automate steps like:

  • Switching Journey Blocks
  • Sending messages
  • Collecting forms
  • Ending conversations
  • Triggering CRM handovers or workflows

They’re the brain behind the flow of conversation.


🔁 Two Types of Actions

You can create Actions at two levels:

Global Actions       
These apply across the entire Agent and are always watching for user input, regardless of which Journey Block the user is in. Perfect for triggers like "wants to talk to a human" or sentiment detection.

Journey Block-Specific Actions       
These only apply inside a specific Journey Block (like Hook & Align, Personalize, Pitch, & Action, or Human Handover) and allow you to tailor the logic for each part of the journey. Ideal for customizing stage-specific behavior.


📝 How to Set Up an Action

🎥 This video will walk you through the step-by-step process on how to set up Actions for your AI Agent:

Step 1: Create a New Action

Go to your AI Agent.

From the left sidebar, click Actions for a global Action, or go inside a Journey Block (e.g., Hook & Align) and click the Actions tab within that Journey Block.1

Click + New Action to begin.2


Step 2: Define a Condition

Conditions are the trigger, the "if" part of your automation. MagicBlocks offers a wide variety of conditions you can choose from, such as:345

  • Key Fact: Fires when a specific piece of info has been collected (e.g., budget, email).
  • All Key Facts Found (Active Block): Triggers when all required Key Facts for that Block have been collected.
  • User Message Count (Active Block): Activates based on how many messages the user has sent in this block.
  • AI Message Count (Active Block): Triggers after the AI sends a certain number of messages in the current block.
  • User Message Contents: Looks for specific words, phrases, or intent in what the user types (e.g., contains “price”, “how much”, “human”).
  • AI Message Contents: Fires based on what the Agent has already said.
  • Wants To Talk To Human: Automatically triggers when the AI detects intent to escalate.
  • User Asked Question: Detects when the message is a question.
  • Slash Command: Responds to typed commands like /help or /restart.
  • Form Field: Triggers when a form field has been filled.
  • Page URL: Customizes behavior based on the web page the AI is embedded on.
  • Sentiment: Adapts the flow based on positive, negative, or neutral tone.
  • Custom: Allows you to define more advanced logic like classifying user intent (e.g., “Support,” “Sales-Curious,” “Sales-Engaged”).


🛠 When creating a Custom Condition, you can:1

  • Name the logic (e.g., “Intent Classifier”)
  • Define the options (e.g., Support, Sales-Curious, Sales-Engaged)
  • Give the AI instructions for how to classify responses

Set comparison rules like:

  1. Equals (exact match)
  2. Not Equals
  3. Contains

You can also enable:

Only Match Once: Ensures this Action won’t be triggered again during the session.2

 

AND/OR Logic: Combine multiple conditions for more control.3


Step 3: Set the Action

Once a condition is met, tell the Agent what to do. These are the available Action types:910

  • None: Do nothing (used as a placeholder or logic reset).
  • Switch Journey Blocks: Move to a new Journey Block in the flow (e.g., from Hook to Pitch).
  • End Chat: Gracefully close the conversation.
  • Send Message: Respond with a custom message or snippet.
  • Run Task: Trigger a backend action (e.g., call webhook, notify a CRM).
  • Add Buttons: Display choices for users to click.
  • Add Forms: Present a form to collect structured data.
  • Add Link: Show a clickable link to an external URL.
  • Embed: Add an interactive widget, such as a video, map, or iframe.

You can also stack actions to combine steps (e.g., send a message and then show a form).


Step 4: Assign a Goal

You can tie this Action to a Goal, which helps you track conversions and trigger lead handovers when completed.12

Goals can include:

  • Capturing user contact info
  • Booking a meeting
  • Completing a quiz or form
  • Reaching a specific point in the sales funnel
  • Setting a Goal also allows you to trigger integrations like CRM handovers or analytics events.

✅ Example Use Case

Let’s say you're qualifying a user’s sales intent.

Inside the Hook & Align Journey Block, you set up:

  • Condition: User Message contains “pricing”, “demo”, or “how much”
  • Action: Switch to the “Pitch” Journey Block
  • Goal: Mark as “Sales-Engaged Lead”

Now, when a visitor expresses interest in your offer, your AI will immediately shift gears, tailor its tone, and hand off when ready.


🔚 Wrap-Up

Actions in MagicBlocks give your AI the power to:

  • Adapt to user input in real time
  • Move fluidly across Journey Blocks
  • Trigger messages, buttons, forms, and integrations
  • Drive smarter, more effective outcomes, without needing code

Whether you’re setting up a simple escalation path or building a fully dynamic lead qualification engine, Actions put you in control of the conversation flow. 

Was this article helpful?