Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Build AI Agents in Python: From LLM Basics to Agents
New
1 students

Build AI Agents in Python: From LLM Basics to Agents

Understand how LLMs really work, call them from Python, and learn what makes an AI agent, with clear visual lessons
Created bySreeprada C
Last updated 10/2026
English
English

What you'll learn

  • Explain how a large language model works, including next-word prediction, training and why models sometimes make things up
  • Understand tokens and estimate how many tokens a piece of text uses, and why that affects cost, limits and speed
  • Describe the context window and why a model forgets things between requests
  • Choose the right temperature setting for accuracy or creativity
  • Understand how APIs work: requests, responses, methods, headers and status codes
  • Read and write JSON confidently and convert it to and from Python
  • Store API keys safely using environment variables, and know what to do if a key leaks
  • Make your first LLM call from Python and keep a multi-turn conversation going
  • Explain what turns a chatbot into an AI agent: a model, tools and a loop

Course content

4 sections • 10 lectures • 36m total length
  • Welcome3:57

Requirements

  • Basic Python: variables, functions and lists
  • A computer with Python 3 installed
  • No machine learning or maths background needed; every concept is explained from scratch

Description

AI agents are everywhere. Most tutorials skip the part where you understand them.

Before you can build an AI agent that actually works, you need to know what’s happening underneath. How does a language model produce text? Why does it forget what you said? Why does the same question give different answers? What is your code really sending when it “talks” to a model?

This course answers those questions from the ground up, with clear animations instead of jargon.

How this course works

Each lecture covers one idea in about five minutes. You’ll see every concept animated first, so it clicks before any code appears, and each section ends with a quick check so you know it stuck.

What you’ll learn

  • How LLMs really work: next-word prediction, training, and why models sometimes invent facts

  • Tokens: what models actually read, and how that affects cost, limits and speed

  • The context window: why models have no memory, and how chat apps work around it

  • Temperature: how models choose words, and which setting to use when

  • APIs and JSON: the plumbing that lets your Python code talk to a model

  • API keys: how to keep them safe, and what to do if one leaks

  • Your first LLM call: messages, roles and multi-turn conversations in real Python code

  • What makes an agent: the model, tools and loop behind every AI agent

Who it’s for

This course is for Python developers, software engineers and curious learners who want a solid, honest foundation in modern AI. You only need basic Python. No machine learning or maths background is required.

By the end, you’ll understand the building blocks every AI agent is made from, and you’ll be ready to start building your own.

Who this course is for:

  • Python developers who want to understand how LLMs and AI agents really work before building with them
  • Beginners to AI who prefer clear, visual explanations over jargon
  • Software engineers preparing to add AI features to their apps
  • Students and career-changers who want a solid foundation in modern AI development
  • Not for: complete beginners to programming, or experienced ML engineers looking for advanced model training