designing-multiagent-systems

Building LLM-Enabled Multi Agent Applications from Scratch

https://github.com/victordibia/designing-multiagent-systems

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.6%) to scientific vocabulary

Keywords

agents autogen generative-ai large-language-models multiagent-systems
Last synced: 6 months ago · JSON representation ·

Repository

Building LLM-Enabled Multi Agent Applications from Scratch

Basic Info
Statistics
  • Stars: 175
  • Watchers: 13
  • Forks: 38
  • Open Issues: 1
  • Releases: 0
Topics
agents autogen generative-ai large-language-models multiagent-systems
Created almost 2 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

Designing Multi-Agent Systems

Official code repository for "Designing Multi-Agent Systems: Principles, Patterns, and Implementation for AI Agents" by Victor Dibia.

Designing Multi-Agent Systems

Learn to build effective multi-agent systems from first principles (from scratch) through complete, tested implementations.

Buy the book now:

Why This Book & Code Repository?

As the AI agent space evolves rapidly, clear patterns are emerging for building effective multi-agent systems. This book focuses on identifying these patterns and providing practical guidance for applying them effectively.

What makes this approach unique:

  • Fundamentals-first: Build from scratch to understand every component and design decision
  • Complete implementations: Every theoretical concept backed by working, tested code
  • Framework-agnostic: Core patterns that transcend any specific framework
  • Production considerations: Evaluation, optimization, and deployment guidance from real-world experience

What You'll Learn & Build

The book is organized across 4 parts, taking you from theory to production:

Part I: Foundations of Multi-Agent Systems

| Chapter | Title | Code | Learning Outcome | | -------- | -------------------------------------------- | ---- | -------------------------------------------------------- | | Ch 1 | Understanding Multi-Agent Systems | - | Understand when multi-agent systems are needed | | Ch 2 | Multi-Agent Patterns | - | Master coordination strategies (workflows vs autonomous) | | Ch 3 | UX Design Principles for Multi-Agent Systems | - | Build intuitive agent interfaces |

Part II: Building Multi-Agent Systems from Scratch

| Chapter | Title | Code | Learning Outcome | | -------- | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | | Ch 4 | Building Your First Agent | picoagents.agent, 01_basic_agent.py | Create agents with reasoning, tools, memory | | Ch 5 | Building Multi-Agent Workflows | picoagents.workflow/ | Build deterministic multi-agent systems from scratch | | Ch 6 | Autonomous Multi-Agent Orchestration | picoagents.orchestration/, 02_roundrobin_orchestration.py, 03_ai_orchestration.py | Implement autonomoous multi-agent patterns including GroupChat patterns, LLM and Plan Based Orchestration (Magentic One) | | Ch 7 | Multi-Agent Frameworks | - | How to evaluate and choose the right multi-agent framework |

Part III: Evaluating and Optimizing Multi-Agent Systems

| Chapter | Title | Code | Learning Outcome | | -------- | ------------------------------ | -------------------- | ------------------------------------- | | Ch 8 | Evaluating Multi-Agent Systems | Evaluation framework | Measure and improve agent performance |

Part IV: Real-World Applications

| Chapter | Title | Code | Learning Outcome | | --------- | ---------------------------------------- | ------------------- | ------------------------------------- | | Ch 12 | Multi-Perspective Information Processing | Complete case study | Deploy production multi-agent systems |

Getting Started

Installation

```bash

Clone the repository

git clone https://github.com/victordibia/designing-multiagent-systems.git cd designing-multiagent-systems

Create virtual environment (recommended)

python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate

Install the picoagents library

cd picoagents pip install -e .

Set up your API key

export OPENAIAPIKEY="your-api-key-here" ```

Quick Start: Your First Agent

In this book, we will cover the fundamentals of building multi-agent systems, and incrementally build up the Agents abstractions shown below:

```python from picoagents import Agent, OpenAIChatCompletionClient

def get_weather(location: str) -> str: """Get current weather for a given location.""" return f"The weather in {location} is sunny, 75°F"

Create an agent

agent = Agent( name="assistant", instructions="You are helpful. Use tools when appropriate.", modelclient=OpenAIChatCompletionClient(model="gpt-4o-mini"), tools=[getweather] )

Use the agent

response = await agent.run("What's the weather in Paris?") print(response.messages[-1].content) ```

Explore the Examples

```bash

Run basic agent example

python picoagents/examples/01basicagent.py

Try autonomous orchestration

python picoagents/examples/02roundrobinorchestration.py ```

PicoAgents Framework

The picoagents/ directory contains a complete multi-agent framework built from scratch to demonstrate every concept in the book:

picoagents/ ├── agents.py # Core Agent implementation (Ch 4) ├── workflow/ # Explicit control patterns (Ch 5) ├── orchestration/ # Autonomous control patterns (Ch 6) ├── examples/ # Complete chapter implementations └── tests/ # Comprehensive test suite

Get the Book

"Designing Multi-Agent Systems: Principles, Patterns, and Implementation for AI Agents"

This repository implements every concept from the book. The book provides the theory, design trade-offs, and production considerations you need to build effective multi-agent systems.

Questions and Feedback

Questions or feedback about the book or code? Please open an issue.

Citation

bibtex @book{dibia2025multiagent, title={Designing Multi-Agent Systems: Principles, Patterns, and Implementation for AI Agents}, author={Dibia, Victor}, year={2025}, github={https://github.com/victordibia/designing-multiagent-systems} }

Owner

  • Name: Victor Dibia
  • Login: victordibia
  • Kind: user
  • Company: Microsoft Corporation

Research Software Engineer. Interested in the intersection of Applied AI and HCI.

Citation (Citation.cff)

cff-version: 1.2.0
message: "If you use this book or software, please cite it as below."
authors:
  - family-names: "Dibia"
    given-names: "Victor"
    orcid: "https://orcid.org/0000-0002-1839-5632"
  - family-names: "Wang"
    given-names: "Chi"
    orcid: "https://orcid.org/0000-0000-0000-0000"
title: "Multi-Agent Systems with AutoGen"
version: 0.0.1
isbn: "9781633436145"
date-released: 2024-07-19
url: "https://github.com/victordibia/designing-multiagent-systems"

GitHub Events

Total
  • Issues event: 1
  • Watch event: 6
  • Push event: 1
Last Year
  • Issues event: 1
  • Watch event: 6
  • Push event: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • kyegomez (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

src/interface/pyproject.toml pypi
  • fastapi *
  • loguru *
  • openai *
  • playwright *
  • pydantic *
  • python-multipart *
  • typer *
  • uvicorn *