Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
AI Agents with Python, Ollama & n8n: Free Local Automation
Role Play
New

AI Agents with Python, Ollama & n8n: Free Local Automation

Build RAG chatbots, LangGraph agents, Streamlit apps, FastAPI services and n8n workflows on your own PC. No API keys.
Created byOmar Koryakin
Last updated 11/2026
English
ArabicBangla

What you'll learn

  • Run free language models on your own Windows PC with Ollama and choose the right model for your hardware
  • Call a local model from Python and get steady, repeatable answers with temperature, seed and length settings
  • Write prompts that do one job well, and catch the four classic mistakes: vague, two jobs, invented facts and injection
  • Get structured JSON out of a model with Pydantic, and check every value before your code trusts it
  • Give a model tools: let it look up orders, stock and prices in your own files, safely and with a person in the loop
  • Build RAG: search your PDF manuals with embeddings and Chroma, and answer only from the pages, with the page number
  • Build agents and multi-step workflows with LangChain and LangGraph, with memory, routing and an approval step
  • Make teams of agents: a writer and a reviewer, a supervisor that hands out work, and measure what each one costs
  • Turn your agent into a browser app with Streamlit, with chat history, sources, uploads and settings in a sidebar
  • Serve your agent as a web service with FastAPI, test it from Python and from the docs page, and keep it fast
  • Install n8n for free on your own PC and build workflows that run every morning, read files and call your local model
  • Connect n8n to your Python service, and decide when a job belongs in Python and when in n8n
  • Make agents reliable: tests that score them, logs, Git to undo bad changes, and guards against prompt injection
  • Build a complete final project: one assistant for orders, manuals and claims, with an app, a service and a workflow

Coding Exercises

This course includes our updated coding exercises so you can practice your skills as you learn.

See a demo
Image of coding exercise example

Course content

15 sections • 127 lectures • 20h 42m total length
  • Welcome: what you will build9:07
    Meet Kestrel Pumps and the three people you build for: Elena with the inbox, Samuel with the manuals and Hana, who wants numbers she can trust. You open the real emails, manuals and test files, and see the road to the final project.
  • What an AI agent really is9:10
    A customer asks where her order is, and a chatbot can only guess. You meet the four parts of an agent, a model, instructions, tools and a loop, and decide which of three jobs really needs a tool.
  • Where agents are used at work8:50
    Take three short tours of agent jobs with real files: a reply drafter for the inbox, a manuals assistant that answers with pages and a quote writer that uses stock and prices. Then you write down one job from your own work.
  • Install Ollama and talk to your first local model9:51
    Install Ollama from the official page, check it with ollama version, list and pull a model, and have your first conversation with qwen3:8b about a pump that hums but does not start. You end it with /bye.
  • Which model? Size, memory and speed on your PC9:48
    Hana's laptop has no graphics card. You compare qwen3:4b and qwen3:8b on the same question, read the size and the tokens per second from the terminal, and choose a model that fits a PC.
  • VS Code, the course folder and a virtual environment9:40
    Open the course folder in VS Code, look inside the virtual environment, then make a second one, activate it, hit the missing package error, fix it with pip install -r and delete what you made.
  • Common set-up problems and their fixes9:53
    Make the common day one errors on purpose and fix them: model not found, the server not reachable, python not recognised, scripts disabled and a broken requirements line. You keep a fix sheet of your own.
  • Section project: check your setup with one script9:15
    Write check_setup.py, a script that tests the Python version, the packages, the Ollama server and the models, and prints OK or exactly what to fix. Then you add a free disk space check.
  • Section 1 quiz

Requirements

  • A Windows computer where you can install programs; 16 GB of memory is recommended
  • A graphics card with 8 GB or more makes the models fast; without one, the course shows a smaller model that runs on most laptops
  • Basic Python helps (variables, lists, loops, functions), but every line is typed and explained on screen
  • No paid accounts and no API keys: every tool in the course is free

Description

Most courses about AI agents start with a credit card: an API key, a monthly bill, and your company's documents sent to someone else's server. This course takes the other road. Everything runs on your own Windows PC with free tools: a local language model in Ollama, Python, VS Code, LangChain and LangGraph, a Chroma database, Streamlit, FastAPI and the self-hosted version of n8n. No API keys, no usage fees, and your data never leaves your computer.

Agent frameworks, compared and deployed. You build the agent loop by hand in plain Python first, then the same work in LangChain, then a stateful, multi-step agent in LangGraph: state, nodes and edges, tool calling, memory between turns and a human-in-the-loop approval step before the agent acts. You compare one agent with a team of agents (pipeline, reviewer and supervisor patterns), and you deploy your agent as a Streamlit app, a FastAPI service and an n8n workflow.

You learn by building for one company. Kestrel Pumps, a small maker of water pumps, has an inbox full of order questions, service manuals nobody has time to read, warranty claims and weekly reports. Lesson by lesson you build the tools its people ask for: a reply drafter that does not invent facts, an email sorter you can measure, an agent that looks up real orders and stock, an assistant that answers from the manuals and names the page, a team of agents that writes and reviews a report, and a help desk page your colleagues can use in the browser.

Then you make it work without you. You turn the assistant into a small web service with FastAPI, and you build n8n workflows that run on their own every morning: read the new emails, call your service, write the tickets and a summary. n8n is one of the fastest-growing automation tools, and here you run it for free on your own machine and connect it to your own local model, with no cloud account and no limits.

Every lesson is recorded on a real screen, with real code typed line by line and real answers from the model, including the times it gets something wrong. You see why an answer was wrong and how to fix it: clearer instructions, structured output, guards against prompt injection, tests that score your agent, and Git so you can undo a bad change. The final project puts it all together in one assistant for orders, manuals and claims, with a person approving every refund.

By the end you will have a folder of working projects, a clear sense of what agents are good at and where they fail, and the confidence to automate real work in your own job, on your own computer, at no running cost.

Who this course is for:

  • Python learners who want to build real AI agents and automations, not just chat with a chatbot
  • Office workers, analysts and engineers who want to automate emails, documents and reports with AI on their own computer
  • Anyone who cannot send company data to a cloud AI service and needs a private, local setup
  • People who heard about n8n and want to use it for free, connected to their own local model and Python code
  • Students of my Python courses who are ready for the next step: agents, RAG and automation