Build autonomous, stateful, and goal-oriented AI systems
capable of complex multi-step reasoning & real-world action.
Quick Start · Notebooks · Architecture · Roadmap · Contributing
A comprehensive, hands-on curriculum for mastering Agentic AI — from foundational concepts to production-grade multi-agent orchestration — all built on top of LangGraph.
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 |
The system is built around these 7 modular, interoperable components:
| # | 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 |
- 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
A comprehensive collection of modules covering the full spectrum of Agentic AI development.
| # | 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 |
| # | 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 |
Agentic_AI_using_LangGraph/
│
├── 01_Foundation_of_AgenticAI/ # Core concepts & fundamentals
│ ├── 01_RoadMap.ipynb
│ ├── 02_GenAI_vs_AgenticAI.ipynb
│ ├── 03_AgenticAI_Core_Concepts.ipynb
│ ├── 04_LangChain_vs_langGraph.ipynb
│ └── 05_LangGraph_Core_Concepts.ipynb
│
├── 02_Sequential_&_Parallel_workflow/ # Linear & concurrent execution
│ ├── 06_Sequential_Workflows.ipynb
│ └── 07_Parallel_workflow.ipynb
│
├── 03_Conditional_Workflow/ # Dynamic routing & branching
│ └── 08_Conditional_Workflow.ipynb
│
├── 04_Iterative_Workflows/ # Loops, retries, self-correction
│ └── 09_Iterative_workflows.ipynb
│
├── 05_Structured_ai_chatbot/ # Chatbot + persistence
│ ├── 10_Chatbot.ipynb
│ └── 11_Persistence_LangGraph.ipynb
│
├── 06_Conversational_ai_chatbot/ # Streamlit chatbot apps
│ ├── 01_chatbot_frontend_basic.py
│ ├── 02_chatbot_frontend_streaming.py
│ ├── 03_Chatbot_frontend_threading.py
│ └── 04_Chatbot_SQLite.py
│
├── 07_LangsSmith/ # LangSmith tracing (WIP)
├── 08_Observability_in_LangGraph/ # Monitoring & logging (WIP)
├── 09_Tools_in_LangGraph/ # Tool integration (WIP)
├── 10_MCP_Client/ # Model Context Protocol (WIP)
├── 11_RAG_using_LangGraph/ # Agentic RAG (WIP)
├── 12_Human_in_the_Loop/ # Human approval gates (WIP)
├── 13_Subgraphs/ # Nested graphs (WIP)
├── 14_Memory_in_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
| Requirement | Version | Purpose |
|---|---|---|
| Python | 3.9+ | Runtime |
| Git | Latest | Version control |
| API Key | Any one: OpenAI / Anthropic / Gemini / Groq | LLM access |
# Clone
git clone https://github.com/mohd-faizy/Agentic_AI_using_LangGraph.git
cd Agentic_AI_using_LangGraph
# Set up environment
uv venv
source .venv/bin/activate # macOS/Linux
.venv\Scripts\activate # Windows
# Install dependencies
uv add -r requirements.txt# Clone
git clone https://github.com/mohd-faizy/Agentic_AI_using_LangGraph.git
cd Agentic_AI_using_LangGraph
# Set up environment
python -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txtcp .env.example .envEdit .env with your API keys:
# Required — at least one LLM provider
OPENAI_API_KEY=sk-...
# OR
GROQ_API_KEY=gsk_...
# OR
GOOGLE_API_KEY=AIza...
# Optional — for tracing & monitoring
LANGCHAIN_API_KEY=lsv2_...
LANGSMITH_TRACING=truefrom 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..."],
"step_count": state.get("step_count", 0) + 1,
}
def executor(state: AgentState) -> dict:
"""Execute the planned action."""
return {
"messages": ["[Executor]: Carrying out the plan..."],
"step_count": state.get("step_count", 0) + 1,
}
def reviewer(state: AgentState) -> dict:
"""Review results and decide next steps."""
return {
"messages": ["[Reviewer]: Task completed successfully!"],
"step_count": state.get("step_count", 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.set_entry_point("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!
| 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 |
Contributions are welcome and appreciated! Here's how you can help:
1. Fork the repository
2. Create a feature branch → git checkout -b feature/amazing-feature
3. Commit your changes → git commit -m "Add amazing feature"
4. Push to your branch → git push origin feature/amazing-feature
5. 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
This project is licensed under the MIT License — see the LICENSE file for details.




