Task Management

Task management is one of the core features of Alius Agent Team. Through efficient task allocation and tracking mechanisms, you can fully utilize the collaborative capabilities of multiple Agents to complete complex workflows.

Task Concepts

What is a Task

In Alius Agent Team, a Task is a unit of work assigned to an Agent for execution. A task can be a simple question, a complex multi-step process, or a long-running background job.

Task Types

The system supports multiple task types:

TypeDescriptionExample
Instant TaskExecute immediately”Help me write a piece of Python code”
Scheduled TaskExecute at specified time”Generate yesterday’s report every day at 9 AM”
Recurring TaskRepeat at set intervals”Check server status every hour”
Dependency TaskExecute after other tasks complete”After data processing is complete, generate visualization report”
Batch TaskProcess multiple similar tasks in batch”Generate descriptions for these 100 images”

Creating Tasks

Creating Tasks via Interface

Step 1: Select Target Agent

You can select an Agent through the following methods:

  • Select directly from the Agent list
  • Let the system automatically select the most suitable Agent
  • Create the task first, then assign an Agent later

Step 2: Fill in Task Information

  • Title: Brief description of the task (required)
  • Description: Detailed explanation of task requirements (required)
  • Priority: Set task priority
    • Urgent: Needs immediate processing
    • High: Important and time-sensitive
    • Medium: Normal priority
    • Low: Non-urgent tasks
  • Deadline: Set task completion deadline (optional)
  • Tags: Add tags to tasks for categorization and search

Step 3: Advanced Options Configuration

  • Context Files: Upload relevant files as task context
  • Output Format: Specify output format requirements
  • Callback URL: URL to notify when task completes
  • Timeout Setting: Set task execution timeout

Step 4: Submit Task

Click the “Submit” button, and the task will be sent to the selected Agent.

Creating Tasks via API

curl -X POST https://api.alius.ai/v1/tasks \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Code Review",
    "description": "Review the code quality of the following Pull Request",
    "agentId": "agent_12345",
    "priority": "high",
    "deadline": "2024-01-20T17:00:00Z",
    "attachments": [
      {
        "type": "url",
        "url": "https://github.com/example/repo/pull/123"
      }
    ]
  }'

Batch Creating Tasks

When you need to create multiple similar tasks, you can use the batch creation feature:

  1. Prepare a CSV or JSON file containing task information
  2. On the task list page, click “Batch Actions” > “Import Tasks”
  3. Upload the file and map fields
  4. Confirm import

Example batch task file (JSON):

[
  {
    "title": "Analyze Data File 1",
    "description": "Analyze data distribution of data1.csv",
    "agentId": "agent_12345"
  },
  {
    "title": "Analyze Data File 2",
    "description": "Analyze data distribution of data2.csv",
    "agentId": "agent_12345"
  }
]

Task Assignment

Automatic Assignment

Alius Agent Team provides intelligent task assignment:

Load-Balanced Assignment

The system automatically selects the most suitable Agent based on the following factors:

  • Agent’s current load
  • Agent type and capability match
  • Agent’s historical performance
  • Task priority and requirements

Rule-Based Assignment

You can set assignment rules:

Rule 1: Code generation tasks -> Assign to Agents tagged "codegen"
Rule 2: High-priority tasks -> Assign to Agents with load below 50%
Rule 3: Big data tasks -> Assign to Agents with memory > 4GB

Manual Assignment

You can also manually assign tasks to specific Agents:

  1. Find unassigned tasks in the task list
  2. Click the “Assign” button
  3. Select from the available Agent list
  4. Confirm assignment

Reassignment

If task assignment is inappropriate, you can reassign:

  1. Find the task to reassign
  2. Click “More Actions” > “Reassign”
  3. Select a new Agent
  4. Optional: Add reassignment reason
  5. Confirm reassignment

Task Tracking

Task Status

Tasks go through the following statuses during their lifecycle:

Pending

Running

    ├── Completed
    ├── Failed
    └── Cancelled

Status Description

  • Pending: Task created, waiting for Agent to receive
  • Running: Agent is executing the task
  • Completed: Task completed successfully
  • Failed: Task execution failed
  • Cancelled: Task cancelled by user

Real-Time Progress Tracking

Progress Indicator

For long-running tasks, the system provides real-time progress updates:

[=======>     ] 65% - Processing file 13/20
Estimated remaining time: About 2 minutes

Task Logs

View detailed execution logs of tasks:

  1. Click on a task to view details
  2. Select the “Execution Log” tab
  3. View real-time or historical logs
[Step 1/3] Reading input file... ✓ Complete (12ms)
[Step 2/3] Analyzing data... ▶ In Progress (45%)
[Step 3/3] Generating report... ○ Waiting

Task Detail View

Click on any task to view complete details:

  • Basic Information: Title, description, status, priority, etc.
  • Assignment Information: Which Agent it’s assigned to, assignment time
  • Timeline: Task creation, assignment, start, completion times
  • Execution Result: Task output, generated files, error information, etc.
  • History: All status change history of the task

Task Scheduling

Scheduled Tasks

Create tasks that execute at specific times:

  1. When creating a new task, select “Scheduled Execution”
  2. Set execution time
  3. Optional: Set whether to repeat after execution

Example:

Execution Time: 2024-01-20 09:00:00
Repeat: Do not repeat

Recurring Tasks

Create tasks that repeat at intervals:

  1. When creating a new task, select “Recurring Execution”
  2. Set recurrence rules:
    • By Minute: Execute every N minutes
    • By Hour: Execute every N hours
    • By Day: Execute once every day
    • By Week: Execute on specified days each week
    • By Month: Execute on specified day each month
    • Cron Expression: Use standard Cron expressions

Example Cron expressions:

0 9 * * 1-5  # Execute at 9 AM Monday to Friday
0 */2 * * *   # Execute every 2 hours
0 0 1 * *     # Execute at midnight on the 1st of each month

Dependency Tasks

Create tasks that depend on results of other tasks:

  1. When creating a new task, select “Dependency Task”
  2. Add dependent tasks:
    • Prerequisite Tasks: Tasks that must complete
    • Condition: Success condition for prerequisite tasks
  3. Set dependency relationships:
    • Sequential Execution: Execute B after A completes
    • Parallel Execution: Execute C after both A and B complete
    • Conditional Branch: Decide whether to execute B or C based on A’s result

Task Management Operations

Task Queue Management

View Queue

On the “Tasks” page, you can view:

  • All Tasks: All tasks in the system
  • My Tasks: Tasks I created
  • Pending: Tasks waiting for assignment or execution
  • In Progress: Tasks currently executing
  • Completed: Successfully completed tasks
  • Failed: Tasks that failed to execute

Queue Priority Adjustment

  1. In the pending task list, find the task to adjust
  2. Drag the task to a new position (higher priority tasks at the top)
  3. Alternatively, modify the task’s priority field

Task Control Operations

Pause Task

For running tasks, you can pause them:

  1. Find the running task
  2. Click the “Pause” button
  3. The Agent will pause execution but preserve current state
  4. Can resume later

Resume Task

Resume a paused task:

  1. Find the paused task
  2. Click the “Resume” button
  3. The Agent will continue execution from where it paused

Cancel Task

Cancel unnecessary tasks:

  1. Find the task to cancel (status must be “Pending” or “Running”)
  2. Click the “Cancel” button
  3. Confirm cancellation
  4. If the task is in progress, the Agent will stop execution

Retry Task

Re-execute a failed task:

  1. Find the failed task
  2. Click the “Retry” button
  3. Optional: Modify task parameters
  4. The task will re-enter the pending queue

Task Templates

Create Template

For frequently executed tasks, you can save them as templates:

  1. Create a task and configure all parameters
  2. Click “Save as Template”
  3. Enter template name and description
  4. Template will be saved to the template library

Use Template

Quickly create tasks from templates:

  1. On the task creation page, select “Create from Template”
  2. Select a template from the template library
  3. Adjust parameters as needed
  4. Submit the task

Task Analysis and Reporting

Task Statistics

Alius Agent Team provides rich task statistics:

Overview Statistics

  • Total number of tasks
  • Completion rate
  • Average completion time
  • Failure rate

Time Range Statistics

  • Today’s task volume
  • This week’s task volume
  • This month’s task volume
  • Custom time range

Agent-Dimension Statistics

  • Number of tasks completed by each Agent
  • Average response time of each Agent
  • Task success rate of each Agent

Export Report

Generate and export task reports:

  1. On the task list page, click “Export”
  2. Select export format:
    • CSV
    • Excel
    • PDF
    • JSON
  3. Select data fields to include
  4. Select time range
  5. Click “Export”

Best Practices

Task Decomposition Recommendations

For complex workflows, it’s recommended to decompose them into multiple small tasks:

Not Recommended:

Task: Build an e-commerce website
(Too large, difficult to track and debug)

Recommended:

Task 1: Design database schema
Task 2: Implement user authentication module
Task 3: Implement product management module
Task 4: Implement order processing module
Task 5: Implement payment integration
...

Priority Setting Recommendations

  • Urgent: Production environment failures, security vulnerabilities, etc.
  • High: Important features affecting multiple teams
  • Medium: Normal feature development and optimization
  • Low: Experimental features and optimization suggestions

Timeout Setting Recommendations

  • Simple query tasks: 30 seconds - 1 minute
  • Code generation tasks: 5 - 10 minutes
  • Data processing tasks: 30 minutes - 2 hours
  • Batch processing tasks: Set according to data volume

Troubleshooting

Task Stuck in “Pending” Status for a Long Time

Possible Causes:

  • No available Agents
  • Agent load too high
  • Task priority set too low

Solutions:

  1. Check Agent status
  2. Increase number of Agents or raise task priority
  3. Check if assignment rules are correct

Task Execution Failed

Possible Causes:

  • Agent error
  • Incorrect task parameters
  • Dependent services unavailable
  • Timeout

Solutions:

  1. View task execution logs
  2. Check if task parameters are correct
  3. Check dependent service status
  4. Increase timeout duration

Task Results Don’t Meet Expectations

Possible Causes:

  • Task description not clear enough
  • Agent configuration improper
  • Model selection unsuitable

Solutions:

  1. Optimize task description, provide clearer instructions
  2. Adjust Agent configuration (e.g., temperature parameter)
  3. Try different models

API Reference

For detailed task management API documentation, please refer to the API Reference chapter.