Tasks

Tasks are reusable instructions that define how your AI Agent thinks, responds, and performs logic-driven actions. They’re like “mini skill modules” — giving your AI specialized knowledge or workflows you can assign to multiple agents.

Unlike Functions, which perform external actions (API calls, webhooks, etc.), Tasks handle internal logic — guiding tone, structure, or reasoning for specific jobs.

In MagicBlocks, Tasks are stored under Library → Tasks. They act as reusable, customizable behavior templates for your AI Agents.

Each Task contains:

  • General settings – Define the name, version, and tags.
  • Configuration – Adjust AI creativity and link triggers.
  • Instruction editor – Write detailed instructions and insert Smart Content or Snippets.

You can also connect Tasks to Functions, so the AI automatically triggers backend actions when the task completes — like sending leads or creating bookings.

💡 Think of Tasks as your AI’s “playbook,” and Functions as its “hands.”

Step-by-Step: Creating a Task

Step 1: Go to Library → Tasks

Click Create New to open the Task builder.
You’ll see three main sections:

  • General Settings
  • Configuration
  • Instruction

Step 2: Fill in General Settings

Field

Description

Task name

A clear title for your task (e.g., “Summarize Chat”).

Version

Automatically generated to track changes.

Tags

Optional keywords to organize and filter your tasks.

Example:

Task Name: “Lead Qualification Assistant”
Tags: Sales, CRM, Automation

Step 3: Configure Task Settings

The Configuration section lets you fine-tune your AI’s behavior:

Setting

Description

Creativity

Adjusts how imaginative or factual your AI should be (0 = factual, 1 = highly creative).

Triggered from Task

Connect this task to a

Function

that will run automatically after completion.

If no Functions exist yet, you’ll see:

“Nothing available — Go to Functions”

Click Go to Functions to create one, then return to link it.

💡 Example: Trigger a Function like “Send Lead to CRM” after the “Qualify Lead” Task finishes.

Step 4: Write Your Instruction

This is the core logic that defines what your AI does when executing this Task.

The Instruction editor supports:

  • Plain text for simple instructions
  • Dynamic Smart Content for inserting user or system data
  • Snippets for reusable message templates

Using Smart Content

You can personalize or dynamically adapt Task instructions by inserting Smart Content Blocks.

Click Insert Smart Content Block, and choose from various Content Sources such as:

  • Contact: user attributes like name, email, company, country, or timezone
  • Sessions: data from the current or past sessions
  • Agents: your active AI agent metadata
  • Knowledge: contextual information from your Knowledge Library
  • Memories: previously stored user interactions
  • Others: global system values

Example:
Insert Smart Content such as {{User.First_Name}} to make responses more personal:

“Hi {{User.First_Name}}, thank you for reaching out! Can you tell me more about your company {{User. Company}}?”

Using Snippets

Snippets are prebuilt reusable text blocks (e.g., disclaimers, greetings, or tone settings).
Click Insert Snippets to embed them directly into your Task.

Example Snippet Insertions:

  • “Welcome message” snippet for introductions.
  • “AI Disclaimer” snippet to meet compliance requirements.

Example Task Instruction

When a user provides their details, confirm them by name and company.
Then trigger the linked Function "Send Lead to CRM" once information is complete.

Include Smart Content: {{User.First_Name}}, {{User.Company}}, {{User.Email}}.

Step 5: Save and Assign

Once finished, click Create.
Your new Task will appear in your Task Library as “Unused” until assigned to an Agent.

To use it:

Go to Agents → [Your Agent] → Tasks.

Click Add Task.

Select your created Task from the list.

Your Agent can now call that Task in conversation as part of its reasoning flow.

Advanced Integration: Linking Tasks to Functions

Tasks can trigger Functions automatically when specific logic completes.
This allows seamless automation — combining reasoning with real-world actions.

Example:

Task: “Qualify Lead”

Function Triggered: “Send Lead to CRM”

When the AI completes the qualification Task, it calls the linked Function and sends the data to your CRM via API.

🔄 This creates an intelligent feedback loop — your AI thinks, acts, and executes seamlessly.

Example Use Cases

Task Name

Description

Optional Triggered Function

Qualify Lead

Asks qualifying questions and validates lead info.

Send Lead to CRM

Summarize Session

Summarizes user’s conversation into a key report.

Send Summary to Google Sheets

Booking Assistant

Helps schedule meetings with collected details.

Create Calendar Event

Customer Feedback Collector

Gathers satisfaction scores and notes.

Post to Notion DB

Support Classifier

Identifies issue types and suggests solutions.

Route Ticket via API

Best Practices

  • Use Smart Content to personalize instructions dynamically.
  • Insert Snippets for standard language and tone consistency.
  • Keep Tasks focused — one clear goal per Task.
  • Adjust creativity based on task type (creative vs. factual).
  • Leverage triggers — chain Tasks and Functions for automation.

Setting Tasks for Your AI Agents

 

 

Was this article helpful?