Recently, Coze in China has updated its Multi-Agent mode, nearly six months since the last release. So, what exactly is Multi-Agent? What is the difference between Multi-Agent and Single-Agent? What are some famous and pioneering Multi-Agent research or projects? With these questions in mind, we will provide some simple answers.
If you are new to Coze and do not quite understand what it does, please read the following article.
Coze (扣子) is a domestic version of GPT-like models, with a user guide (beginner’s guide).
1. What is Multi-Agent?
It is based on LLMs and consists of multiple autonomous agents that cooperate or compete with each other. Its main meaning is to solve complex problems through collective behavior (like a team or a company addressing complex user or client needs). Each agent has a certain degree of autonomy, can perceive the environment, make decisions, and interact with other agents.
A single agent can only “play” one role, while multiple agents can “play” many different roles. They are also in a relationship of mutual competition and learning, which can be seen as a complex system.
2. What is the difference between Multi-Agent and Single-Agent?
Generally, Multi-Agents can “play” multiple roles, have excellent scalability, and can achieve task planning and allocation, cooperation, communication, distributed decision-making, adversarial competition, and reinforcement learning, acting as a collective to solve a complex problem or task. In contrast, a Single-Agent needs long-term memory capabilities (which is currently around 100k-200k context window capabilities, greatly testing the performance of LLMs) to solve a complex problem or task, while Multi-Agents do not require strong attention in this area, which is a significant advantage.
3. What are some famous and pioneering Multi-Agent research or projects?
In the development of artificial intelligence, research on agents has long been underway, and its concept is so broad that it can almost constitute a complete system. Today, we will not discuss these abstract theories. The first Agent project I encountered was AgentGPT, an open-source agent framework on GitHub, followed by open-source projects like AutoGPT, AutoGen, MetaGPT, and closed-source GPTs, leading up to today’s Coze, which have gradually transitioned from concept to productization.
In the process of these Agent projects maturing, we must mention Langchain, which, as a pioneering framework for AI chain task processing, has played an important foundational role in the development of Agents.
Next, we will start experiencing Coze’s Multi-Agent.
Prerequisites
Before building Multi-Agents, it is essential to clarify the application scenarios, the problems to be solved, and the final goals. Taking a specific example as a starting point, I plan to create a “virtual internet software company” to provide comprehensive service support for rapid development of open-source projects. This company will cover the entire process from project understanding, generating relevant documentation, customizing code modifications, to successfully deploying the project on a server, which will help deepen my understanding of the project and maximize the success rate of transforming the project from concept to practical application.
Once we clarify the goals, we need to start building the company structure. For the sake of this experience, we will simplify this structure, and I will first draft roles such as “Frontend Developer”, “Backend Developer”, “DevOps Engineer”, “Product Manager”, and “Project Manager”. Next, I will begin writing prompts for these five positions and, for user experience and ease of use, give them nicknames.
Creating Multi-Agents
After creating the bot, you will enter the configuration page, then click on the drop-down menu for agents on the right side to select “Multi-Agent Mode”.
Let’s take a look at all the functions on this page:
-
The Multi-Agent orchestration area, divided into “prompts”, “triggers”, “variables”, “database”, “opening remarks”, “background images”, and “voice functions”. In this creation process, I will use prompts, variables, database, and opening remarks functions, which will be explained in detail below.
-
The agent canvas area, where you can configure the “applicable scenarios”, “prompts”, “skills”, and “user suggestions” for a single agent. You can also add “new Agents” in the “floating function bar” at the bottom right and select “created Agents”. In this creation process, I will use the “add agent”, “configure agent”, and “global jump conditions” functions, which will be explained in detail below.
-
The preview and debugging area, where you can interact with all the configured Agents after completing their configuration to test if they meet our needs. There are also several functions here; when you create data, you can view the saved data, and when you create variables, you can view the saved variables. Detailed explanations will follow.
-
Publishing, analyzing – analysis can only be done after publishing, and the store – is just a return to the application page.
Configuring Agents
1. Main Agent Orchestration
First, we will create a prompt for the project manager. Here I share a quick and efficient method (the AI optimization prompts provided by Coze are not very useful). We find the structured prompt template in Coze’s documentation, as shown in the image above. Copy this template and give it to Kimi from the Dark Moon or other intelligent LLMs like ChatGPT, Claude, or Gemini.
This is crucial; after you publish, the agent that interacts with users is this one, which can be understood as a manager or a receptionist for a collective or team, and it should allow users to understand its core functions through simple communication.
Next, we need to set some features for this agent to enhance user experience and ease of use.
First, the “memory” module’s “variable” function, where I add a variable to record the user’s “nickname”, with the specific format shown in the image above.
Usage: During the communication between Multi-Agents and users, if the user introduces themselves, it will remember this nickname.
Principle: It matches the user’s nickname through a unique “sys_uuid”.
Tips: The above data can be viewed in the “preview and debugging” area.
Create a database for Multi-Agents, allowing users to save project notes, with the specific format shown in the image above. If you want to share this Multi-Agent with other friends, switch the “Table Query Mode” to “Multi-User Mode”. Similarly, you can view the saved data in the preview and debugging area.
Tips: The above data can be viewed in the “preview and debugging” area.
A well-designed opening remark is an effective way to quickly showcase the core functions of this Multi-Agent to users.
2. Mini-Agent Orchestration
We arrive at the canvas area, where initially there is only one agent at the center. In the bottom right corner of the canvas, there is a floating toolbar, and by clicking the “Add Node” button, you can increase or call already created agents and global jump conditions.
2.1 Agent Configuration
Applicable Scenarios: Overview of the core functions of the agent. This setting is crucial; on one hand, it lets users know the applicable scenarios of the agent, and on the other hand, it informs other agents of its functions, making calls more precise (agents can communicate with each other).
Agent Prompt: Prompt, the role played.
Skills: Another critical setting, it is recommended to add plugins that match the role, in addition to plugins, knowledge bases and workflows can also be added.
In addition to these main functions, there are also more functional options, among which model settings are also quite important:
-
Rename: Change the name of the agent;
-
Create a copy: Copy and paste the agent;
-
Model Settings: Choose between the Lark model or the Dark Moon model. Response randomness: Similar to the temperature in ChatGPT, the higher the value, the more likely it is to lack accuracy, while the lower the value usually reflects rigor. Maximum response length: This is the context window length, recommended to be maximized.
-
Switch node settings: Currently, it is unclear whether this is not open or how it works, but we cannot set it in the dark. Regardless, we will use other methods to jump.
That concludes the configuration of a single agent. We will replicate this process for the other agents.
Alright, after configuring the agents, we need to connect them, which means enabling them to communicate with each other.
Additionally, there is an option called ‘Global Jump Conditions’, which allows users to activate the agent by entering specific prompts. For example, the product manager Yangyang can input keywords like “Yangyang” or “Product Manager” in the global jump conditions, so when users talk about or @ Yangyang while communicating with other agents, it will jump to Yangyang.
Debugging Multi-Agents
To save space, we will skip the debugging phase.
Publishing Multi-Agents
The publishing record can include the version number and details of each version’s iterations (since this is an experience, I have also simplified it). Choose to publish on the store.
Multi-Agent Applications
Simulating application scenarios: We will simulate a scenario, that is, fetching projects from GitHub and comprehensively analyzing all related information of the project as well as the entire process of deploying it to a private server.
Taking the lobe-chat project as an example, we input the GitHub URL and let it introduce the project.
Although it provided an introduction, it did not meet my requirements. This time, we let the product manager analyze the project.
This time, the response was very accurate.
We also managed to have the product manager organize these functions into a mind map.
Next, we increased the difficulty by asking it to write a product requirement document. Although it completed it, it was still just a draft, only outlining the structure. 😂 😂 😂
Feishu Online Document:
https://bytedance.larkoffice.com/docx/EkEvdgFjnoiwp4xtmpRcBctLnNg
Continuing to increase the difficulty, we need to modify the frontend code. First, we need to ask the frontend developer which parts of the project structure belong to the frontend. The response was still quite good.
Alright, that concludes the experience of creating Multi-Agents with Coze. Interested friends can try this agent, and there are many features yet to be expanded. You can also leave a message or send me a private message with your thoughts.
The experience address is as follows:
https://www.coze.cn/s/i2jbX2oc/