A comprehensive introduction to Multi-Agent Systems (MAS) for AI practitioners and learners.
A Multi-Agent System (MAS) is a system composed of multiple interacting intelligent agents. Each agent is an autonomous entity that observes and acts upon an environment, directing its activity towards achieving goals.
┌──────────────────────────────────────────────┐
│ ENVIRONMENT │
│ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Agent A │◄►│ Agent B │◄►│ Agent C │ │
│ │ (Sensor) │ │(Planner) │ │(Executor)│ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────────────────────────────┐ │
│ │ Shared Knowledge Base │ │
│ └──────────────────────────────────────┘ │
└──────────────────────────────────────────────┘
By the end of this repository, you should be able to:
- explain what an agent is and what makes a system multi-agent
- recognize the core interaction patterns between agents and environments
- understand the difference between communication, coordination, cooperation, and competition
- use this repository as the first step into the broader agent systems track
This repository is designed as the beginner entry point for the agent track.
Helpful background:
- basic Python familiarity
- comfort running small example scripts
- curiosity about how multiple agents interact to solve problems
Use this repository first, then continue with:
- agent-communication-protocols for agent messaging patterns
- agent-architecture-patterns for reactive, BDI, and utility-driven designs
- distributed-agent-coordination once you want more advanced coordination mechanisms
| Concept | Description |
|---|---|
| Agent | An autonomous entity that perceives its environment and takes actions |
| Environment | The world in which agents operate and interact |
| Communication | How agents exchange information (messages, signals, shared memory) |
| Coordination | How agents organize their actions to achieve common goals |
| Cooperation | Agents working together towards a shared objective |
| Competition | Agents pursuing conflicting goals |
| Emergent Behavior | Complex system-level behavior arising from simple agent interactions |
See examples/01_simple_agent.py — A basic agent that reacts to environmental stimuli.
See examples/02_message_passing.py — Two agents communicating via message passing.
See examples/03_cooperative_task.py — Multiple agents collaborating to solve a task.
See examples/04_agent_with_memory.py — An agent that learns from past interactions.
- Single Responsibility — Each agent should have one clear purpose
- Loose Coupling — Agents should communicate through well-defined interfaces
- Fault Tolerance — Design agents to handle failures of other agents gracefully
- Scalability — System should work whether there are 2 or 200 agents
- Observability — Log agent decisions and communications for debugging
- Idempotent Messages — Messages should be safe to process more than once
git clone https://github.com/dhirajkrsingh/multi-agent-system-basics.git
cd multi-agent-system-basics
pip install -r requirements.txt
python examples/01_simple_agent.py| Resource | Description |
|---|---|
| microsoft/autogen | Multi-agent conversation framework by Microsoft |
| langchain-ai/langgraph | Build stateful multi-agent applications |
| crewAIInc/crewAI | Framework for orchestrating role-playing agents |
| camel-ai/camel | Communicative Agents for Mind Exploration |
| Wooldridge - Intro to MAS | Classic textbook on Multi-Agent Systems |
Dhiraj Singh
This repository is shared publicly for learning and reference. It is made available for everyone through VAIU Research Lab. For reuse, redistribution, adaptation, or collaboration, contact Dhiraj Singh / VAIU Research Lab.