Setting Up Your AI Agent Development Environment
This practical tutorial walks you through the essential steps to get your computer ready for AI development. The setup includes three main components: Python, Visual Studio Code, and the Ollama framework for running large language models locally. For a broader overview of why you might choose local models, see our guide on How AI Models Work: Cloud vs. Local (Free Ollama Setup).
Step 1: Check and Install Python
First, verify if Python is already installed on your system:
-
Open Command Prompt as an administrator
-
Run the following command:
python --version -
If Python is installed, you will see the version number (e.g., Python 3.10.0)
-
If you get an error like "Python is not recognized," you need to install it
To install Python:
- Visit the official Python website
- Select the version for your operating system (Windows, Linux, Mac OS)
- Run the installer and follow the simple click-through installation process
- After installation, verify again with
python --version
Step 2: Install Visual Studio Code (VS Code)
VS Code is the integrated development environment (IDE) where you will write and run your AI code.
- Go to the Visual Studio Code website
- Choose the version for your operating system (Windows, Linux, Mac)
- Download and install it, the process is straightforward, similar to installing any mobile app
- Once installed, open VS Code
Step 3: Install the Ollama Framework
Ollama allows you to run large language models locally on your machine.
- Visit ollama.com/download
- Download the version suitable for your operating system
- Install Ollama. For a more detailed walkthrough, you can also read our guide on Install Ollama and Run Qwen3 4B Locally – AI Model Setup Guide.
Step 4: Download Your First AI Model
After installing Ollama, you need to download a language model. Open your terminal and run one of these commands:
-
For a larger, more capable model:
ollama pull llama3.2:3b -
For a smaller, faster model:
ollama pull llama3.2:1b
Choose based on your needs: the 3B model is trained on more data and provides better responses, while the 1B model is faster and uses fewer resources.
Step 5: Test Your Ollama Installation
Verify that the model works correctly:
-
Run the model using:
ollama run llama3.2:3b(use
llama3.2:1bif you downloaded the smaller version) -
The model will start and prompt you for input
-
Ask a question, such as "What is machine learning?"
-
The model will display its thinking process and then provide a final answer
Step 6: Create Your Project Folder
Organize your work by creating a dedicated project folder:
- Navigate to a drive (e.g., D:)
- Create a new folder named something short like
ai_agentorai-agent - A shorter name is better for working in the terminal
Step 7: Configure VS Code
- Open Visual Studio Code
- Go to File > Open Folder and select the folder you just created
- The folder will appear in the Explorer panel on the left
- Open the terminal: go to View > Terminal (or use the shortcut)
- Trust the folder when prompted (since you created it)
For a deeper dive into managing your coding environment, refer to our guide on Set Up Your AI Agent Project: Virtual Environment Guide for Beginners.
Step 8: Create Your First Python File
In VS Code:
- Click the New File icon in the Explorer panel
- Name the file
hello_ai.py - You can now write Python code in the editor area
- Enlarge the editor by closing the terminal if needed
You are now fully set up to begin writing programs for AI agent development! To continue learning, check out our tutorial on Understanding APIs and Building Your First AI Assistant in Python. For a complete summary of all the tools installed today, see the Free AI Development Setup: Install Python, VS Code & Ollama Tools page.
So, welcome to first practical of this course. So, the first step is that you have to
install Python. It is possible that on your system Python is already installed. So, what we
will do is we will check whether Python is already installed or not. So, I will open command prompt. So, I will open
command prompt. Run it as an administrator. >> [music]
>> And then I will go and run this command Python minus minus version. If the Python is already installed, it
will give you the version number. If it is not, then it will give you an error like Python is not recognized. In case
Python is not installed, you can install the Python through this website. When you open that website, you get
something like this. From here, you can install the Python. This is for the Windows, but you can
choose the Linux, Mac OS, any version, whatever you want. Just you have to install it. Press click
click click next, and it will be installed. No issue. It is very simple to install Python. After you have
installed it, just check it again. Python minus minus version. If you get the version number, that means the
Python is installed on your computer or laptop. So, that is the first job done.
Next is the install Visual Studio Code. This is the interface. This is the integrated development environment where
we will write our code. So, this is very important to download. This is the website through which you can download
this. So, how to download? Go on to this website, and here again you have the
Linux, Mac, as well as the Windows version. You can download it and install it
whatever your operating system is accordingly. Installation is again very simple. Nowadays installations are very
simple, just like as you install any app on your mobile. It is almost similar to that.
So, you can install this Visual Studio Code. After you have installed it, you have to
install Ollama framework. For that, you go on to this website, ollama.com/download.
So, this is the website of Ollama. Again, here every operating system is there. You can download whatever version
is suitable for it. Download for Windows, or you can download for Macs. So, you can download it and install it
this. This is the framework of Ollama. Once you have installed that, thereafter you download your first AI model.
How to download first AI model? This is the command. Ollama pull
this. This is the command which you will write on your terminal. So, just copy this command,
press enter button, and it will restart downloading it. On my laptop, it is already installed, so I am not doing
that. Now, I have given one more option. That is called 1.7B.
This is a smaller version of Ollama. This is larger version of Ollama. So, that means if you run this, it will
take a lot of time to respond. But, if you use this, which is a smaller version of large language model, then maybe your
output will come a little faster. You can use any of these. This is big one. This is a little bit a smaller. But, for
our purposes, both will work. It is only the size which is larger here, and it is
a smaller here. That means it has been trained on large amount of data. It has been trained on a little bit a small
amount of data. But, for our purpose practical purposes, both of this will work.
So, so that's what you can do. So, after you have downloaded it, you
have to test whether Ollama is working or not. For that, you will run the following command. If you have
downloaded this, then you will use 4B. If you have downloaded [clears throat] this, then you will use 1.7B.
So, I am going to run this. I have downloaded both on my computer, so I can run both.
So, this is the command. When I will run this,
this large language model will run, and it will ask for the user to ask any question, and thereafter it will
respond. So, it has run. Now, it is asking to give any message to it. So, suppose you
ask, "What is machine learning?" Or you can ask any question. Then, it will respond.
Before responding, it will do the thinking. All those statements will keep on printing on your screen.
Similar to any generative AI application like ChatGPT, etc. And finally, it will give you the final answer. That means
the answer of this question, what is machine learning? So, after this thinking process is done,
this is the final response. That's a great question. Machine learning is a branch of artificial intelligence where
computers learn patterns. [clears throat] All this is the response of the
this large language model. Once we see that, we know that our large language model is properly installed.
Thereafter, we will create the project folder where we will store our project. So, we will create project folder.
So, what I will do is go on to my computer. Take any drive, let's say D drive, and
here we can create a folder. You can keep its name either AI agent or AI agent development.
Whatever name you want, you can keep that. So, I have kept it as AI agent. You can
have AI agent development or AI agent. So, a shorter name is a little better. We will see why, but that is better
because when I will run this Visual Studio Code, then you will know that why I have kept
shorter name. So, this is the name of the folder.
Thereafter, we will go and open Visual Studio Code software. So,
this is the Visual Studio Code software. I will double click on this and this will open. This is the
interface of Visual Studio Code. Here, the menu is here. Sometimes menu can come on the top and sometimes menu
can come like this also because I have increased the font size, therefore it is coming like this. Otherwise, the same
menu will come on the top. So, what we will do is we will open the
folder. So, open folder. I will go on to that folder which I have created. That is AI agent. So, this is the folder.
Once I have created this folder, then the explorer comes here where all the
file and folders will be listed. You just close this. And here the chatbot is there. We will
close this also, not required for our purpose. So, this is the folder which you can see
here, AI agent. Now, when you have to give any command, for that you require a terminal.
So, click here, view. On the view, you go click on terminal. So, it is asking, do you trust the
authors of the file in this folder? Of course, because this folder has been made by me only, so I trust it. So, this
is the terminal window where you can type any command. For example, suppose I want to run a program, I can write
Python and the name of the file to run it. I kept the folder name AI agent as small
so that you have lots of space to type here and it does not wrap into the next line.
Right? So, that's why I kept the name of the file is smaller. You can have any
file name or folder name, whatever you want, AI agent development or AI agent. I have kept it AI agent.
So, this is basically the terminal. This is the area where your file will be displayed. Whenever we will create it,
this is the area where the file information will come, where we will type the code, etc.
This is the area where you will have this new file, new folder, so you can create any new file, you can create any
new folder by clicking here. Suppose, for example, I want to create a new file, I'll just click here.
And then, I can write the name of the file. Suppose, I write the name of the file hello
_ai.py. So, this file is created, and you can see here
the information, whatever I have to write in this file, I can write in this area. So, this is the area where I can
write any code, whatever I want, like this. So, we can write the code in this area.
We can make this area larger by closing the terminal, right? So, now this area, we can write the entire code. And this
is showing that this file is currently open. So, probably this is enough for the
first practical. I hope the setup is ready. Now, we can write the program. Thank you.
You need three main components: Python (the programming language), Visual Studio Code (the code editor/IDE), and Ollama (a framework to run large language models locally). This setup allows you to write and execute AI code, and interact with AI models on your own computer.
Use ollama pull llama3.2:3b for a more capable model that provides better responses but requires more system resources. Use ollama pull llama3.2:1b for a faster, lighter model that uses less RAM and CPU/GPU, ideal for machines with limited resources. The choice depends on your hardware and whether you prioritize response quality or speed.
Open Command Prompt as an administrator and run python --version. If you see a version number (e.g., Python 3.10.0), Python is installed. If you see an error like 'Python is not recognized', download and install Python from the official website, then re-run the command to confirm.
After downloading a model (e.g., with ollama pull llama3.2:3b), run the command ollama run llama3.2:3b in your terminal. The model will start and prompt you for input. Ask a question like 'What is machine learning?' and verify that it shows its thinking process and provides a final answer.
A dedicated folder (e.g., named ai_agent) keeps all your code, models, and related files organized in one place. This makes it easier to navigate in the terminal, manage project files, and open the folder directly in VS Code using File > Open Folder.
First, open VS Code and go to File > Open Folder to select your project folder. The folder will appear in the Explorer panel. Then, open the terminal via View > Terminal. Finally, click the New File icon in Explorer, name the file hello_ai.py, and start writing Python code in the editor area.
Ensure Ollama was installed correctly by checking the official download page for your OS. On Windows, you may need to restart your terminal or computer after installation. If it still fails, verify that the Ollama installation directory is added to your system's PATH environment variable, or try reinstalling.
Keep this summary
Save it to LunaNotes and it becomes a real note in your library — editable, searchable, and ready to turn into flashcards or a diagram. Free to start.
Save to LunaNotesOr summarise for another video.
32K+ people have turned 65K+ videos into notes
“Very useful tool. I'm using it for the last couple weeks and I'm loving it so far. Makes learning on YouTube a great experience.”
This summary and transcript were automatically generated using AI with the Free YouTube transcript summary tool by LunaNotes.
Related summaries
Free AI Development Setup: Install Python, VS Code & Ollama Tools
Learn how to set up a complete local AI development environment using three free tools. This guide covers Python installation, Visual Studio Code setup, and Ollama for running AI models on your own computer — no GPU or cloud costs required.
How to Write Your First AI Program in Python with Ollama
Learn to write a simple AI-powered Python program that communicates with a local AI model (Ollama). This step-by-step tutorial covers importing libraries, loading environment variables, connecting to the AI, sending a question, and displaying the response.
Install Ollama and Run Qwen3 4B Locally – AI Model Setup Guide
Learn how to install the Ollama AI framework on your computer, download the lightweight Qwen3 4B model, and run it locally via terminal. This step-by-step tutorial lets you chat with an open-source LLM right on your own laptop—no cloud or GPU required.
How to Configure AI Model Settings for Your First Python Program
Learn to set up a configuration file (.env) for your AI program, including base URL, API key, and model name. This tutorial shows how to configure Ollama locally so your Python code can communicate with an AI model without hardcoding settings.
Set Up Your AI Agent Project: Virtual Environment Guide for Beginners
Learn how to create a project folder, open it in VS Code, and set up a Python virtual environment to keep your AI development libraries isolated. This step-by-step tutorial explains why venvs prevent version conflicts between projects.
Most viewed summaries
A Comprehensive Guide to Using Stable Diffusion Forge UI
Explore the Stable Diffusion Forge UI, customizable settings, models, and more to enhance your image generation experience.
Kolonyalismo at Imperyalismo: Ang Kasaysayan ng Pagsakop sa Pilipinas
Tuklasin ang kasaysayan ng kolonyalismo at imperyalismo sa Pilipinas sa pamamagitan ni Ferdinand Magellan.
Mastering Inpainting with Stable Diffusion: Fix Mistakes and Enhance Your Images
Learn to fix mistakes and enhance images with Stable Diffusion's inpainting features effectively.
Pamamaraan at Patakarang Kolonyal ng mga Espanyol sa Pilipinas
Tuklasin ang mga pamamaraan at patakaran ng mga Espanyol sa Pilipinas, at ang epekto nito sa mga Pilipino.
How to Install and Configure Forge: A New Stable Diffusion Web UI
Learn to install and configure the new Forge web UI for Stable Diffusion, with tips on models and settings.
Found this summary useful?
Take it with you. One click puts it in your own LunaNotes library.
Save to LunaNotes