Multi-agent systems: An introduction

from | 2 December 2024 | Basics

Large Language Models (LLMs) have been used as autonomous agents and more recently as multi-agent systems (MAS) that can solve complex problems and simulate the world. MAS are robust, flexible and scalable, which makes them valuable for industrial applications. This blog will explore multi-agent systems, their architecture, how they differ from autonomous agents, and their benefits and challenges. We will conclude the blog with a look at the use case of MAS.

What are multi-agent systems?

Multi-agent systems (MAS) are based on artificial intelligence (AI) and can jointly perform tasks for users or another system. This is a Distributed system with multiple AI agents capable of autonomously sensing, acting and learning to achieve individual or collective goals. MAS can include a software programme, robots, drones, sensors or humans (or a combination of these). MAS comprises several interacting AI agentseach of which has special skills and objectives.

For example, MAS could include separate agents that focus on summarising, translating and generating content. These agents can then work together by exchanging knowledge and sharing individual tasks.

Architecture

Multi-agent systems (MAS) can be structured in many different ways. We will discuss four possibilities:

  1. Hierarchical structureThis tree-like structure contains agents with different degrees of autonomy. In a simple hierarchical structure, the decision-making authority could lie with one agent. On the other hand, it could be distributed among several agents in a standardised hierarchical structure.
  2. Holonic structuresIn this type of architecture, the agents are grouped into holarchies. A holon is an entity that is not functional without its components. In a holonic MAS, the leading agent can have multiple sub-agents while appearing as a single entity.
  3. Coalition structureThis structure is useful when individual agents in a group are underperforming. In this case, agents temporarily join forces to improve performance. This coalition is dissolved as soon as the desired performance is achieved.
  4. TeamsTeam structure : Agents in a team structure work together to improve group performance and are interdependent. This structure is similar to coalitions, but is more hierarchical.

Functions

Multi-agent systems (MAS) fulfil the following functions:

  • Problem solutionMAS can handle complex problems that are difficult for a single entity.
  • CustomisationMAS can adapt their behaviour to changing environments or interactions with other agents.
  • Distributed decision-makingMAS make decisions together, which enables more robust solutions.
Multi-agent LLM systems: The future is agent-based, Tech Deep Dive, Alexander Thamm GmbH

How LLM can be further developed through multi-agent systems: Limitations, challenges and developments

Why the future is agentic: An overview of Multi-Agent LLM Systems

Components

Multi-agent systems (MAS) consist of several components, each of which has a specific role within the system operation. The agents in a MAS fulfil the overall objectives of the system by working autonomously and under decentralised control. A typical MAS architecture comprises the following components:

  • AgentsAI agents have a clear role, personality and skills and run on LLMs. These properties give the agents and the overall system intelligence. They help the agents to interact with each other and with the environment. They work with their own goals, beliefs and behaviours. Examples of agents are software programmes, physical entities or a combination of both.
  • SurroundingsThe AI agents are located in an external world in which they can perceive and act. These environments can be simulated or located in physical spaces such as factories, streets, power grids, etc. The environment is crucial to provide the agent with information and resources and can constrain their behaviour.
  • Interaction protocolsThe AI agents communicate with each other using standard communication languages for agents. Depending on the system requirements, this includes collaboration, coordination and negotiation. Interaction protocols serve as rules for the interaction between the agents. The protocol defines which messages the agents can send and execute and under which conditions the interaction takes place.
  • OrganisationAI agents can have either a hierarchical, holonic, coalition or team structure. Each type defines the internal structure and organisation of the agents, including the agent's knowledge base, reasoning mechanisms and decision-making process.
  • Communication languageThe agent's common communication language provides a common vocabulary and a common syntax for the exchange of information. Agents use it to communicate with each other.

The MAS architecture facilitates collaboration between independent, language model-based agents and leads to effective and modular solutions. The idea behind the architecture is to create AI agents with different contexts that contribute different perspectives through their roles. The AI agents behave differently due to the different roles, goals and contexts defined for them, even though they may still use the same LLM.

Parameters in LLMs, a control panel operated by a worker

Increasing the performance of language models: meaning, types, influence and an overview of the number of parameters in LLM

The role of parameters in LLMs

Autonomous agents vs. multi-agent systems

FeatureAutonomous agentsMulti-agent systems
InteractionAgents work aloneCooperation and competition between agents
Complexitysimpler and focussed on individual tasksdue to interactions of complex
CommunicationMinimal to no communication with other agentsAgents communicate and exchange information
interact with their environment to autonomously plan, call up tools and generate answersCommunication between agents can be direct or indirect by changing the shared environment
No further cooperation after retrieving the informationinvolves all agents within the environment to model each other's goals, memory and action plan
Decision makingcentraliseddecentralised
AI agent makes all decisionsmultiple interacting agents capable of making decisions and influencing the environment
AdaptabilityUsers cannot flexibly customise these agents to their specific needs, so fine-tuning of the entire system is often requiredUsers can combine and customise agents as required
learn from individual experiencesAgents in the system can adapt based on group dynamics
Scalabilitydepends on the design of the individual agentmore scalable due to their design
Scaling the agent by adding new functions requires retraining of the entire modelIndividual models can be updated without having to retrain an entire model from scratch
Comparison of autonomous agents and multi-agent systems

Advantages and challenges of MAS integration

Multi-agent systems (MAS) offer companies several advantages, but there are also challenges when integrating them into the real world. In this section, we will cover both aspects of MAS.

The most important advantages of multi-agent systems are

  • FlexibilityMAS can adapt to different environments by adding, removing or adopting agents, making it suitable for different use cases.
  • ScalabilityMAS is scalable due to its decentralised design. This enables better collaboration between multiple agents, resulting in a huge pool of shared information.
  • Domain specialisationEach agent in MAS can demonstrate a certain level of expertise. This is useful for information synthesis, as an AI agent can incorporate knowledge and feedback from other AI agents with specialisations in related fields.
  • Improved performanceMAS showed higher performance as multiple agents lead to more learning and reflection. Collaboration and knowledge sharing between agents helps to close information gaps.

The most important challenges of multi-agent systems are

  • Malfunctions due to threatsAgents can suffer common pitfalls if they are based on the same basic models. This could expose the MAS to system-wide failure or hostile attacks.
  • Complex coordinationSuccessful MAS implementation requires complex coordination that is difficult to set up and maintain. Agents need to be developed that seamlessly coordinate and negotiate with each other.
  • Unpredictable behaviourIdentifying and managing conflicts is difficult, as the agents in decentralised networks work autonomously and independently. These conditions make it difficult to solve the problems that arise.
Cloud vs. on-premises, an old tower PC in a wide, steep landscape with lots of flowers and a cloudy sky

Our article compares cloud computing and on-premises solutions for companies, highlighting aspects such as control, security, costs and flexibility of these technologies.

Cloud vs. on-premises: Which is right for your company?

Multi-agent systems: A practical example

AutoGen is an open-source programming framework designed to simplify the creation and development of AI agents. It provides a unified multi-agent conversation framework as a high-level abstraction. It includes customisable and conversational agents that integrate LLMs, tools and humans via an automated agent chat. AutoGen abstracts and implements conversational and customisable agents that can solve tasks through inter-agent conversation.

Let's understand the value of a platform like AutoGen for building MAS. For this, we will explore how multi-agent systems can be implemented using AutoGen for an intelligent traffic management system in the city.

Destination

Optimising traffic flow in a city by using multiple agents to monitor and manage traffic signals, notify drivers in real time and collect data for future planning.

Types of agents involved

  • Traffic signal agent
  • Surveillance agent
  • Driver notification agent
  • Route optimisation agent
  • Data analysis agent

Implementation steps

  1. Agent communicationAutoGen can be used to facilitate communication between agents using a predefined protocol.
  2. Real-time data acquisitionThe traffic monitoring agent collects data from multiple sources and transmits it to the traffic signal agents to make dynamic adjustments.
  3. Signal adjustmentThe traffic light agent adjusts the traffic lights based on real-time traffic data, which can reduce congestion at peak times.
  4. Driver notificationsThe driver notification agent sends warning messages about the traffic situation to drivers.
  1. Route suggestionsThe route optimisation agent analyses traffic data and suggests alternative routes to minimise delays for drivers.
  2. Feedback loopThe data analysis agent collects feedback and historical data so that the system can learn and improve over time.

Added value

AutoGen helps optimise interactions and workflows between agents by making the entire system more efficient and responsive to real-time changes in traffic conditions. Such dynamic adjustments to traffic signals lead to smoother traffic flow, improved journey times, avoid delays and support long-term traffic planning by analysing historical data.

LLM Use Cases, a graphical representation of a conveyor belt in an industrial plant with numerous superimposed geometric shapes

Large Language Models (LLMs) increase efficiency and productivity. Discover in our blog post how LLMs can optimise processes and offer your company real added value:

Large Language Models: Use Cases for Businesses

Multi-agent systems: adaptable and scalable

AI helps to develop adaptable, intelligent and scalable MAS implementations. Due to its robust architecture and capabilities, it is used in industries such as building smart cities with integrated mobility and providing healthcare services using patient data. The computational structure of AI plays a key role in the usability of multi-agent systems. Its widespread applicability and the availability of open-source MAS development platforms such as AutoGen make it an indispensable tool for social impact.

Author

Patrick

Pat has been responsible for Web Analysis & Web Publishing at Alexander Thamm GmbH since the end of 2021 and oversees a large part of our online presence. In doing so, he beats his way through every Google or Wordpress update and is happy to give the team tips on how to make your articles or own websites even more comprehensible for the reader as well as the search engines.

0 Kommentare