Multi-task Parallelism
Agent team is a multi-agent collaboration engine of CodeArts Agent Space. Adopting the architecture of "leader intelligent orchestration + teammate autonomous execution," it deconstructs complex development tasks into sub-tasks that can be advanced in parallel. Multiple professional agents work together with a division of labor just like a real development team, autonomously completing the entire workflow from requirement analysis to code delivery. The whole process is event-driven, fully visible, and requires no manual intervention.
| Dimension | Sub-agent | Agent Team |
|---|---|---|
| Context management | Independent context for each invocation, destroyed upon task completion. | Persistent independent context for each teammate, accumulating knowledge across tasks. |
| Communication mechanism | Can only report results one-way to the primary agent. | Two-way free communication among teammates, supporting real-time collaboration and consensus convergence. |
| Task coordination | Unified assignment and reclamation by the primary agent. | Shared task pool + autonomous claiming; the team leader only orchestrates tasks generally. |
| Team formation | Fixed roles, pre-configured before the task. | Dynamic formation; the team leader adds or removes teammates on demand based on requirements. |
| Fault rectification | If a sub-agent fails, the primary agent needs to reassign the task. | Automated monitoring by the team leader ensures self-healing and auto-replacement of faulty agents. |
| Scenarios | Short-term tasks with a single objective that focus on the final output. | Complex workflows involving multi-role collaboration and requiring continuous interaction. |
Core Capabilities
- Multi-role collaboration: Multiple specialized agents perform their respective duties, simulating the division of labor and cooperation of human developers.
- Full-process coverage: Requirement analysis and code delivery are automatically connected to streamline an end-to-end workflow.
- Intelligent collaboration: Team cooperation breaks the limitations of single-point intelligence, boosting development efficiency and code quality.
Agent Team Architecture
An Agent Team typically consists of the following components.
| Component | Definition and Function |
|---|---|
| Agent team | A collaborative work unit composed of multiple specialized agents, capable of task decomposition and collaborative execution. |
| Team leader | The core orchestrator responsible for task planning, resource allocation, progress monitoring, and teammate coordination. It can dynamically create sub-agents. |
| Teammate | A dedicated agent that executes specific tasks. Teammates can communicate with each other. |
| Role | Defines the function tag of an agent (such as analyst or developer). Multiple teammate clones can be generated simultaneously from the same role. |
| Scene | A predefined task context environment that includes goals, constraints, input/output formats, etc.; used to guide team behavior. |
| Sub-agent | A special-purpose task executor temporarily created by the team leader. |
| Task list | A global to-do list maintained by the team leader, sorted by priority/dependency relationships, which drives the entire team workflow. |
| To-Do | An internal task tracking method within a single agent, used to record the current processing status. |
Generating Code Using Agent Team
- Switch to the agent team mode.
- Access CodeArts Agent Space by referring to Enabling CodeArts Agent Space.
- Click Coding.
- At the bottom of the input box, select AgentTeam to switch to the agent team mode. The selected model is displayed on the right. You can select a model as required from the drop-down list.
- Explain what you need. Type your task into the box, and click
or press Enter to submit your request. Create a mini-program for tracking sleep quality. First analyze existing products in the domestic market and summarize their pros and cons, and then develop a mini-program with distinctive features.
- The team leader creates tasks and assigns them to teammates. Once the team leader receives the task instructions, they will deconstruct the main objective into smaller, more specific sub-tasks. Based on the nature of these subtasks, the team leader dynamically creates and assigns teammates, while simultaneously generating a task list. The task list contains parallel or serial sub-tasks (such as Task 1, Task 2, Task 3... Task N). Figure 1 Breaking down and assigning tasks
- Switching to the team visualization mode: Click
on the top menu bar of the chat window. You can switch from the chain of thought (CoT) mode to the team visualization mode. This mode intuitively displays the upstream and downstream relationships of task assignment, allowing you to clearly identify the dependency structure of tasks and understand the data flow and execution sequence between each node. When you want to focus on the work progress of a specific sub-agent, simply hover your mouse over the node to quickly view its real-time working status via a floating pop-up window. Click
in the pop-up window to go to the CoT view of the subtask. Figure 2 Team visualization mode
- Opening the task overview: Click
on the top menu bar of the chat window. Under Task Overview, you can view the task duration, number of completed tasks, and number of sub-agents. Figure 3 Task overview
- Viewing the task list: Click
on the top menu bar of the chat window. Under Task List, you can view the current tasks. Figure 4 Task list
: That the task is complete.
: The task is in progress.
: The task is not started. - Viewing task deliverables: Click
on the top menu bar of the chat window. Under Task Product, you can view the final task deliverables. Click the generated file to view its content in Documents or Editor.
Once the task execution is completed, you need to first accept and confirm the output files. Then the files are displayed here.
- Viewing context information: Click
on the top menu bar of the chat window. You can view details about the skills and MCP tools invoked by the current chat under Context Information. - Viewing context usage: Click
on the top menu bar of the chat window. You can view the context usage (percentage of used tokens) of the current chat under Context usage in real time. This helps you intuitively manage your current context usage and prevent disruptions to the session continuity due to exceeding limits.
- Switching to the team visualization mode: Click
- Teammates collaborate to execute the tasks. When the team leader assigns sub-tasks (e.g., Task 1) in the task list to corresponding teammates, it dynamically configures an identity/role for each teammate and generates a specialized prompt to ensure the teammate accurately understands and executes that specific task. Upon receiving their task, teammates will further break it down into a list of specific to-dos. Based on the requirements of these to-dos, each teammate invokes corresponding tools to enhance their capabilities and complete complex operations.
If you need to view the execution details of a subtask, click the target task item to automatically jump to the subtask page.
Figure 5 Viewing the subtask execution progress
- View and confirm the results. After each subtask is completed, the execution results are reported to the team leader. The team leader then centrally collects the outputs, verifies them, and consolidates the pieces to generate a final summary report. Figure 6 Subtask execution results reported to the team leader
Figure 7 Final result confirmation
- Viewing and processing generated files in the editor: View the content of generated files under Editor. Click Keep (Ctrl+Y) on a segment to accept the generated content, or click Undo (Ctrl+N) to reject the generated content. Alternatively, at the bottom of the file, click Keep All (Ctrl+Enter) or Undo All (Ctrl+Delete) to accept or reject the generated file, respectively. You can also directly modify the content.
If the editor is not displayed properly, click
(Toggle Tool Panel) in the upper right corner of the top menu to open the tool panel. On the displayed panel, click Editor. - Viewing and processing generated files in the temporary storage area: Move the cursor to the row where the target file is located, click
to accept the file, or click
to reject the file. If there are multiple files, you can click Accept All to accept all files or Reject All to reject all files.
- Viewing and processing generated files in the editor: View the content of generated files under Editor. Click Keep (Ctrl+Y) on a segment to accept the generated content, or click Undo (Ctrl+N) to reject the generated content. Alternatively, at the bottom of the file, click Keep All (Ctrl+Enter) or Undo All (Ctrl+Delete) to accept or reject the generated file, respectively. You can also directly modify the content.
Creating a Team Template
In CodeArts Agent Space, you can run the /save-team command to encapsulate roles and scenes from completed tasks into a reusable template. When creating new tasks later, the system can directly invoke this template without having to replan the architecture from scratch.
- Refer to Generating Code Using Agent Team to complete task execution.
- Click
in the input box, select Shortcuts, and choose /save-team from the displayed menu. - Enter the name of the team to be created (for example, new-dev-team) and click
. The syntax for the command is /save-team Team name, where you can customize Team name. If you need to update an existing team template, simply run /save-team Name of the team to be updated.
- View the generated role and scene documents.
After the files are generated, you can view them under Editor > EXPLORER.
- Role documents are stored in the .codeartsdoer/agent-team/roles directory under the project folder.
- Scene documents are stored in the .codeartsdoer/agent-team/scene directory under the project folder.
Figure 8 Viewing generated role and scene documents
- Create a new task based on the generated role and scene documents.
Enter the following prompt in the input box (with the team name specified in 3) and click
.Use new-dev-team to create a children's sleep-aid mini-program.
After receiving the prompt, the AI will begin constructing the task based on the roles and scenes defined in the specified template.
Obtaining Agent Team Logs
When encountering exceptions or errors during code development in the agent team mode, refer to the following to retrieve logs for troubleshooting. The following operations apply only to Windows and macOS.
Navigate to the local paths %USERPROFILE%/AppData/Local/Temp/agent-team-log and view relevant logs.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot