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:
| Type | Description | Example |
|---|---|---|
| Instant Task | Execute immediately | ”Help me write a piece of Python code” |
| Scheduled Task | Execute at specified time | ”Generate yesterday’s report every day at 9 AM” |
| Recurring Task | Repeat at set intervals | ”Check server status every hour” |
| Dependency Task | Execute after other tasks complete | ”After data processing is complete, generate visualization report” |
| Batch Task | Process 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:
- Prepare a CSV or JSON file containing task information
- On the task list page, click “Batch Actions” > “Import Tasks”
- Upload the file and map fields
- 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:
- Find unassigned tasks in the task list
- Click the “Assign” button
- Select from the available Agent list
- Confirm assignment
Reassignment
If task assignment is inappropriate, you can reassign:
- Find the task to reassign
- Click “More Actions” > “Reassign”
- Select a new Agent
- Optional: Add reassignment reason
- 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:
- Click on a task to view details
- Select the “Execution Log” tab
- 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:
- When creating a new task, select “Scheduled Execution”
- Set execution time
- 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:
- When creating a new task, select “Recurring Execution”
- 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:
- When creating a new task, select “Dependency Task”
- Add dependent tasks:
- Prerequisite Tasks: Tasks that must complete
- Condition: Success condition for prerequisite tasks
- 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
- In the pending task list, find the task to adjust
- Drag the task to a new position (higher priority tasks at the top)
- Alternatively, modify the task’s priority field
Task Control Operations
Pause Task
For running tasks, you can pause them:
- Find the running task
- Click the “Pause” button
- The Agent will pause execution but preserve current state
- Can resume later
Resume Task
Resume a paused task:
- Find the paused task
- Click the “Resume” button
- The Agent will continue execution from where it paused
Cancel Task
Cancel unnecessary tasks:
- Find the task to cancel (status must be “Pending” or “Running”)
- Click the “Cancel” button
- Confirm cancellation
- If the task is in progress, the Agent will stop execution
Retry Task
Re-execute a failed task:
- Find the failed task
- Click the “Retry” button
- Optional: Modify task parameters
- The task will re-enter the pending queue
Task Templates
Create Template
For frequently executed tasks, you can save them as templates:
- Create a task and configure all parameters
- Click “Save as Template”
- Enter template name and description
- Template will be saved to the template library
Use Template
Quickly create tasks from templates:
- On the task creation page, select “Create from Template”
- Select a template from the template library
- Adjust parameters as needed
- 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:
- On the task list page, click “Export”
- Select export format:
- CSV
- Excel
- JSON
- Select data fields to include
- Select time range
- 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:
- Check Agent status
- Increase number of Agents or raise task priority
- Check if assignment rules are correct
Task Execution Failed
Possible Causes:
- Agent error
- Incorrect task parameters
- Dependent services unavailable
- Timeout
Solutions:
- View task execution logs
- Check if task parameters are correct
- Check dependent service status
- Increase timeout duration
Task Results Don’t Meet Expectations
Possible Causes:
- Task description not clear enough
- Agent configuration improper
- Model selection unsuitable
Solutions:
- Optimize task description, provide clearer instructions
- Adjust Agent configuration (e.g., temperature parameter)
- Try different models
API Reference
For detailed task management API documentation, please refer to the API Reference chapter.