Agentic-AI-Tutorial

mcp
Security Audit
Warn
Health Warn
  • No license — Repository has no license file
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 17 GitHub stars
Code Pass
  • Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Step-by-step guide to building agentic AI systems with LangGraph and MCP — from basic LLM calls to multi-node agents that reason, plan, and use real tools.

README.md

🤖 Agentic AI Tutorial: A Comprehensive Guide

Python
LangChain
License

Welcome to the Agentic AI Tutorial! This repository is your ultimate, hands-on guide to mastering the world of Autonomous Agents. We go beyond simple chat interfaces to build systems that can reason, plan, and execute actions using state-of-the-art Large Language Models (LLMs).


🌟 Why Agentic AI?

Traditional AI responds to prompts. Agentic AI takes it a step further:

  • Autonomy: It decides which tools to use and how to solve a problem.
  • Reasoning: It breaks down complex tasks into manageable steps.
  • Persistence: It maintains state and memory over long interactions.
  • Action: It interacts with the real world (APIs, databases, files).

🗺️ Learning Roadmap

Chapter Level Focus Area Status
Chapter 1 🟢 Beginner LLM Fundamentals, Providers (Ollama/OpenAI/Gemini) ✅ Complete
Chapter 2 🔵 Intermediate LangChain Orchestration, LCEL, Chains & Tools ✅ Complete
Chapter 3 🔵 Intermediate Memory Systems, Entity Tracking & RAG ✅ Complete
Chapter 4 🟠 Advanced Autonomous Agents & LangGraph Patterns ✅ Complete
Chapter 5 🔴 Expert Multi-Node Agents & MCP Server Integration ✅ Complete

🛠️ Core Tech Stack

  • Frameworks: LangChain, LangGraph
  • Protocols: Model Context Protocol (MCP) by Anthropic
  • Models: OpenAI (GPT-4o, GPT-3.5), Google Gemini (2.0 Flash), Ollama (Local)
  • Vector DB: Chroma, FAISS
  • Embeddings: Sentence Transformers (HuggingFace)

🚀 Quick Start

1. Prerequisites

  • Python 3.8 or higher.
  • API Keys for OpenAI/Google (optional if using Ollama exclusively).

2. Installation

Choose your preferred method:

SSH

git clone [email protected]:zkzkGamal/Agentic-AI-Tutorial.git
cd Agentic-AI-Tutorial

HTTPS

git clone https://github.com/zkzkGamal/Agentic-AI-Tutorial.git
cd Agentic-AI-Tutorial

3. Environment Setup

We recommend using a virtual environment for each chapter or a global one for the project.

# Create & Activate
python3 -m venv venv
source venv/bin/activate  # Linux/macOS
# OR: venv\Scripts\activate  # Windows

# Install Base Dependencies
pip install -r requirements.txt

4. Configuration

Each chapter contains its own .env.example. Copy it to .env and fill in your keys.

# Example for Chapter 1
cp Chapter1/.env.example Chapter1/.env

📚 Deep Dives

Chapter 1: LLM Fundamentals

  • Direct API calls to OpenAI, Gemini, and Ollama.
  • Streaming techniques.
  • System prompt engineering (Personas).

Chapter 2: LangChain Orchestration

  • Mastering LCEL (LangChain Expression Language).
  • Building sequential and router chains.
  • Binding and calling external tools.

Chapter 3: Memory & Context

  • ConversationBufferMemory for full history.
  • ConversationEntityMemory for fact extraction.
  • RAG (Retrieval-Augmented Generation) with local vector stores.

Chapter 4: Autonomous Agents

  • LangGraph StateGraph fundamentals.
  • ReAct, Router, and Sequential Pipeline patterns.
  • Multi-Agent Collaboration and Self-Refine loops.
  • Human-in-the-Loop for production safety.

Chapter 5: Multi-Node LangGraph & MCP

  • Building a decoupled architecture using the Model Context Protocol (MCP).
  • Deploying a local FastMCP Server with Mail and Math tools.
  • Routing requests intelligently across multiple highly-specialized LangGraph nodes.
  • Handling multi-turn state cleanly between Router, Execution, and Summary nodes.
  • Real-Time Automated Testing & GitHub Actions CI: Features unbuffered real-time test execution and continuous integration via GitHub Actions (.github/workflows/chapter5-ci.yml). Automated testing is essential in Agentic AI to verify non-deterministic LLM intent routing, validate precise MCP tool schemas/contracts, and guarantee pipeline resilience when upgrading underlying foundation models.

Chapter 5 Demo: See Agentic Workflow in Action

This chapter includes a live demo of the multi-node assistant handling different intents:

  • Conversation routed to a chitchat node
  • Math requests executed by the MCP tool server
  • Email composition and sending via a secure tool layer

Sample interaction:

User: "Please add 42 and 17, then send the result to my email."
Router: detects math + tool request
Execute: calls MCP Math tool, then MCP Email tool
Summarize: returns a human-friendly response with results and confirmation

Read more in the Chapter 5 guide and view the demo flow: Chapter 5 Demo


🔗 Related Repositories

Explore more tutorials and tools by the same author:

Repository Description
🤖 Hands On AI Tutorials A comprehensive, open-source AI tutorial covering ML Fundamentals (Regression, Classification, Clustering) and Deep Learning (NLP, CV) with practical code and mathematical intuition.
Concurrent LLM Serving Hands-on guide to serving Large Language Models efficiently at scale with concurrency

These repositories complement this tutorial — once you've mastered the fundamentals here, explore agents and production LLM deployment next!


🤝 Contributing

We love contributions! Whether you're fixing a typo or adding a new agent pattern:

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

👤 Author

Zkzk - AI Engineer & Educator


📖 Featured articles


Disclaimer: This tutorial is for educational purposes. Costs may apply for cloud LLM usage.

Reviews (0)

No results found