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

Agentic AI with LangGraph
Build autonomous, stateful, and goal-oriented AI systems
capable of complex multi-step reasoning & real-world action.
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:
| 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:
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
Curriculum
Learning Path
- Foundation Level
- Intermediate Level
- Advanced Level
Notebook Index
A comprehensive collection of modules covering the full spectrum of Agentic AI development.
Phase 1 โ Foundations
| # | Module | Topic | Link | |:---:|:---|:---|:---:| | 01 | RoadMap | Comprehensive learning roadmap for Agentic AI | | | 02 | GenAI vs AgenticAI | Understanding the paradigm shift |
| | 03 | Core Concepts | Agents, tools, memory, planning |
| | 04 | LangChain vs LangGraph | When to use which framework |
| | 05 | LangGraph Core | State machines, nodes, edges, and graph design |
|
Phase 2 โ Workflow Patterns
| # | Module | Topic | Link | |:---:|:---|:---|:---:| | 06 | Sequential Workflows | Linear chain execution and data flow | | | 07 | Parallel Workflows | Fan-out / fan-in concurrent execution |
| | 08 | Conditional Workflows | Dynamic routing, branching, and router patterns |
| | 09 | Iterative Workflows | Loops, retries, and self-correcting flows |
|
Phase 3 โ Chatbots & Persistence
| # | Module | Topic | Link | |:---:|:---|:---|:---:| | 10 | Structured Chatbot | Building a structured AI chatbot with LangGraph | | | 11 | Persistence | Checkpointing, state recovery, and SQLite persistence |
| | 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.