3 Python AI Projects for Beginners: Agent, Resume App, TensorFlow (Video Course)

Build 3 practical Python AI projects from scratch: a tool-using agent, a résumé critiquer, and an image classifier. Learn prompts, secure keys, caching, and preprocessing. Ship fast with Streamlit, LangChain, and TensorFlow. Portfolio-ready results.

Duration: 1.5 hours
Rating: 4/5 Stars
Beginner Intermediate

Related Certification: Certification in Building Python AI Agents, Resume Apps & TensorFlow Models

3 Python AI Projects for Beginners: Agent, Resume App, TensorFlow (Video Course)
Access this Course

Also includes Access to All:

700+ AI Courses
6500+ AI Tools
700+ Certifications
Personalized AI Learning Plan

Video Course

What You Will Learn

  • Build a tool-using AI agent with LangGraph and LangChain
  • Create a Streamlit résumé critiquer that extracts PDF text and calls OpenAI
  • Implement an image classifier using TensorFlow MobileNetV2 with proper preprocessing
  • Engineer prompts for structured, actionable LLM feedback
  • Apply caching and performance best practices for responsive apps
  • Securely manage API keys and environment variables (.env)

Study Guide

Introduction: Build 3 Python AI Projects From Scratch , and Actually Use Them

You don't learn AI by reading about it. You learn it by building useful things that give you real feedback in real time. This course gives you that: three practical Python AI projects that you can build end-to-end and use as portfolio pieces, internal tools, or springboards to more advanced systems.

You'll build:
- An AI Agent with tool-use capabilities using LangGraph and LangChain (it doesn't just chat; it acts).
- A web-based Résumé Critiquer using Streamlit and the OpenAI API (upload a PDF, get targeted feedback).
- An Image Classifier using Streamlit and TensorFlow's MobileNetV2 (pre-trained vision without training headaches).

Each project is intentionally minimal in moving parts but maximal in leverage. You'll learn how modern frameworks dramatically reduce complexity, how to structure prompts so LLMs deliver what you want, and how to preprocess data so models behave predictably.

By the end, you'll think in systems: chaining an LLM to tools, building a UI quickly, and using pre-trained models effectively. You'll know how to secure API keys, optimize performance with caching, and create clean, repeatable workflows you can reuse across projects.

What You Will Learn (and Why It Matters)

- The difference between a basic chatbot and a true AI agent that can use tools to perform actions.
- How to use LangChain and LangGraph to create stateful, reactive agents with tool invocation.
- How to design and document Python functions as agent tools the LLM can understand and call.
- How to build interactive web apps with Streamlit,no front-end boilerplate required.
- How to extract text from PDFs using PyPDF2 and feed it to an LLM via the OpenAI API.
- The art of prompt engineering for structured, useful feedback (résumé analysis done right).
- How to load, preprocess, and classify images with TensorFlow's MobileNetV2 and OpenCV.
- Why data preprocessing and caching are non-negotiables for accuracy and speed.
- How to manage secrets securely with environment variables and a .env file.

Foundations: Technologies and Terminology

Large Language Model (LLM)
A language model trained on vast amounts of text that can understand and generate human-like responses (e.g., OpenAI GPT models). In this course, the LLM is the "reasoning engine" behind your agent and résumé analyzer.

API and API Key
You'll call the OpenAI API to get model responses. Your API key authenticates requests,store it in environment variables, never hardcode it.

Environment Variables and .env
Keep secrets out of code. Use a .env file and load it with python-dotenv so you don't commit keys to version control.

AI Agent vs. Chatbot
- Chatbot: answers text with text.
- Agent: reasons about your request, decides if a tool is needed, calls a function or external resource, and integrates the result into its response. That "tool use" is the upgrade from conversation to capability.

LangChain and LangGraph
- LangChain: abstractions for LLM apps,tools, prompts, chains, memory.
- LangGraph: build reactive, stateful agent graphs; use prebuilt agents like create_react_agent to handle tool-use loops reliably.

Streamlit
Turn Python scripts into web apps with a few lines. Handles inputs, uploads, and layout without front-end hassle.

TensorFlow + MobileNetV2
TensorFlow is the ML framework; MobileNetV2 is a lightweight CNN pre-trained on ImageNet. Perfect for plug-and-play image classification.

OpenCV and NumPy
OpenCV manipulates images (resize, transform). NumPy handles numeric arrays. You'll combine these for preprocessing.

UV (Package Manager)
A fast Python package installer and resolver. You'll use it to set up environments and install dependencies quickly.

Environment Setup: One-Time Steps You'll Reuse Everywhere

1) Create a project folder
- mkdir ai-projects && cd ai-projects

2) Initialize a virtual environment with UV
- uv venv
- source .venv/bin/activate (Windows: .venv\Scripts\activate)

3) Install shared dependencies per project
For the Agent project:
- uv add langgraph langchain langchain-openai python-dotenv
For the Résumé Critiquer:
- uv add streamlit openai pypdf2 python-dotenv
For the Image Classifier:
- uv add streamlit tensorflow opencv-python pillow numpy

4) Create a .env file in your project directory
OPENAI_API_KEY="your_secret_api_key_here"

5) Load environment variables in Python
from dotenv import load_dotenv
load_dotenv()

Best practices
- Do not commit .env files. Add them to .gitignore.
- Use separate virtual environments per project to isolate dependencies.
- Pin versions when you move to production to avoid breaking changes.

Project 1: Build an AI Agent with Tool-Use (LangGraph + LangChain)

The goal here is simple: build a conversational agent that autonomously decides when to use a calculator tool to answer math questions. You'll see what makes an agent more capable than a chatbot: it doesn't just talk; it acts.

Agent Architecture and Flow

- User types a message.
- Agent's LLM decides whether a tool is required.
- If needed, the agent calls a tool (a Python function) with arguments extracted from the message.
- The agent integrates the result into a final answer and streams it back.

Key Technologies

- Python as the base language.
- LangGraph's prebuilt create_react_agent for fast, reliable agent loops.
- LangChain for tools and integration.
- OpenAI API for the reasoning engine (ChatOpenAI).
- UV for dependency management.

Step 1: Define Tools (the Agent's Hands)

The agent can only do "actions" you explicitly give it. You do that by writing Python functions and decorating them with @tool from LangChain. The docstring is critical,the LLM reads it to decide when and how to use the tool.

Example: Basic Calculator Tool
from langchain.tools import tool

@tool
def calculator(a: float, b: float) -> str:
"""Useful for performing basic arithmetic calculations with numbers."""
print("Tool has been called")
return f"The sum of {a} and {b} is {a + b}"

Why the docstring matters
- The agent uses it as metadata to infer use cases.
- Be explicit and concise: describe what the tool does, when to use it, and input constraints.

Example: Unit Converter Tool
from langchain.tools import tool

@tool
def miles_to_km(miles: float) -> str:
"""Convert miles to kilometers. Use when the user asks for distance conversion between miles and kilometers."""
return f"{miles} miles is {miles * 1.60934:.2f} kilometers"

Example: Percentage Calculator Tool
from langchain.tools import tool

@tool
def percentage(part: float, whole: float) -> str:
"""Compute the percentage that 'part' represents of 'whole'. Use when the user asks for percent calculations."""
if whole == 0:
return "Cannot compute percentage with whole=0."
return f"{(part / whole) * 100:.2f}%

Step 2: Initialize the LLM and Agent Executor

We'll use ChatOpenAI as the reasoning engine and create a ReAct-style agent via LangGraph that knows how to decide on tool calls.

Agent Bootstrap
import os
from dotenv import load_dotenv
from langchain_core.messages import HumanMessage
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
from tools import calculator, miles_to_km, percentage # your tool definitions

load_dotenv()

def make_agent():
model = ChatOpenAI(temperature=0) # deterministic, predictable behavior
tools = [calculator, miles_to_km, percentage]
agent_executor = create_react_agent(model, tools)
return agent_executor

Tips
- Set temperature=0 while building and debugging. Increase later if needed for creativity.
- Add more tools over time; the agent scales horizontally with capabilities.

Step 3: Create an Interaction Loop with Streaming

We'll build a simple CLI that continuously reads user input and streams the agent's response token-by-token for a fluid experience.

Streaming CLI
def run_cli():
agent = make_agent()
print("Type 'quit' to exit.")
while True:
user_input = input("\\nYou: ").strip()
if user_input.lower() == "quit":
break
print("\\nAssistant: ", end="")
for chunk in agent.stream({"messages": [HumanMessage(content=user_input)]}):
if "agent" in chunk and "messages" in chunk["agent"]:
for message in chunk["agent"]["messages"]:
print(message.content, end="", flush=True)
print()

Agent in Action: Two Example Scenarios

Example 1: Tool Invocation
You: Add 7 and 9 for me.
Assistant: The sum of 7 and 9 is 16
- The LLM recognizes an arithmetic intent and calls calculator(a=7, b=9).
- The result is integrated and returned.

Example 2: Direct Answer (No Tool Needed)
You: What is an AI agent?
Assistant: An AI agent is a system that can reason about your request and use tools or functions to complete tasks beyond pure conversation...
- No tool invocation,pure reasoning and explanation.

Advanced: Expanding Tooling and Guardrails

More Tools You Can Add
- Currency conversion (with a static rate or a secure rate provider).
- Date/time difference calculator for scheduling support.
- Text-to-CSV formatter for quick data extraction.
- A local knowledge base retriever (vector search) for company documentation.

Example: Date Difference Tool
from datetime import datetime
from langchain.tools import tool

@tool
def days_between(start: str, end: str) -> str:
"""Return number of days between two dates in YYYY-MM-DD format. Use for duration or scheduling questions."""
fmt = "%Y-%m-%d"
try:
s = datetime.strptime(start, fmt)
e = datetime.strptime(end, fmt)
return str((e - s).days) + " days"
except Exception as ex:
return f"Error: {ex}"

Best Practices
- Always validate inputs inside tools; never assume the model will pass perfect arguments.
- Restrict tools to minimal, safe functionality,treat them like API endpoints. Clear naming and docstrings reduce misuse.
- Log tool calls (like print("Tool has been called")) or add a lightweight audit trail for debugging and observability.

Project 2: Build a Web-Based AI Résumé Critiquer (Streamlit + OpenAI + PyPDF2)

This project turns AI into something useful for career outcomes: upload a résumé, choose a target role, and get structured, actionable feedback. You'll see how to create a clean user experience with Streamlit and how to consistently guide an LLM with a well-structured prompt.

UI Mechanics: Streamlit Execution Model

Streamlit reruns the entire script top-to-bottom on each interaction (file upload, button click). State lives in the variables you define at the time of execution and any cached resources you deliberately set. This is simple and keeps you productive,just remember to cache heavy work like model loads.

Step 1: Build the UI

Streamlit Skeleton
import streamlit as st
import os

st.set_page_config(page_title="AI Resume Critiquer", page_icon="📄")
st.title("AI Resume Critiquer")
st.markdown("Upload your resume and get AI-powered feedback.")

uploaded_file = st.file_uploader("Upload your resume (PDF or TXT)", type=["pdf", "txt"])
job_role = st.text_input("Enter the job role you are targeting (optional)")
analyze_button = st.button("Analyze Resume")

Step 2: Extract Text From PDF or TXT

File Handling and Text Extraction
import io
import pypdf2

def extract_text_from_file(uploaded_file):
if uploaded_file.type == "application/pdf":
pdf_reader = pypdf2.PdfReader(io.BytesIO(uploaded_file.read()))
text = ""
for page in pdf_reader.pages:
text += (page.extract_text() or "") + "\\n"
return text.strip()
else:
return uploaded_file.read().decode("utf-8", errors="ignore").strip()

Tips
- Some PDFs are image-based (no embedded text). Consider fallbacks like OCR for future upgrades.
- Normalize whitespace: collapse double spaces, remove weird line breaks to reduce prompt noise.
- Guard against oversized text,truncate or summarize if the document is too large for your model context window.

Step 3: Engineer a Prompt That Delivers Useful Feedback

Your prompt should instruct the model on persona, scope, structure, and tone. Include the target job role and the full résumé text.

Prompt Template
from openai import OpenAI
from dotenv import load_dotenv

load_dotenv()
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))

def make_prompt(resume_text: str, role: str | None) -> str:
target = role if role else "general job applications"
return f"""
Please analyze this resume and provide constructive feedback. Focus on:
- Content, skills, and experience.
- Specific, actionable improvements.

The target job role is: {target}.

Resume Content:
{resume_text}

Provide your analysis in a clear, structured format with headings, bullet points, and examples when helpful.
"""

Step 4: Call the OpenAI API and Render the Results

API Call and Display
if analyze_button and uploaded_file:
resume_text = extract_text_from_file(uploaded_file)
prompt = make_prompt(resume_text, job_role)

response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[
{"role": "system", "content": "You are an expert resume reviewer with years of experience in HR."},
{"role": "user", "content": prompt}
],
temperature=0.7,
max_tokens=1000
)

content = response.choices[0].message.content
st.markdown("### Analysis Results")
st.markdown(content)

Why Markdown?
- The model's output often includes headings and lists; st.markdown renders it cleanly without extra work.
- Encourage structured output in your prompt so the results read like a professional review.

Two Example Use Cases

Example 1: Data Analyst Applicant
- Target role: Data Analyst.
- Typical feedback themes: quantify impact (KPIs, dashboards delivered), highlight SQL/Python proficiency, include portfolio links, reframe duties as outcomes, tailor skills to analytics stack (Pandas, SQL, BI tools).
- Likely suggestions: add a "Selected Projects" section with metrics (e.g., "Reduced reporting time by 40% by automating ETL in Python").

Example 2: Product Manager Applicant
- Target role: Product Manager.
- Typical feedback themes: clarify roadmap ownership, add cross-functional leadership examples, emphasize discovery and experimentation, include measurable outcomes (retention, conversion).
- Likely suggestions: add "Impact Highlights" (e.g., "Increased onboarding completion rate from 62% to 83% through A/B tested funnel changes").

Best Practices: Prompting, Performance, and UX

- Set a clear persona via the system message ("expert resume reviewer").
- Specify format (headings, bullet points, sections like Summary, Skills, Experience, Gaps, Recommendations).
- Cap length via max_tokens to maintain responsiveness.
- Consider adding a "Detail Level" control (brief vs. in-depth) for user preference.
- Include a download button for the feedback (e.g., as Markdown or TXT) for usability.

Security and Reliability Tips

- Load keys from environment variables; never print them or commit them.
- Add basic input size checks to avoid extremely large prompts.
- Handle PDF extraction failures gracefully; instruct users when their file is not text-based.
- Consider rate-limit handling and retry logic for production-grade apps.

Project 3: Build an Image Classifier (Streamlit + TensorFlow + MobileNetV2)

This project gives you fast access to computer vision. You'll use a pre-trained model (MobileNetV2) to classify images without training anything yourself. The heavy lifting is in preprocessing,getting the image into the exact format the model expects.

Key Concepts: Pre-trained Models and Preprocessing

- Pre-trained model: load MobileNetV2 with ImageNet weights; it already knows 1,000 classes (dogs, cars, instruments, etc.).
- Preprocessing pipeline: convert to array, resize to 224x224, normalize via preprocess_input, and add batch dimension. If you skip or misconfigure any step, your predictions will be off.

Step 1: Load and Cache the Model

Model Loader
import streamlit as st
from tensorflow.keras.applications.mobilenet_v2 import MobileNetV2, preprocess_input, decode_predictions

@st.cache_resource
def load_cached_model():
model = MobileNetV2(weights="imagenet")
return model

model = load_cached_model()

Why caching?
- Loading a model can be expensive. Caching ensures it loads once and stays in memory across Streamlit re-runs.

Step 2: Preprocess the Uploaded Image

Preprocessing Function
import cv2
import numpy as np
from PIL import Image

def preprocess_image(img: Image.Image) -> np.ndarray:
# Convert to RGB to avoid channel issues
img = img.convert("RGB")
arr = np.array(img)
resized = cv2.resize(arr, (224, 224))
batch = np.expand_dims(resized, axis=0)
return preprocess_input(batch)

Common pitfalls
- Passing grayscale or CMYK without conversion,convert to RGB.
- Forgetting batch dimension,model expects shape (batch, height, width, channels).
- Skipping preprocess_input,MobileNetV2 expects specific normalization.

Step 3: Build the Streamlit UI

UI and Prediction
uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
if uploaded_file is not None:
image = Image.open(uploaded_file)
st.image(image, caption="Uploaded Image.", use_container_width=True)

if st.button("Classify Image"):
with st.spinner("Analyzing image..."):
x = preprocess_image(image)
preds = model.predict(x)
decoded = decode_predictions(preds, top=3)[0]
st.subheader("Predictions:")
for _, label, score in decoded:
st.write(f"**{label.replace('_', ' ').title()}**: {score:.2%}")

Two Example Scenarios

Example 1: Common Objects
- Upload a clear photo of a beagle.
- Output might include: Beagle (93%), Hound (4%), Bloodhound (2%).

Example 2: Non-Canonical or Ambiguous Images
- Upload a photo of a futuristic car interior.
- Output might include: Sports Car (51%), Convertible (27%), Race Car (12%). The model guesses from learned patterns; it's not always precise for unusual angles or objects.

Performance and Reliability Tips

- Validate image size and format before processing; give users clear error messages.
- For repeated inferences, consider batching multiple images for throughput (x has shape (N, 224, 224, 3)).
- Keep the Streamlit session memory clean,avoid storing large arrays in session_state unless necessary.
- Remember the model is limited to ImageNet classes,great for general categories, not specialized domains.

Key Principles You'll Reuse Across Projects

Agents vs. Chatbots
An AI agent isn't just a conversation partner. It's a system that can take action via tools you define. That's the difference between answers and outcomes.

Rapid Prototyping with Streamlit
Get to a working UI fast, iterate based on real usage, and optimize later. Streamlit keeps you focused on logic, not layout.

Power of Pre-Trained Models
Pre-trained models give you advanced capabilities instantly. You don't need to train from scratch to ship value.

Prompt Engineering
Clear, structured prompts lead to predictable, useful outputs. State the role, task, scope, and format. Include the right context at the right time.

Data Preprocessing Is Non-Negotiable
Models are strict about inputs. Resize, normalize, and format exactly as required,or expect poor results.

Caching for Performance
Cache heavyweight resources (models, embeddings) so your app feels instant. Users judge your app by responsiveness.

End-to-End Examples and Mini-Patterns

Pattern 1: Add a New Agent Tool Safely
- Write a function with strict type hints.
- Add a clear docstring with purpose, input constraints, and output format.
- Decorate with @tool, add to tools list.
- Test with controlled inputs and log calls.
- Example tools: text_cleaner, email_validator, product_price_calculator.

Pattern 2: Robust PDF Handling
- Extract text; if empty, detect and alert for OCR requirement.
- Normalize whitespace and unusual characters (e.g., Latin-1 decoding issues).
- Optionally split long text and summarize sections to fit model context.

Pattern 3: Clear Output Formatting from LLM
- In your prompt, ask for headings: "Summary, Strengths, Gaps, Action Items."
- Ask for specificity: "include at least two concrete edits and three measurable improvements."
- Encourage examples: "Provide sample bullet points rewritten with metrics."

Troubleshooting and Debugging

Agent Tools Not Triggering?
- Docstring too vague,clarify when to use the tool.
- Type hints missing or wrong,ensure expected inputs are clear.
- The user prompt is ambiguous,ask the model to think step-by-step about whether a tool is needed.

Streamlit App Keeps Reloading
- That's by design. Cache expensive operations with @st.cache_resource.
- Move constant definitions and cached functions to top-level.

Image Predictions Seem Random
- Check preprocessing: 224x224, preprocess_input, batch dimension.
- Ensure RGB conversion. Avoid aggressively compressed images.
- Remember ImageNet limitations,specialized items won't map well.

OpenAI Errors
- Verify OPENAI_API_KEY is loaded (print masked len or check os.getenv exists).
- Add simple retry logic and backoff for rate limits.
- Reduce prompt size if hitting context limits.

Security, Privacy, and Safety Notes

- Never log raw API keys. Keep keys in .env and environment variables only.
- If processing private résumés, avoid storing raw content server-side unless necessary.
- Add a disclaimer for users about third-party processing (OpenAI API).
- Sanitize user inputs and handle non-text PDFs carefully.

Layering Complexity: Where to Go Next

Combine Projects
- Add the image classifier as a tool inside the agent. The agent could decide: "User uploaded an image; classify it first."
- Add the résumé critiquer as a tool that the agent can call to generate feedback on uploaded files.

Enhance Capabilities
- Add retrieval (vector database) so the agent can consult a company handbook.
- Add a job description comparison to the résumé critiquer,score alignment across skills and experience sections.
- Swap MobileNetV2 for another pre-trained model (e.g., EfficientNet) for potentially better accuracy.

Implications and Applications

Education
- Use these projects as labs in AI, ML, or data science courses. Assign students to swap in different LLMs or tools to compare behavior.

Professional Development
- Turn the résumé critiquer into a team tool for hiring or internal mobility. Add role templates and interview prep guidance.
- Build a calculation-heavy agent for finance ops, capable of budgeting and forecasting scenarios.

Small Business & Startups
- Spin up MVPs fast: a support triage agent with tool access, a contract analyzer, or a content brief generator.
- Use Streamlit to demo to stakeholders quickly,iterate based on feedback.

Student Use
- Turn these into portfolio pieces. Document your prompts, tool designs, and performance choices. Recruiters love clean, practical demos.

Recommendations for Different Audiences

For Educators
- Adopt these projects as modular assignments. Encourage students to replace tools (e.g., build a currency converter, a knowledge retriever). Compare results across different LLMs.

For Aspiring AI Developers
- Complete all three projects in order. Then merge them,give your agent the ability to critique a résumé or classify an image as a tool call.

For Institutions
- Equip innovation labs with Streamlit and LangChain/LangGraph templates to reduce setup friction and accelerate prototyping cycles.

Deeper Insight: Why Each Principle Matters

"Agents vs. Chatbots" in Practice
- Agents create utility: calculations, conversions, lookups, transformations. Tools make outputs verifiable and repeatable.
- Example 1: A sales support agent adds tax and discounts with a calculator tool.
- Example 2: A research assistant agent pulls summaries from a local document store using a retrieval tool.

Prompt Engineering Beyond Basics
- Be explicit: persona, task, constraints, structure, and examples.
- Example 1: Résumé feedback with forced sections: Summary, Strengths, Gaps, Action Items.
- Example 2: Tool instructions: "If the user mentions 'percent', call the percentage tool and show steps briefly."

Data Preprocessing as Quality Gate
- Image models are unforgiving: wrong shape or normalization = wrong results.
- Example 1: Photos from phones often include EXIF orientation,convert to RGB and standardize orientation.
- Example 2: Mixed-mode PDFs,text on some pages, images on others. Detect and handle both when you extend with OCR.

Caching for User Experience
- First load: slow. Next interactions: instant. That's what users expect.
- Example 1: Cache model weights (Streamlit @st.cache_resource).
- Example 2: Cache reference data (e.g., allowed labels or tool schemas).

Complete Build Checklists

Agent with Tools
- [ ] Install langgraph, langchain, langchain-openai, python-dotenv with UV.
- [ ] Create tools with @tool and strong docstrings.
- [ ] Initialize ChatOpenAI(temperature=0).
- [ ] create_react_agent(model, tools).
- [ ] Stream responses in a CLI loop.
- [ ] Test with tool and non-tool questions.

Résumé Critiquer
- [ ] Build Streamlit UI with uploader, text input, button.
- [ ] Extract text from PDF/TXT using PyPDF2 or read().
- [ ] Craft system message + user prompt with structure.
- [ ] Call OpenAI chat completions; render with st.markdown.
- [ ] Handle large inputs and add friendly errors.

Image Classifier
- [ ] Load MobileNetV2(weights="imagenet") and cache it.
- [ ] Preprocess: RGB -> NumPy -> resize(224x224) -> preprocess_input -> expand dims.
- [ ] Predict and decode top 3 with decode_predictions.
- [ ] Display image and results in Streamlit.

Common Extensions (If You Want to Go Further)

Agent
- Add a math parser tool (supports +, -, *, /, parentheses) to handle complex expressions.
- Add a CSV loader and a "column summary" tool for quick data insights.

Résumé Critiquer
- Compare résumé against a pasted job description; highlight skills gap and missing keywords.
- Offer a "rewrite" feature: generate improved bullet points with metrics.

Image Classifier
- Allow drag-and-drop batch classification; show a table of top-1 predictions and confidence.
- Add Grad-CAM visualizations to show regions influencing the prediction (advanced).

Two Concrete Scenarios per Project to Cement Understanding

Agent
- Scenario A: "What percent is 45 of 120?" Agent calls percentage tool and explains result.
- Scenario B: "Convert 13 miles to km and then add that to 5 km." Agent chains miles_to_km then calculator, if you extend logic to plan multi-step calls.

Résumé Critiquer
- Scenario A: Candidate targets Software Engineer role; feedback emphasizes projects, GitHub links, test coverage, deployment stories.
- Scenario B: Candidate targets Customer Success; feedback emphasizes retention metrics, escalations handled, NPS improvements.

Image Classifier
- Scenario A: Clear product image (e.g., "espresso machine"). High confidence top-1 result.
- Scenario B: Blurry night photo with multiple objects. Lower confidence; spread across multiple plausible classes.

Verification: Did We Cover Everything?

- Developed an AI agent using LangGraph and LangChain with tool-use logic, custom tools with docstrings, and a streaming CLI loop.
- Built a Streamlit résumé analyzer that accepts PDF/TXT, extracts text via PyPDF2, prompts an OpenAI LLM with a structured system + user message, and renders Markdown results.
- Implemented an image classifier using Streamlit and TensorFlow MobileNetV2 with ImageNet weights, caching the model, preprocessing (PIL -> NumPy -> cv2.resize -> preprocess_input -> expand_dims), and decoding top-3 predictions.
- Emphasized agents vs. chatbots, rapid prototyping with Streamlit, leveraging pre-trained models, prompt engineering, preprocessing discipline, and caching for performance.
- Included implications for education, professional development, small business/startups, and students; plus concrete recommendations.
- Covered secure API key handling with environment variables and .env, and UV for package management.

Conclusion: Your Next Step Is to Ship

Reading won't make you good at AI. Shipping small, useful systems will. You now have three: an agent that can take action, a résumé analyzer that gives concrete career feedback, and a computer vision app that classifies images instantly. You also have the meta-skills that transfer to anything you build next: prompt engineering that gets consistent results, preprocessing that keeps models honest, caching that makes apps fast, and tool design that turns language models into action takers.

Here's the mindset to carry forward:
- Start lean. Build the smallest system that proves value.
- Make data formatting and caching your defaults. Accuracy and speed compound.
- Extend with tools. Each one is a capability you can reuse anywhere.

Put these projects into production for yourself. Tweak prompts, extend tools, gather feedback, and iterate. The fastest way to learn AI is to build real things that people use,even if "people" is just you. That's how you develop intuition, confidence, and results you can point to.

Appendix: Copy/Paste Code Blocks (All in One Place)

Agent Tools and Runner
from langchain.tools import tool
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
from langchain_core.messages import HumanMessage
from dotenv import load_dotenv
import os

load_dotenv()

@tool
def calculator(a: float, b: float) -> str:
"""Useful for performing basic arithmetic calculations with numbers."""
print("Tool has been called")
return f"The sum of {a} and {b} is {a + b}"

@tool
def miles_to_km(miles: float) -> str:
"""Convert miles to kilometers. Use when the user asks for distance conversion between miles and kilometers."""
return f"{miles} miles is {miles * 1.60934:.2f} kilometers"

@tool
def percentage(part: float, whole: float) -> str:
"""Compute the percentage that 'part' represents of 'whole'. Use when the user asks for percent calculations."""
if whole == 0:
return "Cannot compute percentage with whole=0."
return f"{(part / whole) * 100:.2f}%"

def make_agent():
model = ChatOpenAI(temperature=0)
tools = [calculator, miles_to_km, percentage]
return create_react_agent(model, tools)

def run_cli():
agent = make_agent()
print("Type 'quit' to exit.")
while True:
user_input = input("\\nYou: ").strip()
if user_input.lower() == "quit":
break
print("\\nAssistant: ", end="")
for chunk in agent.stream({"messages": [HumanMessage(content=user_input)]}):
if "agent" in chunk and "messages" in chunk["agent"]:
for message in chunk["agent"]["messages"]:
print(message.content, end="", flush=True)
print()

if __name__ == "__main__":
run_cli()

Résumé Critiquer (Streamlit)
import streamlit as st
import io, os
import pypdf2
from openai import OpenAI
from dotenv import load_dotenv

load_dotenv()
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))

st.set_page_config(page_title="AI Resume Critiquer", page_icon="📄")
st.title("AI Resume Critiquer")
st.markdown("Upload your resume and get AI-powered feedback.")

def extract_text_from_file(uploaded_file):
if uploaded_file.type == "application/pdf":
pdf_reader = pypdf2.PdfReader(io.BytesIO(uploaded_file.read()))
text = ""
for page in pdf_reader.pages:
text += (page.extract_text() or "") + "\\n"
return text.strip()
else:
return uploaded_file.read().decode("utf-8", errors="ignore").strip()

def make_prompt(resume_text: str, role: str | None) -> str:
target = role if role else "general job applications"
return f"""
Please analyze this resume and provide constructive feedback. Focus on:
- Content, skills, and experience.
- Specific, actionable improvements.

The target job role is: {target}.

Resume Content:
{resume_text}

Provide your analysis in a clear, structured format with headings, bullet points, and examples when helpful.
"""

uploaded_file = st.file_uploader("Upload your resume (PDF or TXT)", type=["pdf", "txt"])
job_role = st.text_input("Enter the job role you are targeting (optional)")
if st.button("Analyze Resume") and uploaded_file:
resume_text = extract_text_from_file(uploaded_file)
prompt = make_prompt(resume_text, job_role)
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[
{"role": "system", "content": "You are an expert resume reviewer with years of experience in HR."},
{"role": "user", "content": prompt}
],
temperature=0.7,
max_tokens=1000
)
st.markdown("### Analysis Results")
st.markdown(response.choices[0].message.content)

Image Classifier (Streamlit + MobileNetV2)
import streamlit as st
from tensorflow.keras.applications.mobilenet_v2 import MobileNetV2, preprocess_input, decode_predictions
import numpy as np
from PIL import Image
import cv2

@st.cache_resource
def load_cached_model():
return MobileNetV2(weights="imagenet")

model = load_cached_model()

def preprocess_image(img: Image.Image) -> np.ndarray:
img = img.convert("RGB")
arr = np.array(img)
resized = cv2.resize(arr, (224, 224))
batch = np.expand_dims(resized, axis=0)
return preprocess_input(batch)

st.title("Image Classifier")
uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
if uploaded_file is not None:
image = Image.open(uploaded_file)
st.image(image, caption="Uploaded Image.", use_container_width=True)
if st.button("Classify Image"):
with st.spinner("Analyzing image..."):
x = preprocess_image(image)
preds = model.predict(x)
decoded = decode_predictions(preds, top=3)[0]
st.subheader("Predictions:")
for _, label, score in decoded:
st.write(f"**{label.replace('_', ' ').title()}**: {score:.2%}")

Final Thought
Decide which project you'll build first. Set a one-hour limit. Ship a thin version. Then improve one thing per iteration: a clearer docstring, a better prompt, or a faster cache. Momentum beats perfection in AI development.

Frequently Asked Questions

This FAQ answers practical questions about building three beginner-friendly Python AI projects: an AI agent with tools, an AI-powered resume critiquer, and an AI image classifier. It clarifies setup, core concepts, implementation details, and business-focused best practices. You'll find step-by-step guidance, common pitfalls, and real-world examples so you can build, ship, and iterate quickly without getting stuck on jargon or configuration.
Use this as a reference while coding, debugging, and deploying each project.

You'll need a modern Python installation and a clean project folder for each build. These tutorials use UV, a fast Python package installer and resolver, to manage dependencies and virtual environments. Initialize a project by creating a new directory, opening a terminal in that directory, and running the UV init command to generate configuration files and an isolated environment. Then add packages with a single command per dependency. If you prefer pip, you can still use it, but UV simplifies resolves and locking for reproducible builds.
Key point: Keep each project in its own environment to avoid dependency conflicts and make debugging simpler.

Why is an OpenAI API key needed for some projects?

The AI agent and the resume critiquer rely on Large Language Models from OpenAI to reason, analyze, and generate responses. The API key authenticates your application so it can call models like GPT-4o mini. Without a key, those projects can't function because the reasoning engine runs on OpenAI's servers. You're billed per token used, so keep prompts focused and cache results where possible.
Example: The agent uses the model to decide when to call tools (e.g., a calculator), while the resume critiquer uses it to produce structured feedback based on the uploaded resume and target role.

How should I securely store my OpenAI API key?

Never hard-code your API key in source files or push it to version control. Store it in a .env file at the project root and load it at runtime using python-dotenv. Access it with environment variable reads in your code. For deployment, set secrets in your hosting platform's environment settings instead of uploading .env files.
Tip: Add .env to your .gitignore to prevent accidental commits, and rotate keys if you suspect exposure.

What is an AI agent?

An AI agent is a chat system that can think through a task and use "tools" (your Python functions) to act. Unlike a simple chatbot that only replies with text, an agent can decide to call a calculator, fetch data from an API, or query a database to complete a request. You define which tools are available; the model decides when to use them based on your descriptions and type hints.
Example: If a user asks, "Add 7 and 9," the agent can call a calculator tool and return the exact sum, not an approximate guess.

How do you create a "tool" for an AI agent?

In LangChain, a tool is a regular Python function decorated with @tool. The function's name, type hints, and docstring guide the model on what the tool does and when to invoke it. Be explicit in the docstring about purpose, input constraints, and edge cases. Keep tools deterministic and side-effect aware (e.g., log safely, validate inputs).
Key point: Clear docstrings and strict type hints significantly improve the agent's decision-making about tool usage.

What are LangChain and LangGraph?

LangChain is a framework for building LLM apps with components for prompts, tools, and chains. LangGraph builds on LangChain to let you define agent workflows as a graph with state and loops, which is useful when an agent needs to call tools multiple times before responding. Together, they streamline prompt management, tool orchestration, and streaming.
Example: Use LangGraph's create_react_agent to combine the model and tools into a single runnable agent with built-in reasoning steps.

How is the AI agent structured in the code?

The agent has four parts: (1) an LLM instance (e.g., ChatOpenAI), (2) a list of tools (Python functions decorated with @tool), (3) an agent executor created via create_react_agent to handle reasoning and tool calls, and (4) an interaction loop that streams messages to and from the user. The executor decides when to call tools and assembles the final response.
Tip: Keep the toolset minimal at first (e.g., calculator) to verify behavior, then expand.

How does the agent stream responses?

Streaming prints chunks of the model's reply in real time, mimicking a typing effect and improving perceived speed. You iterate over the executor's stream and write chunks to the console or UI as they arrive. This keeps users engaged, especially when the agent performs multiple tool calls or longer reasoning steps.
Example: Show partial responses as they're generated, then append the final answer when tool outputs return.

What is the goal of the AI Resume Critiquer project?

The goal is a simple web app where users upload a resume (PDF or TXT), provide a target role, and receive clear, actionable feedback. The LLM evaluates content, skills, and experience, then returns improvements, keyword suggestions, and formatting notes. The output should be structured, concise, and aligned with the target job's requirements.
Real-world use: A sales manager uploads their resume, selects "Account Executive," and gets tailored suggestions to highlight quota attainment, pipeline metrics, and deal sizes.

What is Streamlit and why is it used here?

Streamlit turns Python scripts into web apps with minimal code. You can add file uploaders, text inputs, buttons, and markdown quickly, which makes it perfect for prototypes and internal tools. It handles widget state for you, so you focus on logic, not boilerplate front-end work.
Example: Build a page with a file uploader for resumes, a text field for target roles, and a button to trigger analysis,no HTML or JavaScript needed.

How does Streamlit's execution model work?

Each user interaction reruns the script from top to bottom, but Streamlit persists widget values, so your app feels stateful without complex callbacks. This model is simple to reason about but requires caching for expensive steps like loading ML models. Use session_state for custom state across runs when needed.
Tip: Wrap model loading and heavy computations in Streamlit caching decorators to keep the UI responsive.

How is text extracted from an uploaded PDF file?

Use PyPDF2 to read binary PDF data, iterate through pages, and call extract_text on each page, concatenating results into a single string. For plain text files, read and decode the content directly. If a PDF is scanned or has complex layouts, you may need OCR and alternative parsers.
Example: If extract_text returns little or nothing, route through an OCR fallback (e.g., pytesseract) to recover content.

How is the LLM prompted to give good resume feedback?

Use a system message to set the reviewer persona and a detailed user message with the resume text, target job, and explicit instructions: what to evaluate, how to structure outputs, and the tone to use. Ask for sections like strengths, gaps, and prioritized fixes. Keep prompts concise but specific to reduce generic advice.
Tip: Request bullet-pointed suggestions, measurable rewrites, and keyword additions tied to the target role.

Certification

About the Certification

Get certified in Python AI app development. Build a tool-using agent, résumé critique app, and TensorFlow image classifier; handle prompts, secure keys, caching, preprocessing; ship Streamlit/LangChain apps employers can try.

Official Certification

Upon successful completion of the "Certification in Building Python AI Agents, Resume Apps & TensorFlow Models", you will receive a verifiable digital certificate. This certificate demonstrates your expertise in the subject matter covered in this course.

Benefits of Certification

  • Enhance your professional credibility and stand out in the job market.
  • Validate your skills and knowledge in cutting-edge AI technologies.
  • Unlock new career opportunities in the rapidly growing AI field.
  • Share your achievement on your resume, LinkedIn, and other professional platforms.

How to complete your certification successfully?

To earn your certification, you’ll need to complete all video lessons, study the guide carefully, and review the FAQ. After that, you’ll be prepared to pass the certification requirements.

Join 20,000+ Professionals, Using AI to transform their Careers

Join professionals who didn’t just adapt, they thrived. You can too, with AI training designed for your job.