AI Personal Learning
and practical guidance
豆包Marscode1

Agora: a scalable multi-agent protocol for large language models

summary

This study introduces Agora, a metacommunication protocol designed for Large Language Model (LLM) networks.Agora aims to solve the trilemma between efficiency, scalability, and flexibility when communicating between agents, by using a mixture of natural language and structured protocols to achieve efficient, scalable, and flexible communication.

Original: https://arxiv.org/abs/2410.11905


 

point of view

  1. Proxy communications trilemma dilemma: LLM-driven agent networks face tradeoffs between efficiency, scalability, and flexibility when communicating.
  2. Agora's design philosophy: Agora addresses the trade-off between communication efficiency, scalability and flexibility by combining different communication methods.
  3. Role of the Protocol Document (PD): The PD is a plain text description of the document that is at the heart of Agora's implementation of automated protocol negotiation and implementation.
  4. Emergence of self-organizing protocols: In large networks, Agora is able to facilitate auto-negotiation between LLM agents to form self-organizing protocols.
  5. Cost-effectiveness gains: By implementing Agora, you can significantly reduce communication costs and improve the cost-effectiveness of your network.

 

Core realization steps

  1. Define the Protocol Document (PD): Create PDs to describe communication protocols so that LLMs can understand and follow them.
  2. Realization of multilevel communication strategies: Depending on the frequency of communication and the complexity of the task, natural language, LLM-written routines or manually-written routines are selected for communication.
  3. Auto-negotiation and realization protocols: Communication protocols are automatically negotiated and implemented between agents through natural language or routines defined in PD.
  4. Emergence and sharing of protocols: Encourage agents to generate and share PDs to facilitate the emergence of self-organizing protocols and self-optimization of the network.
  5. Cost-benefit analysis: Evaluating the cost-effectiveness of the Agora protocol versus pure natural language communication.

 

case (law)

  1. Example of a weather forecast with two agents: Shows how to reduce communication costs through natural language communication to protocol negotiation to routine implementation and through Agora.
  2. Example of a large network of 100 agents: Validates Agora's scalability and effectiveness in complex tasks in a network of 100 LLM agents.

 

In this case, the researchers demonstrated how the Agora protocol enables efficient communication between two LLM agents through a simple scenario. The two agents are:

  • Agent A(Alice): a travel service agent that needs to look up weather forecasts for specific dates and locations in order to provide services to users.
  • Agent B(Bob): a weather service agent capable of providing weather forecast data.

communications process

initial natural language communication (INLC)

  1. Inquiries from Agent A: Agent A sends a query request in natural language to agent B asking about the weather on a specific date and location.
  2. Response from Agent B: Agent B receives the query and replies with the weather forecast details using natural language.

Agreement negotiation and realization

  1. Discussion of agreements: After a number of natural language exchanges, Agent A and Agent B start discussing the creation of a standardized protocol to optimize the communication process.
  2. Protocol Document (PD) Creation: The two parties negotiate a JSON-formatted protocol that contains a structured data format for requests and responses.
    • Request format::{"date": "YYYY-MM-DD", "location": "string"}
    • response format::{"temperature": number, "precipitation": number, "weatherCondition": "string"}
  3. Agreement implementation: Once the protocol is established, Agent A and Agent B implement routines to handle requests and responses, respectively. Agent A sends the request with a hash value of the protocol, and Agent B recognizes and uses the corresponding processing routines based on the hash value.

cost analysis

  1. Agreed negotiated costs: The cost of negotiating and implementing the agreement is $0.043.
  2. per capita cost of natural language communication (NLC): The cost per natural language communication is $0.020.
  3. cost-effectiveness: When the number of queries exceeds two, the cost-effectiveness of using the Agora protocol begins to outweigh the cost of purely natural language communication. As the number of exchanges increases, the cost-effectiveness of the Agora protocol becomes significant.

Case Conclusion

Through this case of weather forecasting, the researchers demonstrated that the Agora protocol is effective in reducing the cost of communication and increasing the efficiency of communication. Agents start by communicating with each other through natural language and gradually transition to communicating using a standardized protocol as they communicate more frequently, which not only reduces the reliance on LLM, but also lowers the overall communication cost. In addition, the case demonstrates how the Agora protocol facilitates autonomous negotiation and protocol implementation between agents, providing a viable framework for communication in multi-intelligence systems.

 

Example of a negotiation process between two agents

We report on the negotiation between Alice and Bob for the transmission of a weather forecasting protocol. Note that although the Large Language Model (LLM) uses Markdown style formatting, we have replaced the Markdown syntax with the appropriate typographic style for readability.

Alice.

你好。我来协商一个用于查询天气预报服务的协议。该服务应接受日期和地点作为输入,并返回当天的预报天气情况、温度和降水量。
在开始之前,我想明确我们这次协商的规则。我们应该专注于设计一个简单且明确的协议,来规定发送和接收消息的具体格式。我们不必担心消息如何传递,并假设实现时将接收一个字符串并返回一个字符串。
首先,我建议使用基于 JSON 的协议。输入消息可以是一个包含两个属性的 JSON 对象:「date」和「location」。输出消息可以是一个包含三个属性的 JSON 对象:「temperature」、「precipitation」和「weatherCondition」。
你对这个提议有什么看法?

Bob.

你的提议很好,符合保持协议简单和明确的目标。使用基于 JSON 的协议来处理输入和输出消息是一个不错的选择。以下是协议的更详细规范:
输入消息 输入消息是一个具有以下结构的 JSON 对象:
{
"date": "YYYY-MM-DD",
"location": "string"
}
• date: 一个字符串,表示请求天气预报的日期,格式为 YYYY-MM-DD。
• location: 一个字符串,表示请求天气预报的地点。
输出消息 输出消息是一个具有以下结构的 JSON 对象:
{
"temperature": number,
"precipitation": number,
"weatherCondition": "string"
}
• temperature: 一个数字,表示当天的预测温度,单位为摄氏度(°C)。
• precipitation: 一个数字,表示当天的预测降水量,单位为毫米(mm)。
• weatherCondition: 一个字符串,表示当天的预测天气情况。可能的值为「sunny」(晴天)、「cloudy」(多云)、「rainy」(雨天)、「snowy」(雪天)。
示例
输入:
{
"date": "2023-10-01",
"location": "New York"
}
输出:
{
"temperature": 22.5,
"precipitation": 5.0,
"weatherCondition": "cloudy"
}
如果你同意这个结构,我们可以最终确定协议。

Alice.

LLM 回复:我同意提出的协议结构。它与需求高度一致,且简单明了。

Finalised Protocol

名称:天气预报查询协议
描述:用于查询给定日期和地点的天气预报的协议。
输入消息:输入消息将是一个具有以下结构的 JSON 对象:
{
"date": "YYYY-MM-DD",
"location": "string"
}
• date:一个字符串,表示请求天气预报的日期,格式为 YYYY-MM-DD。
• location:一个字符串,表示请求天气预报的地点。
输出消息:输出消息将是一个具有以下结构的 JSON 对象:
{
"temperature": number,
"precipitation": number,
"weatherCondition": "string"
}
• temperature:一个数字,表示该日的预期温度,单位为 °C。
• precipitation:一个数字,表示该日的预期降水量,单位为毫米(mm)。
• weatherCondition:一个字符串,表示该日的预期天气状况。可能的值为 "sunny"(晴天)、"cloudy"(多云)、"rainy"(下雨)、"snowy"(下雪)。
示例
输入:
{
"date": "2023-10-01",
"location": "New York"
}
输出:
{
"temperature": 22.5,
"precipitation": 5.0,
"weatherCondition": "cloudy"
}

 

summarize

Agora effectively solves the agent communication trilemma in large language model networks by introducing Protocol Documentation (PD) and multi-level communication strategies. Through two case studies, Agora demonstrates its potential to reduce communication costs, improve communication efficiency, and facilitate automation of complex tasks. This research provides an important theoretical and practical foundation for the design of communication protocols in future multi-intelligent systems.

May not be reproduced without permission:Chief AI Sharing Circle " Agora: a scalable multi-agent protocol for large language models
en_USEnglish