Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
18e585b
Initial commit
coleam00 Jun 23, 2024
1a914e0
Created AI Agents Masterclass Repo
coleam00 Jun 23, 2024
74763f1
Masterclass video #2 - AI Agents with LangChain
coleam00 Jun 30, 2024
3f8afcf
Adding streamlit chatbot
coleam00 Jul 2, 2024
5146860
Masterclass 3 - Chatbot UI for AI Agent
coleam00 Jul 7, 2024
8444e3d
Local LLM Tool Calling
coleam00 Jul 10, 2024
65333ba
Masterclass #4 - Full Task Management Agent
coleam00 Jul 14, 2024
0a215eb
AI Mad Libs
coleam00 Jul 17, 2024
f290a96
Groq Llama 3 AI Agent
coleam00 Jul 20, 2024
0a7860b
AI Agents Masterclass #5 - RAG
coleam00 Jul 27, 2024
2914135
AI Router for Cost Saving with AI Agents
coleam00 Jul 31, 2024
bf8d518
AI Agents Masterclass #6 - RAG AI Agent
coleam00 Aug 2, 2024
f0aef8f
AI Agents Masterclass #7 - LangGraph Guide
coleam00 Aug 4, 2024
1497547
Update README.md
coleam00 Aug 4, 2024
3be0c43
AI Agents Masterclass #8 - n8n AI Agent
coleam00 Aug 18, 2024
d2fdcb9
GHL SaaS Backend
coleam00 Aug 21, 2024
8cbd27a
AI Agents Masterclass #9 - n8n RAG Agent
coleam00 Aug 24, 2024
3afefe9
Fixing typo and dependency conflict in a couple requirements.txt files
coleam00 Aug 26, 2024
ef5f6c7
LLM Eval Framework + Breaking LLMs
coleam00 Aug 28, 2024
af684be
AI Agents MC #10 - LangServe Deployment of AI Agent
coleam00 Aug 29, 2024
b343881
Couple small code changes for LangServe walkthrough
coleam00 Aug 30, 2024
fdea475
Supabase RAG Agent n8n Workflow
coleam00 Sep 4, 2024
8bcf7b1
V0 + Claude - RAG AI Agent Frontend
coleam00 Sep 8, 2024
83c9702
Local or Managed Services for LLMs/RAG
coleam00 Sep 11, 2024
c09ddfa
Packaged Local AI - n8n + Ollama + QDrant + Postgres
coleam00 Sep 14, 2024
13a1969
o1 AI Agent
coleam00 Sep 18, 2024
9a3111d
Korvus RAG testing... cool example of using a tool for easy RAG with …
coleam00 Sep 20, 2024
0408d5b
n8n + Python + LangChain AI Agent
coleam00 Sep 22, 2024
07cd054
Updating LLM eval for Llama 3.2 testing
coleam00 Sep 29, 2024
0e5e87b
n8n Full Stack App with Streamlit + Claude + Supabase
coleam00 Oct 2, 2024
0a6d1f4
n8n RAG AI Agent with PDFs, Excel documents, and more
coleam00 Oct 9, 2024
0fa98db
OpenAI Swarm implementation of an AI agent swarm to manage a SQL data…
coleam00 Oct 16, 2024
90dad49
Adding OpenWebUI to Local AI Starter Kit
coleam00 Oct 22, 2024
8fc8667
Fixing small typo in n8n_pipe.py
coleam00 Oct 24, 2024
db25e16
Ollama + OpenAI Swarm
coleam00 Oct 30, 2024
3900e0a
Updating the LLM eval agent to work with Ollama
coleam00 Nov 13, 2024
80fc5c4
Adding Flowise to the Local AI Starter Kit
coleam00 Dec 4, 2024
3ce93a4
Pydantic AI Web Research Agent
coleam00 Dec 9, 2024
98392ca
Update README.md
coleam00 Dec 10, 2024
f1c4ef0
Update README.md
coleam00 Dec 15, 2024
a91332a
Getting chat_id to use as session_id
jeffwiegner Jan 14, 2025
1879176
Merge pull request #35 from jeffwiegner/patch-chat_id
coleam00 Jan 14, 2025
dff8799
Add complete static website for GitHub Pages
claude Nov 18, 2025
0b57fad
Add Getting Started guide for quick deployment
claude Nov 18, 2025
f8dea23
config of code-studio
com-nex Nov 19, 2025
87a0045
code -studio
com-nex Nov 19, 2025
b3f2476
Merge upstream changes from ai-agents-masterclass
com-nex Nov 20, 2025
69d0384
Merge main into claude/create-static-website branch
com-nex Nov 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
120 changes: 120 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main
paths:
- 'www/**'
- '.github/workflows/deploy-pages.yml'
pull_request:
branches:
- main
paths:
- 'www/**'
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Lint and validate
validate:
name: Validate HTML/CSS/JS
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install validation tools
run: |
npm install -g htmlhint stylelint eslint

- name: Validate HTML
run: |
htmlhint www/*.html || true

- name: Validate CSS
run: |
npx stylelint "www/css/**/*.css" --allow-empty-input || true

- name: Validate JavaScript
run: |
npx eslint "www/js/**/*.js" --no-eslintrc --env browser,es6 || true

- name: Check for broken links
run: |
echo "Link checking can be added here with tools like linkinator"

# Build job (if needed for preprocessing)
build:
name: Build Website
runs-on: ubuntu-latest
needs: validate
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Build site
run: |
echo "Building static site..."
# Add any build steps here if needed (e.g., minification, optimization)
# For now, we're using the files as-is

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./www

# Deployment job
deploy:
name: Deploy to GitHub Pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

- name: Summary
run: |
echo "🚀 Website deployed successfully!" >> $GITHUB_STEP_SUMMARY
echo "URL: ${{ steps.deployment.outputs.page_url }}" >> $GITHUB_STEP_SUMMARY

# Lighthouse CI for performance testing
lighthouse:
name: Lighthouse CI
runs-on: ubuntu-latest
needs: deploy
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run Lighthouse CI
uses: treosh/lighthouse-ci-action@v10
with:
urls: |
${{ needs.deploy.outputs.page_url }}
uploadArtifacts: true
temporaryPublicStorage: true
19 changes: 18 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,21 @@ venv_linux
__pycache__
chroma_db
.gradio
.langgraph_api
.langgraph_api
.vscode
=======
__pycache__
prep
.env
.env.local
chroma_db
test.py
data
creds
credentials
credentials.json
token.json
node_modules
venv
venv2
*.db
20 changes: 20 additions & 0 deletions 1-first-agent/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Rename this file to .env once you have filled in the below environment variables!

# Get your Open AI API Key by following these instructions -
https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key
OPENAI_API_KEY=

# See all Open AI models you can use here -
# https://platform.openai.com/docs/models
# A good default to go with here is gpt-4o
OPENAI_MODEL=

# Get your personal Asana access token through the developer console in Asana.
# Feel free to follow these instructions -
# https://developers.asana.com/docs/personal-access-token
ASANA_ACCESS_TOKEN=

# The Asana project ID is in the URL when you visit a project in the Asana UI.
# If your URL is https://app.asana.com/0/123456789/1212121212, then your
# Asana project ID is 123456789
ASANA_PROJECT_ID=
144 changes: 144 additions & 0 deletions 1-first-agent/agents.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
import asana
from asana.rest import ApiException
from openai import OpenAI
from dotenv import load_dotenv
from datetime import datetime
import json
import os

load_dotenv()

client = OpenAI()
model = os.getenv('OPENAI_MODEL', 'gpt-4o')

configuration = asana.Configuration()
configuration.access_token = os.getenv('ASANA_ACCESS_TOKEN', '')
api_client = asana.ApiClient(configuration)

tasks_api_instance = asana.TasksApi(api_client)

def create_asana_task(task_name, due_on="today"):
"""
Creates a task in Asana given the name of the task and when it is due

Example call:

create_asana_task("Test Task", "2024-06-24")
Args:
task_name (str): The name of the task in Asana
due_on (str): The date the task is due in the format YYYY-MM-DD. If not given, the current day is used
Returns:
str: The API response of adding the task to Asana or an error message if the API call threw an error
"""
if due_on == "today":
due_on = str(datetime.now().date())

task_body = {
"data": {
"name": task_name,
"due_on": due_on,
"projects": [os.getenv("ASANA_PROJECT_ID", "")]
}
}

try:
api_response = tasks_api_instance.create_task(task_body, {})
return json.dumps(api_response, indent=2)
except ApiException as e:
return f"Exception when calling TasksApi->create_task: {e}"

def get_tools():
tools = [
{
"type": "function",
"function": {
"name": "create_asana_task",
"description": "Creates a task in Asana given the name of the task and when it is due",
"parameters": {
"type": "object",
"properties": {
"task_name": {
"type": "string",
"description": "The name of the task in Asana"
},
"due_on": {
"type": "string",
"description": "The date the task is due in the format YYYY-MM-DD. If not given, the current day is used"
},
},
"required": ["task_name"]
},
},
}
]

return tools

def prompt_ai(messages):
# First, prompt the AI with the latest user message
completion = client.chat.completions.create(
model=model,
messages=messages,
tools=get_tools()
)

response_message = completion.choices[0].message
tool_calls = response_message.tool_calls

# Second, see if the AI decided it needs to invoke a tool
if tool_calls:
# If the AI decided to invoke a tool, invoke it
available_functions = {
"create_asana_task": create_asana_task
}

# Add the tool request to the list of messages so the AI knows later it invoked the tool
messages.append(response_message)

# Next, for each tool the AI wanted to call, call it and add the tool result to the list of messages
for tool_call in tool_calls:
function_name = tool_call.function.name
function_to_call = available_functions[function_name]
function_args = json.loads(tool_call.function.arguments)
function_response = function_to_call(**function_args)

messages.append({
"tool_call_id": tool_call.id,
"role": "tool",
"name": function_name,
"content": function_response
})

# Call the AI again so it can produce a response with the result of calling the tool(s)
second_response = client.chat.completions.create(
model=model,
messages=messages,
)

return second_response.choices[0].message.content

return response_message.content

def main():
messages = [
{
"role": "system",
"content": f"You are a personal assistant who helps manage tasks in Asana. The current date is: {datetime.now().date()}"
}
]

while True:
user_input = input("Chat with AI (q to quit): ").strip()

if user_input == 'q':
break

messages.append({"role": "user", "content": user_input})
ai_response = prompt_ai(messages)

print(ai_response)
messages.append({"role": "assistant", "content": ai_response})


if __name__ == "__main__":
main()
3 changes: 3 additions & 0 deletions 1-first-agent/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
asana==5.0.0
openai==1.10.0
python-dotenv==0.13.0
42 changes: 42 additions & 0 deletions 10-deploy-ai-agent-langserve/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Rename this file to .env once you have filled in the below environment variables!

# No environment variables for Google Drive access!
# See the below instructions for Google Drive authentication for Python:
# https://developers.google.com/drive/api/quickstart/python

# See all Open AI models you can use here -
# https://platform.openai.com/docs/models
# And all Anthropic models you can use here -
# https://docs.anthropic.com/en/docs/about-claude/models
# A good default to go with here is gpt-4o-mini, claude-3-5-sonnet-20240620, or llama3-groq-70b-8192-tool-use-preview
LLM_MODEL=gpt-4o-mini

# The URL for the LangServe API (not including the specific endpoint but including the port)
AGENT_ENDPOINT_URL=http://localhost:8000

# Get your GROQ API Key here -
# https://console.groq.com/keys
# You only need this environment variable set if you set LLM_MODEL to a Groq model
GROQ_API_KEY=

# Get your Open AI API Key by following these instructions -
# https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key
# You only need this environment variable set if you set LLM_MODEL to a GPT model
OPENAI_API_KEY=

# Get your Anthropic API Key in your account settings -
# https://console.anthropic.com/settings/keys
# You only need this environment variable set if you set LLM_MODEL to a Claude model
ANTHROPIC_API_KEY=

# Get your personal Asana access token through the developer console in Asana.
# Feel free to follow these instructions -
# https://developers.asana.com/docs/personal-access-token
ASANA_ACCESS_TOKEN=

# The Asana workspace ID is in the URL when you visit your Asana Admin Console (when logged in).
# Go to the URL "https://app.asana.com/admin" and then your workspace ID
# will appear in the URL as a slew of digits once the site loads.
# If your URL is https://app.asana.com/admin/987654321/insights, then your
# Asana workspace ID is 987654321
ASANA_WORKPLACE_ID=
Loading