Skip to content

Latest commit

Β 

History

History
91 lines (64 loc) Β· 2.03 KB

File metadata and controls

91 lines (64 loc) Β· 2.03 KB

Multi-Agent Systems Examples πŸ€–βœ¨

Hands-on notebooks to learn the main LangGraph agent patterns, with support for:

  • πŸ”‘ OpenAI API (OPENAI_API_KEY)
  • ☁️ Azure OpenAI (AZURE_OPENAI_*)

πŸš€ Quick Start

1) Create a virtual environment (recommended)

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip

2) Install dependencies

pip install -r requirements.txt

3) Configure environment variables

Copy the template:

cp .env.example .env

Option A: OpenAI (default and easiest)

LLM_PROVIDER=openai
OPENAI_API_KEY=sk-your-openai-api-key-here
OPENAI_MODEL=gpt-4o

Option B: Azure OpenAI

LLM_PROVIDER=azure
AZURE_OPENAI_ENDPOINT=https://your-resource-name.openai.azure.com/
AZURE_OPENAI_DEPLOYMENT=gpt-4o
AZURE_OPENAI_API_VERSION=2024-12-01-preview
AZURE_OPENAI_API_KEY=your-azure-openai-api-key

βœ… Notes:

  • LLM_PROVIDER=openai keeps the standard OpenAI flow.
  • LLM_PROVIDER=azure switches notebooks to Azure deployment-based calls.
  • In Azure mode, notebooks use AZURE_OPENAI_API_KEY or fallback to OPENAI_API_KEY.

4) Run notebooks

jupyter lab

Then open and run:

  • 01-chain.ipynb
  • 02-re-act.ipynb
  • 03-router.ipynb
  • 04-supervisor.ipynb
  • 05-plan-and-execute.ipynb

πŸ“š Notebook Roadmap

  • 01-chain.ipynb β†’ Linear chain pattern with messages, one LLM call, and tool binding.
  • 02-re-act.ipynb β†’ ReAct loop (reason -> act -> observe) with iterative tool use.
  • 03-router.ipynb β†’ Routing pattern: direct answer vs tool execution.
  • 04-supervisor.ipynb β†’ Multi-agent supervisor that delegates to specialist agents.
  • 05-plan-and-execute.ipynb β†’ Planner + executor workflow with replanning until completion.

🎞️ Presentation

🌟 Explore the full presentation

πŸ‘‰ Open the slides on Google Drive


πŸ‘₯ Authors

  • Pablo Posada (Deus)
  • Bruno Cabado (Deus)