
Build AI applications with Python using Lankchain version 1, connecting to LLMs and creating agents. Explore tools, automate with Google Sheets, and work with OpenAI, Gemini, and local models.
Explore how Python programs were deterministic before AI and how connecting to an LLM enables AI powered apps that read text and pdf files and return intelligent responses.
Learn to build an ai-powered app in Python by connecting to Google Gemini LLMs with Lankchain, install libraries, configure API keys, and send text to receive model responses.
Build ai agents with python using lankchain version one, and learn what an ai agent is by building a weather agent that retrieves location and weather.
Build AI agents with Python using Lankchain 1 and learn that an agent is an LLM that can run tools, like a get weather function.
Configure a Google Gen AI Gemini llm with BlankChain, create an agent, and pass a messages dictionary to invoke and interpret AI responses.
Define a weather function as a tool for the ai agent, enabling function calls and real-time data return through doc strings and type hints.
Extend a lang chain agent by adding a location tool to fetch weather for a user's city, define clear docstrings, and test tool integration for deterministic responses.
Write a robust system prompt for an AI agent in Python, specifying the agent role, workflow, and tool calls (get location, get weather) to yield deterministic weather responses.
Build a real-world ai agent that fetches live weather for the user’s location using open weather map api, with api key in a .env file.
Implement the get weather function to fetch data from the open weather API using an API key from dot env, metric units, and dynamic location, with tests via import.
Implement the get location tool by querying the IP API with Python requests and headers, parse JSON to extract city and country, and return 'city, country'. Test with Lisbon, Portugal.
Enhance system prompts and tool docs to produce deterministic weather outputs, returning Celsius and Fahrenheit with explicit labels and including condition, wind, and humidity data for reliability.
Enable chat history for the AI agent to reference prior conversations, store chats in a SQLite database, and connect to a remote PostgreSQL via Supabase for storage and retrieval.
Enable memory for the weather assistant by integrating a memory saver from Lankgraph, preserving prior queries and responses via a thread ID for seamless follow-ups.
Explore how memory works in agents by tracing how user queries and tool results are stored as messages, assembled into response histories, and sent to the LLM for context.
Learn how thread IDs connect responses across multiple conversations and how unique, dynamically generated IDs enable separate chats for users in a web app, avoiding hard coding.
Implement continuous agent conversation with memory using a while loop and a memory saver to retain context via a thread id, then save history to a file or database.
Learn to implement persistent memory for AI agents by saving conversation history with SQLite and SuperBase, moving beyond temporary session storage toward durable, production-ready storage.
Implement persistent memory for your AI agent with a sqlite saver as the checkpointer using a context manager. Store and retrieve the conversation history across sessions in the checkpoints.db database.
Connect your app to a PostgreSQL database instead of a local .db file, using a separate server or a managed service like SuperBase for better security, load distribution, and scalability.
Set up a PostgreSQL database on Superbase, create a project, configure region and security, and copy the connection string to your app’s .env as a secret for integration.
Connect the app to a Postgres database on Supabase, load the connection string, switch to PostgresSaver, and set up the checkpointer to save conversations on the server.
Publish your ai agent as a web app deployed to a server and accessible via web address, where the browser prompts location to fetch weather and memory persists across reloads.
Transition a command line AI agent to a web app using Flask, preserving get weather, get location, LLM initialization, system prompts, and SQLite memory, while fetching real user coordinates.
Set up a Flask web app in Python with app.py, a Flask instance, and route decorators, using HTML templates and a messages dictionary to render pages.
Build a Flask-based AI agent homepage by creating a templates directory, rendering chat.html with render_template, and wiring homepage, send, and clear routes to handle chat history and user input.
Learn to implement post requests in a Flask app, fix method not allowed errors, and capture form input with request.form to pass the message to the agent.
Shows sending web form input to a Python agent, using the get location and get weather tools with keys in .env, and displaying the agent response in the browser.
Build a home page chat using a Flask session object to store messages and render the user and the agent conversation, with redirects to keep users on the same page.
Learn to style chat messages with css inside html using style tags in the head, applying selectors like body, .chat-box, .user, and .agent, plus styling for inputs and buttons.
Learn to retrieve the user’s location in a Python app by sending browser lat/long via JavaScript to Flask, then reverse geocode to city and country for weather.
Learn to download and run local language models on your computer using OLAMA, gaining full control and privacy while building Python-powered AI apps and agents.
Compare cloud-hosted LLMs and self-hostable models, then learn to install and run privacy-focused local AI on your computer or server using Python and Lankchain.
Install OLAMA to run self-hosted llms on your personal computer, download models from 1b to 12b parameters, and chat via a gui or connect through python for app development.
Download and run self-hostable models with Ollama using the olama command. Use PowerShell or terminal to install lama 3.2 1b and access models via the interface or command line.
Connect Python to a locally hosted LLM via the old llama API server running at localhost:11434, then query the model with a LangChain script.
master the process to build your own llm api with a model, expose a free api for any client program, and understand the data flows and architecture for ai agents.
Understand how a client queries an llm via an api, wrapped by Lankchain or other libraries, connecting through OpenAI, Gemini, or Sonnet servers, with api keys and monetization.
Install the requirements.txt, set up langchain and ollama, run ollama serve to host a local llama 3.2 1b model, and expose it via a rest api.
Develop a Flask based REST API by installing Flask, creating a web app and a /chat endpoint, posting JSON data to an LLM, and returning a response.
Explore building an LLM API with chat history support in python, managing a history of user and assistant messages and a request/response flow via a flask rest endpoint.
Learn to extract structured data from llms outputs using Python by guiding a model to emit json with ingredients and recipes, enabling clean display and data-driven user interface.
Understand how a program uses LangChain and an LLM to produce structured JSON data from a defined blueprint via a Pydantic model, detailing the data flow from user to output.
Turn a plain string into a structured json with ingredients and recipe entries by building pydantic blueprints and using LangChain's structured output to guide the llm.
Learn to return structured output from an artificial intelligence agent using a pydantic model with recipient, subject, body, and status. This enables dictionary-like structured results for apps.
Build a complete automation pipeline that reads a Google spreadsheet with Python, detects new rows daily, sends them to an LLM to generate a summary, and emails the results.
Set up a spreadsheet automation app by installing dependencies from requirements.txt, configuring the .env file, enabling the Sheets API, and creating a Google API key to access Sheets with Python.
Learn to load data from a Google spreadsheet into Python using the Google API client, with the id from .env and sheet values ready for automation.
Detect new rows added to a spreadsheet across script executions by comparing the current total rows with a stored last row count in lastRow.txt, identifying all rows and new rows.
Learn how to pass new spreadsheet rows to an LLM using LangChain, set a system prompt, and craft messages with headers to generate concise summaries of added data.
Learn to send emails from Python using a Gmail app password by enabling two step verification, creating and securely storing the app password in .env, and sending a test message.
Develop a function to send the AI-generated summary by email, constructing a mime text message with subject and body, and delivering it via smtp with login credentials.
Learn how to schedule a Python script for automatic daily execution on Python Anywhere, including uploading main.py, a .env file, and requirements.txt, configuring tasks, and reviewing execution logs.
This AI bootcamp teaches you how to build generative AI apps and AI agents with Python. You will use LangChain 1, the newest version of LangChain, together with models from Google Gemini, OpenAI and Ollama.
The course is built around 12 projects. Each project is a working program that you write step by step together with me. Before each project, I explain the idea behind it. For example, what an AI agent is, how an agent remembers a conversation, or how a RAG system finds the right part of a document. Then we write the code.
The 12 projects
A weather AI agent that gets real weather data for the user's location
An AI agent web app built with Flask, with chat history
Your own LLM API service that runs a free local model with Ollama
A daily AI report of new spreadsheet rows, sent to you by email
A Python program that reads and edits private Google Sheets
A recipe generator web app that reads a photo of ingredients
An AI image generator with Google Gemini models
A voice assistant that listens to you and answers out loud
A chat app that answers questions about your own PDF, text and Markdown files
A full RAG system with embeddings and a vector store
A newsletter writer that searches the web with Tavily
A Claude Code clone: a coding agent that reads and writes files on your computer
Between the projects, you learn the skills they need. These include tools and system prompts for agents, saving agent memory in SQLite and Supabase, structured JSON output with Pydantic, and running free models on your own computer with Ollama.
Who this course is for
This is a beginner course in AI. You need basic Python: variables, loops, functions and lists. You do not need any experience with AI or LLMs. We start from how LLMs work and build up from there. It is a good first step if you want to become an AI developer or move into AI engineering.
Practice in PyCharm
The course comes with a free and optional practice course on JetBrains Academy. There you solve coding tasks inside the PyCharm IDE as you follow the videos.
About API costs
Most projects run on free plans: the Gemini API, Tavily, Supabase and OpenWeather. A few lectures use paid models: image generation with Google, the voice assistant with OpenAI, and one image example with OpenAI. The cost is small and you pay only for what you use. You can also just watch those lectures. The Claude Code clone uses OpenAI by default, and I show you how to switch it to Gemini.
By the end of the course, you will have 12 working AI programs and the skills to build your own. I look forward to seeing you in the first lecture.