mohd-faizy
Agentic_AI_using_LangGraph
Jupyter Notebook

Agentic AI framework built using LangGraph and Multi-Agent Control Plane (MCP) for building structured, goal-driven multi-agent systems.

Last updated Jul 18, 2026
47
Stars
12
Forks
0
Issues
0
Stars/day
Attention Score
56
Language breakdown
Jupyter Notebook 97.6%
Python 2.4%
โ–ธ Files click to expand
README

Agentic AI with LangGraph


Agentic AI with LangGraph

Build autonomous, stateful, and goal-oriented AI systems
capable of complex multi-step reasoning & real-world action.


Stars Forks Issues License Last Commit

Python LangGraph LangChain OpenAI Anthropic Gemini Groq Ollama Streamlit Jupyter HuggingFace


Quick Start ยท Notebooks ยท Architecture ยท Roadmap ยท Contributing



What is This?

A comprehensive, hands-on curriculum for mastering Agentic AI โ€” from foundational concepts to production-grade multi-agent orchestration โ€” all built on top of LangGraph.

GenAI vs Agentic AI โ€” Why Agents?

Understanding the paradigm shift from passive generation to active reasoning:

Generative AI vs Agentic AI

| Dimension | Generative AI | Agentic AI | |:---|:---|:---| | Execution | Single-shot inference | Multi-step iterative reasoning | | State | Stateless / ephemeral context | Persistent, structured memory | | Architecture | Monolithic pipeline | Modular multi-agent DAG | | Decision Making | Prompt โ†’ Response | Goal โ†’ Plan โ†’ Act โ†’ Observe โ†’ Reflect | | Tool Use | Manual scripting | Dynamic selection via MCP | | Error Handling | None (fails silently) | Self-correcting with retries & fallbacks | | Scalability | Bound by context window | Horizontal scaling via specialized agents | | Debuggability | Opaque | Transparent, traceable graph execution |


Architecture

The system is built around these 7 modular, interoperable components:

Agentic AI System Architecture

Component Details

| # | Component | Description | |:---:|:---|:---| | 1 | Agents | Autonomous entities with roles, memory, tools & objectives. Examples: PlannerAgent, ResearchAgent, ExecutionAgent | | 2 | LangGraph State Machine | Central orchestrator: stateful DAG with conditional routing, concurrency & retries | | 3 | MCP Message Layer | Structured message exchange: Message, Thread, Step, Run objects for tracing reasoning | | 4 | Memory & Context Store | Thread-level history, agent-specific context, Vector DBs for RAG | | 5 | Tools & Interfaces | Web search, code interpreter, API clients โ€” abstracted as callable graph nodes | | 6 | Task Router / Controller | Centralized planning or distributed negotiation for subtask assignment | | 7 | Observability & Debugging | LangSmith tracing, LangGraph visualizer, structured logging middleware |


Roadmap

AgenticAI Roadmap


Curriculum

Learning Path

  • Foundation Level
Foundations of Agentic AI:* Core concepts and principles LangGraph Fundamentals:* State machines and workflow design
  • Intermediate Level
Advanced LangGraph:* Complex routing and error handling AI Agents:* Agent design patterns and architectures
  • Advanced Level
Agentic RAG:* Retrieval-augmented generation with agents Production Deployment:* Scaling and monitoring strategies

Curriculum Map


Notebook Index

A comprehensive collection of modules covering the full spectrum of Agentic AI development.

Learning Path

Phase 1 โ€” Foundations

| # | Module | Topic | Link | |:---:|:---|:---|:---:| | 01 | RoadMap | Comprehensive learning roadmap for Agentic AI | Open | | 02 | GenAI vs AgenticAI | Understanding the paradigm shift | Open | | 03 | Core Concepts | Agents, tools, memory, planning | Open | | 04 | LangChain vs LangGraph | When to use which framework | Open | | 05 | LangGraph Core | State machines, nodes, edges, and graph design | Open |

Phase 2 โ€” Workflow Patterns

| # | Module | Topic | Link | |:---:|:---|:---|:---:| | 06 | Sequential Workflows | Linear chain execution and data flow | Open | | 07 | Parallel Workflows | Fan-out / fan-in concurrent execution | Open | | 08 | Conditional Workflows | Dynamic routing, branching, and router patterns | Open | | 09 | Iterative Workflows | Loops, retries, and self-correcting flows | Open |

Phase 3 โ€” Chatbots & Persistence

| # | Module | Topic | Link | |:---:|:---|:---|:---:| | 10 | Structured Chatbot | Building a structured AI chatbot with LangGraph | Open | | 11 | Persistence | Checkpointing, state recovery, and SQLite persistence | Open | | 12 | LangSmith | Tracing, debugging, and monitoring with LangSmith | To be uploaded | | 13 | Observability | Production observability and logging strategies | To be uploaded |

Phase 4 โ€” Tools, MCP & RAG

| # | Module | Topic | Link | |:---:|:---|:---|:---:| | 14 | Tools in LangGraph | Tool binding, custom tools, and dynamic selection | To be uploaded | | 15 | MCP Client | Model Context Protocol for agent-tool communication | To be uploaded | | 16 | RAG with LangGraph | Agentic RAG: retrieve, reason, generate | To be uploaded |

Phase 5 โ€” Advanced & Production

| # | Module | Topic | Link | |:---:|:---|:---|:---:| | 17 | Human-in-the-Loop | Approval gates, human feedback, and escalation | To be uploaded | | 18 | Subgraphs | Composable, nested graph architectures | To be uploaded | | 19 | Advanced Memory | Long-term memory, vector stores, and context management | To be uploaded | | 20 | Capstone Projects | End-to-end production-grade agentic systems | To be uploaded |


Project Structure

AgenticAIusing_LangGraph/
โ”‚
โ”œโ”€โ”€ 01Foundationof_AgenticAI/          # Core concepts & fundamentals
โ”‚   โ”œโ”€โ”€ 01_RoadMap.ipynb
โ”‚   โ”œโ”€โ”€ 02GenAIvs_AgenticAI.ipynb
โ”‚   โ”œโ”€โ”€ 03AgenticAICore_Concepts.ipynb
โ”‚   โ”œโ”€โ”€ 04LangChainvs_langGraph.ipynb
โ”‚   โ””โ”€โ”€ 05LangGraphCore_Concepts.ipynb
โ”‚
โ”œโ”€โ”€ 02Sequential&Parallelworkflow/   # Linear & concurrent execution
โ”‚   โ”œโ”€โ”€ 06SequentialWorkflows.ipynb
โ”‚   โ””โ”€โ”€ 07Parallelworkflow.ipynb
โ”‚
โ”œโ”€โ”€ 03ConditionalWorkflow/             # Dynamic routing & branching
โ”‚   โ””โ”€โ”€ 08ConditionalWorkflow.ipynb
โ”‚
โ”œโ”€โ”€ 04IterativeWorkflows/             # Loops, retries, self-correction
โ”‚   โ””โ”€โ”€ 09Iterativeworkflows.ipynb
โ”‚
โ”œโ”€โ”€ 05Structuredai_chatbot/           # Chatbot + persistence
โ”‚   โ”œโ”€โ”€ 10_Chatbot.ipynb
โ”‚   โ””โ”€โ”€ 11PersistenceLangGraph.ipynb
โ”‚
โ”œโ”€โ”€ 06Conversationalai_chatbot/       # Streamlit chatbot apps
โ”‚   โ”œโ”€โ”€ 01chatbotfrontend_basic.py
โ”‚   โ”œโ”€โ”€ 02chatbotfrontend_streaming.py
โ”‚   โ”œโ”€โ”€ 03Chatbotfrontend_threading.py
โ”‚   โ””โ”€โ”€ 04ChatbotSQLite.py
โ”‚
โ”œโ”€โ”€ 07_LangsSmith/                      # LangSmith tracing (WIP)
โ”œโ”€โ”€ 08Observabilityin_LangGraph/       # Monitoring & logging (WIP)
โ”œโ”€โ”€ 09Toolsin_LangGraph/              # Tool integration (WIP)
โ”œโ”€โ”€ 10MCPClient/                       # Model Context Protocol (WIP)
โ”œโ”€โ”€ 11RAGusing_LangGraph/              # Agentic RAG (WIP)
โ”œโ”€โ”€ 12HumanintheLoop/               # Human approval gates (WIP)
โ”œโ”€โ”€ 13_Subgraphs/                        # Nested graphs (WIP)
โ”œโ”€โ”€ 14Memoryin_LangGraph/             # Advanced memory (WIP)
โ”œโ”€โ”€ 15_Projects/                         # Capstone projects (WIP)
โ”‚
โ”œโ”€โ”€ assets/                                 # Images & diagrams
โ”œโ”€โ”€ .env.example                            # Environment variable template
โ”œโ”€โ”€ pyproject.toml                          # Project config & dependencies
โ”œโ”€โ”€ requirements.txt                        # pip dependencies
โ””โ”€โ”€ README.md                               # โ† You are here

Quick Start

Prerequisites

| Requirement | Version | Purpose | |:---|:---|:---| | Python | 3.9+ | Runtime | | Git | Latest | Version control | | API Key | Any one: OpenAI / Anthropic / Gemini / Groq | LLM access |

Installation

Option 1: Using uv (Recommended โ€” fastest)

# Clone
git clone https://github.com/mohd-faizy/AgenticAIusing_LangGraph.git
cd AgenticAIusing_LangGraph

Set up environment

uv venv source .venv/bin/activate # macOS/Linux .venv\Scripts\activate # Windows

Install dependencies

uv add -r requirements.txt

Option 2: Using pip

# Clone
git clone https://github.com/mohd-faizy/AgenticAIusing_LangGraph.git
cd AgenticAIusing_LangGraph

Set up environment

python -m venv venv source venv/bin/activate # macOS/Linux venv\Scripts\activate # Windows

Install dependencies

pip install -r requirements.txt

Configuration

cp .env.example .env

Edit .env with your API keys:

# Required โ€” at least one LLM provider
OPENAIAPIKEY=sk-...

OR

GROQAPIKEY=gsk_...

OR

GOOGLEAPIKEY=AIza...

Optional โ€” for tracing & monitoring

LANGCHAINAPIKEY=lsv2_... LANGSMITH_TRACING=true

Your First Agent

from langgraph.graph import StateGraph, END
from typing import TypedDict, Annotated
from operator import add

โ”€โ”€ 1. Define State โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

class AgentState(TypedDict): messages: Annotated[list[str], add] # Append-only message history step_count: int

โ”€โ”€ 2. Define Nodes โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

def planner(state: AgentState) -> dict: """Plan the next action based on current state.""" return { "messages": ["[Planner]: Analyzing goal and creating action plan..."], "stepcount": state.get("stepcount", 0) + 1, }

def executor(state: AgentState) -> dict: """Execute the planned action.""" return { "messages": ["[Executor]: Carrying out the plan..."], "stepcount": state.get("stepcount", 0) + 1, }

def reviewer(state: AgentState) -> dict: """Review results and decide next steps.""" return { "messages": ["[Reviewer]: Task completed successfully!"], "stepcount": state.get("stepcount", 0) + 1, }

โ”€โ”€ 3. Build the Graph โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

workflow = StateGraph(AgentState) workflow.add_node("planner", planner) workflow.add_node("executor", executor) workflow.add_node("reviewer", reviewer)

workflow.setentrypoint("planner") workflow.add_edge("planner", "executor") workflow.add_edge("executor", "reviewer") workflow.add_edge("reviewer", END)

โ”€โ”€ 4. Compile & Run โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

app = workflow.compile() result = app.invoke({"messages": ["[User]: Summarize today's AI news"], "step_count": 0})

for msg in result["messages"]: print(msg)

Output:

[User]: Summarize today's AI news [Planner]: Analyzing goal and creating action plan... [Executor]: Carrying out the plan... [Reviewer]: Task completed successfully!


Tech Stack

Category Technologies
Core Framework LangGraph, LangChain, LangSmith
LLM Providers OpenAI, Anthropic Claude, Google Gemini, Groq, Ollama, HuggingFace
Protocols Model Context Protocol (MCP), LangServe
RAG & Embeddings ChromaDB, FAISS, Sentence-Transformers, Unstructured
Frontend Streamlit
Persistence SQLite (via langgraph-checkpoint-sqlite)
Search & Tools Tavily, DuckDuckGo, Wikipedia, SERP API
Evaluation RAGAS, Scikit-learn
ML / Deep Learning PyTorch, Transformers, Accelerate

Contributing

Contributions are welcome and appreciated! Here's how you can help:

1.  Fork the repository
  • Create a feature branch โ†’ git checkout -b feature/amazing-feature
  • Commit your changes โ†’ git commit -m "Add amazing feature"
  • Push to your branch โ†’ git push origin feature/amazing-feature
  • Open a Pull Request
Ideas for contributions:
- Complete any of the ๐Ÿ”œ pending modules
- Add new agent design patterns
- Improve documentation & add diagrams
- Submit bug fixes or optimization PRs

License

This project is licensed under the MIT License โ€” see the LICENSE file for details.



If this repo helped you, please consider giving it a star!

It helps others discover the project and motivates further development.


Built by Mohd Faizy



๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท mohd-faizy/Agentic_AI_using_LangGraph ยท Updated daily from GitHub