Skip to main content
Version: 0.3.0

Task Definitions Overview

Task definitions are templates that define what work an agent should perform. They serve as blueprints for creating and executing tasks, containing all the instructions, inputs, triggers, and scheduling information needed for automation.

What is a Task Definition?

A task definition is a reusable template that includes:

  • Instructions: Detailed guidance for what the agent should do
  • Agent Assignment: Which agent will execute tasks based on this definition
  • Task Inputs: Dynamic values that can be provided when running tasks
  • Triggers: Conditions that automatically start task execution
  • Scheduling: Time-based automation rules
  • Human Controls: Per tool approval controls

Key Components

Instructions

The core of any task definition is the instruction set:

  • Clear Objectives: Define what success looks like
  • Step-by-Step Process: Break down complex workflows
  • Decision Logic: Guide the agent through conditional scenarios
  • Error Handling: Define what to do when things go wrong
  • Output Requirements: Specify expected deliverables

Task Inputs

Inputs should be used when the task definition runs against a specific set of data. For example, a task definition might need to process based on an order being created. The order number can be used as an input.

Task inputs allow for dynamic customization:

  • Variable Data: Accept different values for each task execution
  • Event Data: Automatically populated from triggers
  • User Inputs: Manually provided when starting tasks
  • Default Values: Fallback values when inputs aren't provided

Triggers and Scheduling

Automate task execution with:

  • Time-Based Triggers: Run tasks on schedules (e.g. hourly, daily, weekly)
  • Event Triggers: Start tasks when specific events occur (Coming Soon)
  • Manual Execution: Allow users to run tasks on-demand
  • API Triggers: Trigger tasks using AnchorAutomate's API

Best Practices

Writing Effective Instructions

  1. Be Specific: Avoid ambiguous language
  2. Use Examples: Provide concrete examples of expected behavior
  3. Handle Edge Cases: Consider what could go wrong
  4. Set Boundaries: Define what the agent should and shouldn't do
  5. Include Context: Explain the business purpose and goals

Input Design

  1. Meaningful Names: Use descriptive input names
  2. Clear Descriptions: Explain what each input is for
  3. Validation Rules: Define acceptable input formats
  4. Default Values: Provide sensible defaults when possible
  5. Required vs Optional: Clearly mark required inputs

Trigger Configuration

  1. Appropriate Timing: Choose the right trigger type for your use case
  2. Avoid Conflicts: Ensure triggers don't interfere with each other
  3. Test Thoroughly: Validate trigger behavior in different scenarios
  4. Monitor Performance: Watch for trigger-related issues
  5. Plan for Scale: Consider what happens with high trigger volumes

Common Use Cases

Business Process Automation

  • Invoice Processing: Extract data, validate, and route for approval
  • Employee Onboarding: Create accounts, send welcome materials, schedule training
  • Customer Support: Categorize tickets, route to appropriate teams, send updates
  • Order Fulfillment: Process orders, update inventory, notify customers

Data Management

  • Data Synchronization: Keep systems in sync across platforms
  • Report Generation: Create and distribute regular reports
  • Data Validation: Check data quality and flag issues
  • Backup Operations: Automated backup and verification processes

Communication and Notifications

  • Alert Management: Process system alerts and notify appropriate teams
  • Customer Communications: Send personalized messages based on events
  • Internal Notifications: Keep teams informed of important updates
  • Escalation Procedures: Automatically escalate issues when needed

Getting Started

Ready to create your first task definition?

  1. Learn how to create a task definition
  2. Set up triggers and scheduling
  3. Learn about fine-tuning