How gixgosu/multiagentworkshop works
Project Type & Purpose
• This repository contains two proof-of-concept multi-agent AI systems:
• Canary Swarm: A nine-agent RAG security testing framework that generates canary tokens, runs adversarial probes, detects leaks, scores risk, and produces reports.
• DM Squad: A five-agent D&D campaign generator producing stateful, table-ready session documents with consistent lore, balanced encounters, and branching narrative.
• Both systems use Python (3.8+), LangGraph for orchestration, and LLM APIs (OpenAI or Claude) to power agent logic.
File Structure
Top-level layout:
• README.md – Workshop overview and architecture summary
• canary_swarm/ – Code, notebooks, reports, and run scripts for Canary Swarm
• dnd_dm_squad/ – Code, prompts, and run script for DM Squad
• docs/ – Workshop summary HTML
Key sub-structures:
• canary_swarm/src/canary_swarm – Nine agent modules, schemas, graphs, runner scripts
• dnd_dm_squad/dnd_graph – Graph implementation & state management for five agents
• prompts/ (in both) – Markdown prompt templates per agent
• .ipynb notebooks (research and demo workflows)
• requirements.txt & .env.example – Dependency and environment configuration
Extract Architectural Insights from the README
• Multi-agent orchestration patterns: Pipeline, Supervisor (Orchestrator), Committee, Event-Driven
• Agents are highly specialized; flows are observable and modular
• Outputs: JSONL logs, JSON reports (Canary Swarm) and Markdown session docs (DM Squad)
• External dependencies: LLM APIs, optional RAG knowledge bases, dotenv config
Diagramming the System
• Orchestrator (central coordinator)
• Agent clusters:
– Canary Swarm agents (9 modules)
– DM Squad agents (5 modules)
• Code modules: Graph builders, prompt handlers, schemas
• Runner scripts (python –m canary_swarm.run, main.py)
• External LLM service (OpenAI/Claude)
• Data stores/files: JSONL logs, JSON reports, Markdown outputs
• Notebook interfaces (Jupyter) for research workflows
• Orchestrator → Agent X (task dispatch)
• Agent → Agent (data or state passed in pipeline)
• Agent → External LLM API (invoke LLM, receive response)
• Agent → Local storage (write logs, reports, markdown)
• Runner script → Orchestrator (kick off workflow)
c. Architectural Patterns & Principles
• Pipeline pattern: sequential agent workflows (e.g., in run_research.py)
• Supervisor pattern: Orchestrator assigns subtasks and awaits completions
• Event-driven: Agents trigger downstream agents on output events
• Modularity & Observability: each agent’s input/output is logged
• Stateless vs. Stateful: Canary Swarm is batch/stateless; DM Squad maintains state across sessions
d. Technologies, Frameworks & Libraries
• Core: Python 3.8+, LangGraph
• LLM integration: langchain-core, langchain-openai, dotenv
• Security: Python secrets module (Canary Swarm)
• Notebook support: Jupyter (.ipynb)