Multi-Agent System in Artificial Intelligence​: Working, Architecture, Types, and Examples

By Rahul Singh

Updated on Dec 2, 2026

Share:

Quick Overview:

  • A multi-agent system (MAS) consists of multiple autonomous AI agents that interact, coordinate, and work towards individual or shared goals.

  • Core components of multi-agent systems include agents, roles, goals, communication protocols, shared memory, tools, and guardrails.

  • The four main multi-agent system architectures are centralized, decentralized, hierarchical, and hybrid.

  • Multi-agent systems support task specialization, parallel processing, and shared problem solving but introduce coordination, cost, and security challenges.

  • In this blog you will learn what is multi-agent system, their working, architecture, types, practical Python examples, advantages, limitations, and common failure scenarios.

Building multi-agent systems requires practical knowledge of AI agent design, tool calling, and agent coordination. IIT Kharagpur's Generative AI & Agentic AI Course - Executive Post Graduate Certificate helps you develop these skills through hands-on projects involving LLMs, RAG, and agentic AI systems.

What Is Multi-Agent System (MAS) in AI?

So, what is a multi-agent system in artificial intelligence​? It's a system made of several autonomous agents that share an environment, interact with each other, and work toward individual or shared goals.

  • Each agent perceives part of the situation, makes its own decisions, and acts.

  • No single agent needs to know or control everything, and the useful behavior of the whole comes from how the agents coordinate.

The idea is older than modern AI chatbots. Multi agent systems in artificial intelligence grew out of distributed AI research in the 1980s, and early work produced coordination methods that are still taught, such as the contract net protocol, in which one agent announces a task and others bid to take it.

  • For decades, a multi-agent system meant software agents that followed rules or learned through reinforcement, controlling things like traffic lights, warehouse robots, and trading bots.

  • Since 2023 the term has also come to mean teams of language model agents, each one a model with its own instructions, tools, and memory.

Example of Multi-Agent System

Concrete cases make the idea clear.

  • A classic example of multi-agent system behavior in the physical world is a warehouse where hundreds of robots each plan their own routes while avoiding collisions and sharing the floor.

  • In a power grid, agents representing solar panels, batteries, and homes negotiate who supplies and who stores energy at each moment.

  • A multi agent system example in software is a research assistant in which a lead agent splits a question into parts, several worker agents search in parallel, and a reviewer agent checks the final answer.

  • In business intelligence, multiple analytics agents can work together to generate database queries, analyse results, and verify findings.

The Role of Multi-Agent Systems in Agentic AI

Agentic AI describes systems that plan, use tools, and act toward a goal with limited step-by-step human direction. A multi agent system in AI is one way to structure that capability, and it is most useful when the task is broad enough to need real division of labor. 

Instead of one large agent doing everything, several agents divide the work, so each can keep a shorter context, use a narrower set of tools, and follow a more focused set of instructions.

Single-Agent vs Multi-Agent Systems

Factor

Single-Agent System

Multi-Agent System

Structure

One agent handles the whole task

Several agents with separate roles

Context

One shared context that grows and gets crowded

Each agent keeps its own focused context

Specialization

A generalist with many tools

Specialists with fewer tools each

Parallel work

Mostly sequential

Independent subtasks run at the same time

Cost and latency

Lower

Higher, since many agents make many calls

Complexity

Simple to build and debug

Needs coordination, messaging, and monitoring

Typical failure

Forgetting early instructions or losing focus

Misunderstandings and conflicts between agents

Best for

Narrow, well-defined tasks

Broad, parallelizable, or multi-skill tasks

A good rule is to begin with a single agent and add more only when it hits a real limit, such as a context window that overflows, tools that confuse the agent, or subtasks that could clearly run in parallel. Many tasks never need more than one.

For tasks with predefined stages, prompt chaining can provide a simpler alternative to coordinating multiple autonomous agents.

Core Components of a Multi-Agent System

Every multi-agent system, whether it controls robots or language models, is built from a similar set of parts.

Multi-agent system infographic showing agents, roles and goals, environment, memory, communication, tools, coordination, LLM guardrails and oversight, and observability.

Component

What It Does

Example

Agents

Autonomous units that perceive, decide, and act

A planner, a researcher, a reviewer

Roles and goals

Define what each agent is responsible for and what it is trying to achieve

"Find sources" for one agent, "check accuracy" for another

Environment

The shared world agents act in and observe

A warehouse floor, a codebase, a document store

Communication

How agents exchange information

Direct messages, a shared message board, or standard protocols

Coordination

The logic that assigns work and resolves conflicts

An orchestrator, a voting rule, or an auction

Memory

What agents remember, privately or in a shared store

A shared notebook, a vector database, saved summaries

Tools

Actions an agent can take beyond reasoning

Web search, code execution, database queries, APIs

LLM Guardrails and oversight

Limits and checks on agent behavior

Permission rules, budgets, human approval for risky steps

Observability

Records of what each agent did and why

Traces, logs, and cost tracking

Communication Between Agents

Communication is where multi-agent systems usually succeed or fail. Agents can pass messages directly, write to and read from a shared space known as a blackboard, or hand work along a pipeline.

Two open standards now cover much of this ground.

  • The Model Context Protocol, or MCP, standardizes how an agent connects to tools and data.

  • The Agent2Agent protocol, or A2A, standardizes how agents from different vendors and frameworks discover each other and exchange tasks.

Both are hosted by the Linux Foundation, and the foundation said in April 2026 that more than 150 organizations supported A2A, which had reached a stable 1.0 specification.

Architecture of Multi-Agent Systems

The multi-agent system architecture​ describes how agents are organised, how they communicate, and who decides what happens next. Not every system needs a central agent to manage the others. 

The common multi-agent system architecture approaches include:

  • Centralized Architecture: A central agent assigns tasks, collects results, and makes decisions. The other agents focus on their assigned work.

  • Decentralized Architecture: Each agent makes its own decisions and communicates directly with other agents without relying on a central controller.

  • Hierarchical Architecture: Higher-level planning agents handle task distribution, while lower-level agents carry out specific tasks.

  • Hybrid Architecture: The system combines centralized and decentralized approaches. Some decisions are made centrally, while agents retain the freedom to handle individual tasks.

Different Types of Multi-Agent Systems

Multi-agent systems can be grouped in several ways. The table below sorts them by how the agents behave and how they relate to one another.

Type

Description

Example

Best For

Reactive

Agents respond directly to what they sense, with simple rules and no long-term planning

Robots that avoid obstacles in a warehouse

Fast, simple behavior in predictable settings

Deliberative (BDI)

Agents hold beliefs, desires, and intentions and plan before acting

A delivery agent that plans routes around promises it has made

Goal-driven tasks that need explicit reasoning

Hybrid

Agents combine quick reactions with slower planning

An autonomous vehicle that brakes at once but also plans its route

Real-time systems that also need foresight

Learning (multi-agent reinforcement learning)

Agents improve through trial and reward, often alongside other learners

Game-playing teams and traffic signal control

Dynamic environments where good rules are hard to write

LLM-based

Each agent is a language model with its own instructions, tools, and memory

A research team of planner, searcher, and reviewer agents

Open-ended knowledge work, coding, and analysis

Cooperative

Agents share a common goal and work toward it together

Robots moving a heavy object together

Tasks where the group succeeds or fails as one

Competitive

Agents have opposing goals

Trading agents bidding against each other

Markets, negotiation, and security testing

Mixed (cooperative and competitive)

Teams cooperate inside and compete between groups

Team-based games and supply chains with rival firms

Simulations of realistic economic settings

Homogeneous

All agents have the same abilities

A swarm of identical drones

Scalable, interchangeable workers

Heterogeneous

Agents have different skills and tools

A planner, a coder, and a tester

Tasks that need varied expertise

Building a Multi-Agent System in Python

The example below follows the orchestrator-worker approach, one of the agentic design patterns used to coordinate multiple AI agents. A planner splits a goal into subtopics, three researcher agents work on them in parallel, their findings go to a shared memory, a writer drafts a summary, and a reviewer checks the draft. 

If the reviewer finds something missing, the writer revises. The model call is a stand-in function, so the code runs with only the standard library.

Python Code Example

from concurrent.futures import ThreadPoolExecutor

# ---- 1. Stand-in for a language model call --------------------------------

# Replace this one function with a real model call to run the system for real.

def llm(role: str, task: str) -> str:

    if role == "planner":

        return "pricing | delivery | returns"

    if role == "researcher":

        facts = {

            "pricing": "Plans start at 10 dollars a month.",

            "delivery": "Standard delivery takes 3 to 5 days.",

            "returns": "Returns are accepted within 30 days.",

        }

        return facts[task.strip()]

    if role == "writer":

        lines = [l for l in task.split("\n") if l.startswith("- ")]

        if "FEEDBACK" not in task:        # a first draft that forgets a topic

            lines = lines[:-1]

        return "Summary: " + " ".join(l[2:] for l in lines)

    if role == "reviewer":

        missing = [t for t in ("pricing", "delivery", "returns")

                   if {"pricing": "10 dollars", "delivery": "3 to 5 days",

                       "returns": "30 days"}[t] not in task]

        return "APPROVE" if not missing else "REVISE: add " + ", ".join(missing)

    return ""

# ---- 2. Agents and shared memory -------------------------------------------

class Agent:

    def init(self, name: str, role: str):

        self.name, self.role = name, role

    def run(self, task: str, log: list) -> str:

        result = llm(self.role, task)

        log.append(f"{self.name}: {result}")

        return result

planner = Agent("Planner", "planner")

researchers = [Agent(f"Researcher-{i + 1}", "researcher") for i in range(3)]

writer = Agent("Writer", "writer")

reviewer = Agent("Reviewer", "reviewer")

# ---- 3. The orchestrator ------------------------------------------------------

def run_system(goal: str, max_rounds: int = 3) -> str:

    log, memory = [], {}

    subtopics = [s.strip() for s in planner.run(goal, log).split("|")]

    with ThreadPoolExecutor() as pool:          # workers run in parallel

        jobs = {t: pool.submit(a.run, t, log) for t, a in zip(subtopics, researchers)}

        for topic, job in jobs.items():

            memory[topic] = job.result()        # shared memory (a blackboard)

    notes = "\n".join(f"- {v}" for v in memory.values())

    feedback = ""

    for round_no in range(1, max_rounds + 1):

        draft = writer.run(f"Write a summary.\n{notes}{feedback}", log)

        verdict = reviewer.run(draft, log)

        if verdict == "APPROVE":

            print("\n".join(log))

            return draft

        feedback = f"\nFEEDBACK: {verdict}"

    print("\n".join(log))

    return "Escalate to a human: reviewer never approved."

final = run_system("Summarize our store policies for a new customer")

print("\nFINAL:", final)

A test run prints the message trace below. The researchers' lines can appear in a different order from run to run, because they work in parallel.

Planner: pricing | delivery | returns

Researcher-1: Plans start at 10 dollars a month.

Researcher-2: Standard delivery takes 3 to 5 days.

Researcher-3: Returns are accepted within 30 days.

Writer: Summary: Plans start at 10 dollars a month. Standard delivery takes 3 to 5 days.

Reviewer: REVISE: add returns

Writer: Summary: Plans start at 10 dollars a month. Standard delivery takes 3 to 5 days. Returns are accepted within 30 days.

Reviewer: APPROVE

FINAL: Summary: Plans start at 10 dollars a month. Standard delivery takes 3 to 5 days. Returns are accepted within 30 days.

This is a deliberately small multi agent system example, but its shape matches much larger ones: a planner, parallel workers, shared memory, and a reviewer with a limit on retries.

Moving to a Real System

To use real models, replace the llm function with a call to your provider's API, passing each agent's role as its system prompt. In practice, expect to add error handling, timeouts, token budgets, and logging for every message. 

You can also assign different models to different agents, such as a stronger model for the planner and reviewer and a cheaper one for the researchers. Frameworks save effort once the system grows. LangGraph, CrewAI, the OpenAI Agents SDK, Microsoft Agent Framework, and Google's Agent Development Kit all support multi-agent patterns, and each offers its own tools for handoffs, shared state, and tracing.

Advantages and Limitations of Multi-Agent Systems

Multi-agent systems offer flexibility and shared problem-solving, but they also introduce challenges in coordination and communication.

Advantages

Limitations

Specialist agents can each use a focused context and a small set of tools

Many agents mean many model calls, so costs and latency rise sharply

Independent subtasks run in parallel, which shortens total time

Coordination adds complexity, and agents can misunderstand or contradict each other

Work can exceed what one context window can hold

Errors can spread from one agent to the next

A separate reviewer can catch mistakes the author misses

Debugging is harder because behavior comes from interactions, not a single prompt

Parts can be swapped, upgraded, or scaled on their own

Results are less predictable, since agents are non-deterministic

Failure of one agent need not stop the whole system, especially in decentralized designs

Security risks such as prompt injection can spread across agents through shared messages and external tool responses.

Different models and vendors can be mixed

Not every task benefits, especially tightly coupled ones that need one shared context

Mirrors how human teams divide work

Without good evaluation, it's hard to tell whether the extra agents help

Why Multi-Agent Systems Fail

Researchers at UC Berkeley studied failures across several popular multi-agent frameworks and more than 200 task traces, and they grouped what they saw into 14 failure modes in three categories. 

  • The first is specification problems, such as an agent ignoring its role or repeating steps. 

  • The second is inter-agent misalignment, such as agents withholding information, ignoring each other's input, or drifting off the task. 

  • The third is weak verification, such as stopping too early or checking the wrong things. 

Their takeaway was that gains over single-agent setups are often small, and that many failures come from system design and not only from weak models. That matches practical experience: clear roles, structured handoffs, and real verification matter more than adding more agents.

Conclusion

True power in MAS is based on proper division, communication and coordination of actions among the agents. An increase in the number of agents is not necessarily an indicator of increased efficiency, since performance depends on good design and clear assignments of roles.

Work with one agent and add more where necessary. Focus on communication, dealing with errors, and constant testing.


Rahul Singh

Rahul Singh

49+ of articles published


Current role in the industry :

Associate - Content Marketing

Education Qualification :

B.Tech in Computer Science & Engineering

Expertise :

Artificial intelligenceMachine Learning (ML)Data ScienceFull-Stack DevelopmentData Structures & Algorithms

Tools & Technologies :

PythonReact.js & Next.jsJavaScript (ES6+)SQLTailwind CSSNode.js & MongoDBGit & GitHubSEO Tools (SEMRush)Google Search ConsoleTableau / Power BIFigma

About

Rahul Singh is an Associate Content Writer, with a strong interest in Generative AI, Agentic AI and AI-Native Software Engineering. He combines technical development skills with data-driven strategies to build scalable applications and optimize digital content. Rahul specializes in simplifying complex concepts across AI, ML and software development into practical, easy-to-understand insights, helping learners understand how AI products, systems and services are built and applied. He focuses on real world applications and explains advanced topics in a clear, step by step manner so you can follow along without confusion. His work connects theory with hands-on examples, covering AI-assisted development, intelligent automation and AI integration in software applications. He aims to help you learn faster, create better projects, and apply your knowledge confidently in real scenarios.

Follow me on :

Frequently Asked Questions

FAQ

Ready to Take the Next Step? Enroll Today!