Skip to content

FirdowsRahaman/agentic-workflows-masterclass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Production-Grade Agentic Workflows & Multi-Agent Orchestration

The engineering guide to stateful, autonomous, and multi-agent architectures in production.

Python Docker LangGraph Google GenAI Phoenix License


While prototyping basic LLM workflows is straightforward, scaling autonomous systems to production introduces complex software engineering constraints:

  1. Context Expansion & Latency: Compounding token histories increase inference costs and latency.
  2. State & Concurrency Control: Complex, cyclic workflows require structured state validation and session synchronization to prevent state corruption or infinite execution loops.
  3. Execution Safety: Dynamic, agent-initiated tool execution demands containerized compute environments to protect underlying systems.
  4. Telemetry & Tracing: Non-deterministic agent trajectories require standardized execution traces for performance inspection and debugging.

This repository provides reference architectures, implementation labs, and capstones for building stateful, multi-agent systems, focusing on runtime optimization, state persistence, and systematic evaluation.


πŸ“‘ Table of Contents


πŸ—οΈ The Production Agent Gap

Modern AI engineering requires a transition from stateless prompting to stateful cyclic workflows and specialized multi-agent teams.

graph LR
    A["Stateless Prompting<br/>(Zero Context/Tools)"] -->|"Add Search Context"| B["Static RAG<br/>(One-Shot Search)"]
    B -->|"Add Planning Loop"| C["Autonomous Agent (ReAct)<br/>(Dynamic Tool Reasoning)"]
    C -->|"Decouple Concerns"| D["Multi-Agent Orchestration<br/>(Specialized Pipelines)"]
Loading

By adding a stateful planning loop, persistent memory checkpointers, and isolated worker boundaries, we upgrade fragile chains into resilient systems that can self-reflect, plan, and gracefully recover from execution errors.


πŸ“Š Architectural Paradigm Matrix

Paradigm Primary Limitation State Scope Concurrency Safety Cost Profile Production Reliability
Stateless Prompting Lacks iteration, cannot correct intermediate logic errors. None (Stateless) N/A (Atomic) Low (Fixed) High (But limited capability)
Static RAG Passive lookup; fails if search terms are suboptimal. Single Query N/A Low-Medium Medium-Low (Prone to retrieval noise)
Autonomous Agent (ReAct) Attention degradation, tool hallucination, infinite loops. Local Loop Low (Requires session locks) High (Compounding prefill tokens) Low (Hard to predict/assert)
Multi-Agent Systems High coordination latency, complex state merges. Decoupled / Shared Graph High (Via isolated actor queues) Optimized (Via cached context & small scopes) High (Deterministic boundaries & isolated fallbacks)

πŸ’» Prerequisites & Environment Setup

To run the labs and capstone projects, your development environment must satisfy:

  • Python 3.13+ (leveraging modern typing and async primitives)
  • Docker Desktop (required for sandbox execution labs and project containment)
  • LLM Provider API Keys: Google Gemini (via GEMINI_API_KEY), Anthropic (via ANTHROPIC_API_KEY), OpenAI (via OPENAI_API_KEY)

Quick Start

# 1. Clone the repository
git clone https://github.com/FirdowsRahaman/agentic-workflows-masterclass.git
cd agentic-workflows-masterclass


# 2. Establish python environment
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# 3. Initialize verification run (Vanilla ReAct Loop)
cd labs/lab-01-vanilla-react
python agent.py

πŸ“š Course Curriculum

This repository follows a theory-first, implementation-focused learning path.

πŸ“– Theory: Chapters

Deep dive into architectural patterns, mathematical mechanics, and engineering design.

πŸ”¬ Practice: Labs

Implement core components from scratch to master the low-level mechanics.

  • πŸ§ͺ Lab 1: The Vanilla ReAct Loop β€” Implement a complete planning, tool execution, and self-reflection loop in pure Python without framework wrappers.
  • πŸ§ͺ Lab 2: Stateful LangGraph β€” Design cyclic state graphs with node updates, state mergers, and thread-level state restoration.
  • πŸ§ͺ Lab 3: Supervisor Team β€” Implement a supervisor router that coordinates task delegation, output aggregation, and worker control loops.
  • πŸ§ͺ Lab 4: Human Interruption β€” Pause state graphs before high-risk operations to allow manual validation and state modifications.
  • πŸ§ͺ Lab 5: Dual-Core Memory Engine β€” Build a memory manager coordinating short-term conversational threads alongside long-term semantic embeddings in SQLite.
  • πŸ§ͺ Lab 6: Evals Pipeline β€” Configure automated evaluation suites that run test assertions and compute similarity/completeness scores via LLM judges.
  • πŸ§ͺ Lab 7: Corrective RAG (CRAG) Engine β€” Build an advanced RAG pipeline with document grading, query expansion, and web search fallback routes.
  • πŸ§ͺ Lab 8: Collaborative Agents with Google ADK β€” Orchestrate sequential collaborative workflows using Google's Agent Development Kit, exposing custom tools and native MCP server interfaces.

πŸ† Mastery: Capstone Projects

Deploy production-ready solutions modeled after enterprise workloads.

  • πŸ’» Autonomous Sandbox Dev Team: Build PM, Coder, and QA Tester agents that collaborate, write python scripts, and run automated unit tests inside secure, isolated Docker sandboxes.
  • πŸ₯ Clinical Support Agent with HITL: Deploy a clinical triage assistant with clinical guidelines RAG, safety policy guardrails, and human escalation checkpoints.
  • πŸ“Š Collaborative Market Research Engine: Build a multi-agent data aggregator, research compiler, and Neo4j GraphRAG explorer that builds structured reports from unstructured documents.
  • πŸ›‘οΈ Compliance & Risk Auditor: Architect a regulatory compliance engine that audits PDF financial files, validates outputs against strict Pydantic schemas, and triggers safety filters via Guardrails AI.

🀝 Enterprise Tooling Stack

  • Agent Development Kit (ADK): Google's open-source framework for building multi-agent systems and workflows.
  • LangGraph: Stateful orchestration library of choice for complex state management.
  • GenAI SDK: Official library for Google Gemini models.
  • Phoenix: AI observability and tracing platform.

πŸ› οΈ Contributing

We welcome contributions!

  1. Fork the repo and create your feature branch (git checkout -b feature/AmazingFeature).
  2. Commit your changes (git commit -m 'Add some AmazingFeature').
  3. Push to the branch (git push origin feature/AmazingFeature).
  4. Open a Pull Request.

πŸ“„ License

Distributed under the MIT License. See LICENSE for details.


Created by Firdows Rahaman

About

Production guide to stateful, autonomous, and multi-agent workflows using LangGraph, Google ADK & Python. Includes hands-on labs and capstone projects.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages