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
- Proxy communications trilemma dilemma: LLM-driven agent networks face tradeoffs between efficiency, scalability, and flexibility when communicating.
- Agora's design philosophy: Agora addresses the trade-off between communication efficiency, scalability and flexibility by combining different communication methods.
- 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.
- Emergence of self-organizing protocols: In large networks, Agora is able to facilitate auto-negotiation between LLM agents to form self-organizing protocols.
- Cost-effectiveness gains: By implementing Agora, you can significantly reduce communication costs and improve the cost-effectiveness of your network.
Core realization steps
- Define the Protocol Document (PD): Create PDs to describe communication protocols so that LLMs can understand and follow them.
- 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.
- Auto-negotiation and realization protocols: Communication protocols are automatically negotiated and implemented between agents through natural language or routines defined in PD.
- 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.
- Cost-benefit analysis: Evaluating the cost-effectiveness of the Agora protocol versus pure natural language communication.
case (law)
- 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.
- 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)
- 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.
- Response from Agent B: Agent B receives the query and replies with the weather forecast details using natural language.
Agreement negotiation and realization
- 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.
- 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"}
- Request format::
- 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
- Agreed negotiated costs: The cost of negotiating and implementing the agreement is $0.043.
- per capita cost of natural language communication (NLC): The cost per natural language communication is $0.020.
- 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.
Hello. - Hi. I'm here to negotiate a protocol for a service that queries weather forecasts. The service should accept date and location as inputs and return the forecasted weather conditions, temperature and precipitation for the day.
Before we begin, I would like to clarify our rules for this negotiation. We should focus on designing a simple and clear protocol that specifies the exact format for sending and receiving messages. We don't have to worry about how the messages are delivered and assume that the implementation will receive a string and return a string.
For starters, I recommend using a protocol based on the JSON of the protocol. The input message can be a message containing two attributes JSON Target: "※"date" and "location". The output message can be an attribute containing three JSON Objects: 'temperature', 'precipitation' and 'weatherCondition'.
What do you think about this proposal?
Bob.
Your proposal is good and meets the goal of keeping the protocol simple and clear. Using a protocol based on the JSON The protocol for handling input and output messages is a good choice. The following is a more detailed specification of the protocol:
Input Messages An input message is a structure with a JSON Object:
{
"date": "YYYY-MM-DD",
"location": "string"
}
- date: a string indicating the date of the weather forecast request, in YYYY-MM-DD format.
- location: a string indicating the location of the requested weather forecast.
Output Message The output message is a JSON Object:
{
"temperature": number,
"precipitation": number,
"weatherCondition": "string"
}
- temperature: a number indicating the predicted temperature for the day in degrees Celsius (°C).
- precipitation: a number indicating the predicted precipitation for the day, in millimeters (mm).
- weatherCondition: a string indicating the predicted weather condition for the day. Possible values are "sunny", "cloudy", "rainy", "snowy".
Example
Input:
{
"date": "2023-10-01",
"location": "New York"
}
Output:
{
"temperature": 22.5,
"precipitation": 5.0,
"weatherCondition": "cloudy"
}
If you agree to this structure, we can finalize the agreement.
Alice.
LLM RESPONSE: I agree with the proposed protocol structure. It is highly consistent with the requirements and is simple and straightforward.
Finalised Protocol
Name: Weather Forecast Query Protocol
DESCRIPTION: Protocol for querying the weather forecast for a given date and location.
Input message: the input message will be a structure with the following JSON Object:
{
"date": "YYYY-MM-DD",
"location": "string"
}
- date: a string indicating the date of the weather forecast request, in YYYY-MM-DD format.
- location: a string indicating the location of the requested weather forecast.
Output Message: The output message will be a JSON Object:
{
"temperature": number,
"precipitation": number,
"weatherCondition": "string"
}
- temperature: a number indicating the expected temperature in °C for the day.
- precipitation: a number indicating the expected precipitation for the day, in millimeters (mm).
- weatherCondition: a string indicating the expected weather condition for the day. Possible values are "sunny"(Sunny),"cloudy"(cloudy),"Rainy."(RAINING)"snowy"(snowing).
Example
Input:
{
"date": "2023-10-01",
"location": "New York"
}
Output:
{
"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.