Assignment | Description | Make Target | Script File |
---|---|---|---|
1 | Basic Agent Setup | make setup-langgraph | langgraph/langgraph_agent.py |
2 | Multi-Agent Conversation | make setup-autogen | autogen/autogen_agent.py |
3 | Specialized Crew Creation | make setup-crewai | crewai/crewai_agent.py |
4 | Vector Database with ChromaDB | make setup-rag | rag/rag_agent.py |
5 | Browser Use | make setup-browseruse | browseruse/browseruse_agent.py |
6 | Voice Assistant with Vapi | make setup-voice | voice/voice_agent.py |
- Python 3.11.x (tested with 3.11.7)
- pip (Python package installer)
- virtualenv
- make (for Linux/macOS users)
-
Clone the repository:
git clone https://github.com/yourusername/workshop-ai-agents-20250327.git cd workshop-ai-agents-20250327
-
Setup environment for an assignment:
make setup-langgraph # Replace langgraph with the assignment number
-
Activate the environment:
source .venv-langgraph/bin/activate # Replace langgraph with the assignment number
-
Run the assignment: Follow the specific instructions provided for each assignment.
-
Clean environments:
make clean
-
Clone the repository:
git clone https://github.com/yourusername/workshop-ai-agents-20250327.git cd workshop-ai-agents-20250327
-
Create and activate a virtual environment:
python -m venv .venv-langgraph # Replace langgraph with the assignment number .venv-langgraph\Scripts\activate
-
Install requirements:
pip install --upgrade pip pip install -r langgraph/requirements.txt # Replace langgraph with the assignment number
-
Run the assignment: Follow the specific instructions provided for each assignment.
-
Clean environments manually:
rmdir /s /q .venv-langgraph # Replace langgraph with the assignment number
Consider creating a make.bat
file with equivalent commands for easier setup on Windows.
@echo off
:: Usage: make.bat setup-langgraph
if "%1"=="setup-langgraph" (
python -m venv .venv-langgraph
.venv-langgraph\Scripts\activate
pip install --upgrade pip
pip install -r requirements-langgraph.txt
)
if "%1"=="clean" (
rmdir /s /q .venv-*
)
make setup-langgraph # Setup for Assignment 1
source .venv-langgraph/bin/activate
make dev # Install development tools (optional)
Running the Assignment
python langgraph/langgraph_agent.py # Assignment 1
deactivate
To install development tools, which include pytest
, use:
make dev # Recommended
or manually:
pip install -r requirements-dev.txt
To run tests for the assignments, use pytest
. Ensure you have installed the development requirements (which include pytest
) either by running make dev
or manually with:
pip install -r requirements-dev.txt
Run tests with:
pytest
from langchain_openai import ChatOpenAI
OPENAI_API_KEY="sk-..." # Obtain from https://platform.openai.com/api-keys
llm = ChatOpenAI(model="gpt-4o-mini", api_key=OPENAI_API_KEY, temperature=0)
from langchain_openai import ChatOpenAI
GITHUB_TOKEN = "..." # Obtain from: https://github.com/marketplace/models/azure-openai/gpt-4o/playground
llm = ChatOpenAI(model="gpt-4o-mini", api_key=GITHUB_TOKEN, base_url="https://models.inference.ai.azure.com/", temperature=0)
from langchain_openai import ChatOpenAI
OPENROUTER_API_KEY = "..." # Obtain from: https://openrouter.ai/settings/keys
llm = ChatOpenAI(model="gpt-4o-mini", api_key=OPENROUTER_API_KEY, base_url="https://openrouter.ai/api/v1", temperature=0)
from langchain_community import ChatGoogleGenerativeAI
GOOGLE_API_KEY = "..." # Obtain from: https://aistudio.google.com/apikey
llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash-lite", api_key=GOOGLE_API_KEY, temperature=0)
python langgraph/langgraph_agent.py
python autogen/autogen_agent.py
python crewai/crewai_agent.py
python rag/rag_agent.py
python browseruse/browseruse_agent.py
python voice/voice_agent.py
This workshop contains independent assignments, each demonstrating a different AI agent framework:
Assignment | Agent Framework |
---|---|
01 | LangGraph |
02 | AutoGen |
03 | CrewAI |
04 | LangChain + ChromaDB |
05 | Browser-Use Agent |
06 | Vapi Voice Assistant |
⚠ Important: Each assignment may have incompatible dependency versions due to rapidly evolving AI agent libraries.
To avoid conflicts, it is recommended to use a separate virtual environment for each assignment.
This project uses Black for code formatting and isort for import sorting. The configuration is in pyproject.toml
.
-
Install the required extensions:
- Black Formatter (ms-python.black-formatter)
- Python (ms-python.python)
-
Select the correct Python interpreter:
- Open any Python file
- Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows)
- Type "Python: Select Interpreter"
- Choose the interpreter from your current assignment's environment (e.g.,
.venv-langgraph/bin/python
)
-
The following settings are already configured in the project:
- Format on save is enabled
- Black is set as the default formatter
- Import sorting is configured to use Google style
This project uses standard configuration files to ensure consistent formatting across different IDEs:
.editorconfig
: Basic editor settings (works in most IDEs)pyproject.toml
: Black and isort configuration
- Install extensions:
- Black Formatter (ms-python.black-formatter)
- Python (ms-python.python)
- EditorConfig (editorconfig.editorconfig)
- Enable EditorConfig:
- Settings → Editor → Code Style
- Check "Enable EditorConfig support"
- Set Black as formatter:
- Settings → Tools → Actions on Save
- Enable "Reformat code"
- Set Python formatter to "Black"
- Install packages:
- EditorConfig
- Python Black
- Enable format on save:
- Preferences → Package Settings → Python Black → Settings
- Add:
"on_save": true
To format files from the command line, first activate your virtual environment:
source .venv-langgraph/bin/activate # Match the assignment folder name (e.g., autogen, rag, etc.)
black your_file.py # Format a single file
black . # Format all Python files in the project
isort . # Sort imports in all Python files
-
Before starting work:
git pull # Get latest changes source .venv-langgraph/bin/activate
-
While working:
- Let your IDE format on save (VSCode, PyCharm)
- Or format manually:
black . isort .
-
Before committing:
# Format all files black . isort . # Review changes git status git diff # Important: Always commit formatting configs together # - .editorconfig: Basic editor settings # - pyproject.toml: Black and isort settings # This ensures all developers use the same formatting # Commit git add . git commit -m "descriptive message" git push