A comprehensive collection of AI agent implementations demonstrating various LangChain and LangGraph capabilities for building intelligent, multi-step systems.
- Python 3.8+ installed
- Basic command line knowledge
- Recommended IDE: Visual Studio Code
# Clone the repository
git clone https://github.com/kazhian/agentic_ai.git
# Navigate into the project directory
cd agentic_ai# Create virtual environment (recommended)
python -m venv .venv
# Activate virtual environment
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
# Verify activation (you should see (.venv) in your prompt)Why Virtual Environment?
- Isolates project dependencies
- Prevents conflicts with system packages
- Easy to recreate and share
- Best practice for Python development
Visual Studio Code Setup:
# Install VS Code (if not already installed)
# Visit: https://code.visualstudio.com/
# Install essential VS Code extensions:
# 1. Python Extension (Microsoft)
# 2. Jupyter Extension (Microsoft)
# 3. Python Docstring Generator
# 4. GitLens (for better code navigation)Why VS Code?
- Excellent Python support with IntelliSense
- Built-in Jupyter notebook support
- Integrated terminal for running commands
- Great debugging capabilities
- Free and widely used
# Install required packages (make sure .venv is activated)
pip install langchain langchain-openai langgraph langchain-community python-dotenv tavily-python crewaiOpenAI API Key:
- Visit OpenAI Platform
- Sign up/login and create a new API key
- Copy the key (starts with
sk-proj-)
Tavily API Key:
- Visit Tavily AI
- Sign up and get your API key
- Copy the key (starts with
tvly-)
LangSmith API Key:
- Visit LangSmith or LangChain LangSmith
- Sign up/login and create a new API key
- Copy the key
# Copy the template file
cp template.env .env
# Edit the .env file with your actual API keys
# OPENAI_API_KEY='sk-proj-your-actual-key-here'
# TAVILY_API_KEY='tvly-your-actual-key-here'
# LANGSMITH_API_KEY='your-langsmith-api-key-here'# Test your configuration
python 01_setup/01_direct_interaction.pyIf the setup is correct, you'll see a successful AI response. If not, check your API keys and Python installation.
For better markdown rendering when viewing CrewAI outputs:
VS Code Built-in Preview (Recommended):
- Open any .md file in VS Code
- Press Ctrl+Shift+V (Windows/Linux) or Cmd+Shift+V (Mac)
- Or click the preview icon in the top right
Python Libraries for Enhanced Display:
# For terminal rendering
pip install rich
# For HTML conversion
pip install markdownDesktop Apps:
- Typora (paid, beautiful)
- Mark Text (free)
- Obsidian (free, powerful)
Online Viewers:
- https://markdownlivepreview.com/
- https://dillinger.io/
- GitHub Gists
βββ 01_setup/ # Basic setup and direct API interaction
βββ 02_langchain/ # LangChain fundamentals and chains
βββ 03_lc_tool_integ/ # Tool integration examples
βββ 04_lc_memory/ # Memory and conversation persistence
βββ 05_multi_step_agent/ # Multi-step agent workflows
βββ 06_crewai_multi_agent/ # CrewAI multi-agent orchestration
βββ 07_autonomous_agents/ # AutoGPT-style autonomous agents
βββ 08_agent_evaluation/ # Evaluation and LangSmith tracing
βββ 09_industry_case/ # Real-world industry applications
βββ 11_ethical_consideration/ # AI ethics and safety
This course is organized around the topics for AgenticAI: An Experimental Approach to Autonomous Intelligence.
- Setting up Agentic AI Development Environment
- Covers virtual environments, dependency installation, API key configuration, and direct model interaction.
- Building Agents with LangChain: Simple Question Answering
- Includes basic LangChain agent patterns and Q&A examples.
- Tool Integration with LangChain Agents: Web Search
- Demonstrates how to add external tool capabilities like web search.
- Memory Management in LangChain Agents: Conversational History
- Teaches agent memory, chat history, and session persistence.
- Creating Multi-Step Agents with LangChain Chains
- Shows how to build multi-step workflows and chain-based agents.
- Orchestrating Multi-Agent Systems with CrewAI
- Walks through coordinated multi-agent workflows using CrewAI.
- Exploring Autonomous Agents with AutoGPT
- Introduces autonomous agent concepts and AutoGPT-style execution.
- Evaluating Agent Performance using LangSmith (or similar tools)
- Covers tracing and evaluation concepts using notebooks and examples.
- Building an Agent for a Specific Industry Use Case β Customer Support
- Demonstrates a customer support agent workflow and practical application.
- Building an Agent for a Specific Industry Use Case β Financial Data Analysis
- Describes a potential extension for building a domain-specific financial agent.
- Exploring Ethical Considerations in Agent Behavior
- Covers accountability, transparency, bias, privacy, and safety.
- Final Project: Developing an Agentic AI Application for a Real-World Problem
- The capstone project concept is to combine these modules into a complete, real-world agentic application.
Note: Module
08_agent_evaluation/has been added to provide dedicated LangSmith tracing and agent evaluation content.
- Start Here:
01_setup/- Verify your environment works - Basics:
02_langchain/- Learn LangChain fundamentals - Tools:
03_lc_tool_integ/- Add external capabilities - Memory:
04_lc_memory/- Enable conversation persistence - Workflows:
05_multi_step_agent/- Build multi-step agents - Multi-Agent:
06_crewai_multi_agent/- Orchestrate agent crews - Autonomous:
07_autonomous_agents/- Explore AutoGPT-style autonomous agents - Applications:
09_industry_case/- Real-world implementations - Ethics:
11_ethical_consideration/- Responsible AI development
- LangChain: Framework for building AI applications
- LangGraph: Stateful workflow orchestration
- CrewAI: Multi-agent collaboration and orchestration
- OpenAI: GPT models for language understanding
- Tavily: Web search and information retrieval
- Python: Core programming language
- Building conversational AI agents
- Creating multi-step workflows
- Orchestrating multi-agent systems
- Integrating external tools and APIs
- Managing conversation memory
- Implementing industry-specific solutions
- Understanding AI ethics and safety
API Key Problems:
- Ensure keys are copied correctly without extra spaces
- Check that your OpenAI account has credits
- Verify Tavily API key is valid
Python Issues:
- Use Python 3.8 or higher
- Install packages in a virtual environment (recommended)
- Update pip:
pip install --upgrade pip
Virtual Environment Issues:
- Make sure you activated the virtual environment before installing packages
- If activation fails, try:
python -m venv .venv --clearthen reactivate - On Windows, use PowerShell or Command Prompt as Administrator
VS Code Issues:
- Restart VS Code after installing Python extension
- Select correct Python interpreter:
Ctrl+Shift+Pβ "Python: Select Interpreter" - For Jupyter notebooks, ensure Jupyter extension is installed
Import Errors:
- Make sure you're in the project root directory
- Check that all packages installed successfully
- Restart your terminal after installation
# 1. Clone the repository
git clone https://github.com/kazhian/agentic_ai.git
cd agentic_ai
# 2. Create and activate virtual environment
python -m venv .venv
# On Windows: .venv\Scripts\activate
# On macOS/Linux: source .venv/bin/activate
# 3. Install VS Code: https://code.visualstudio.com/
# 4. Install VS Code extensions: Python, Jupyter, Python Docstring Generator, GitLens
# 5. Install dependencies (in virtual environment)
pip install langchain langchain-openai langgraph langchain-community python-dotenv tavily-python crewai
# 6. Set up your API keys in .env file
cp template.env .env
# Edit .env with your actual keys
# 7. Test everything works
python 01_setup/01_direct_interaction.py
# 8. Setup markdown display (optional)
# Follow the "Setup Markdown Display" section aboveπ Learning Goal: Master the art of building intelligent AI agents that can reason, remember, and act autonomously in real-world scenarios.
Start with the setup verification, then progress through the numbered directories to build your skills progressively!