1 00:00:00,05 --> 00:00:02,05 - [Instructor] Before we can start building this agent, 2 00:00:02,05 --> 00:00:05,01 we do need to set up our development environment. 3 00:00:05,01 --> 00:00:07,00 And I'm going to be using two main tools 4 00:00:07,00 --> 00:00:08,02 that I need to install. 5 00:00:08,02 --> 00:00:10,01 The first is Ollama, 6 00:00:10,01 --> 00:00:12,07 and that's going to run our large language model locally, 7 00:00:12,07 --> 00:00:15,00 and we're also going to need to install Python 8 00:00:15,00 --> 00:00:17,08 and some dependencies for our agents code. 9 00:00:17,08 --> 00:00:20,02 But first, let's take a look at Ollama. 10 00:00:20,02 --> 00:00:21,02 Now, I love Ollama. 11 00:00:21,02 --> 00:00:23,09 It's a fantastic tool that lets you run powerful, 12 00:00:23,09 --> 00:00:28,01 open source, large language models right on your machine. 13 00:00:28,01 --> 00:00:29,06 So if you don't have it already, 14 00:00:29,06 --> 00:00:33,03 open up your web browser and go to Ollama.com as I am here, 15 00:00:33,03 --> 00:00:34,08 and then you can download it. 16 00:00:34,08 --> 00:00:37,05 It's available for MacOS, Windows, and Linux. 17 00:00:37,05 --> 00:00:38,07 So once you've downloaded it, 18 00:00:38,07 --> 00:00:41,02 follow the instructions for your operating system. 19 00:00:41,02 --> 00:00:43,06 If you're on Mac like I am right now, 20 00:00:43,06 --> 00:00:46,03 you will see a dmg like this one. 21 00:00:46,03 --> 00:00:48,08 You can just double click it to open it. 22 00:00:48,08 --> 00:00:50,09 And you'll get this window that allows you to drag Ollama 23 00:00:50,09 --> 00:00:54,08 over to your applications folder to install it. 24 00:00:54,08 --> 00:00:57,01 Now that Ollama is running, you do need to download 25 00:00:57,01 --> 00:01:00,01 a large language model for it to use. 26 00:01:00,01 --> 00:01:02,04 And you can use any large language model you like, 27 00:01:02,04 --> 00:01:04,01 of course, but I'm going to be using 28 00:01:04,01 --> 00:01:07,08 the GPT-OSS 20 billion parameter model 29 00:01:07,08 --> 00:01:10,00 in these videos and in this course. 30 00:01:10,00 --> 00:01:12,00 So if you want to get that, first of all, 31 00:01:12,00 --> 00:01:12,08 you're going to open up 32 00:01:12,08 --> 00:01:14,06 the Ollama window that you've done here, 33 00:01:14,06 --> 00:01:16,03 and you can start sending a message 34 00:01:16,03 --> 00:01:17,06 and chatting with Ollama. 35 00:01:17,06 --> 00:01:19,01 If the model isn't already there, 36 00:01:19,01 --> 00:01:21,00 it's going to download the model for you 37 00:01:21,00 --> 00:01:23,07 and then it'll be useful for you to be able to use. 38 00:01:23,07 --> 00:01:26,00 Or if you prefer to use a terminal, 39 00:01:26,00 --> 00:01:28,01 you can use a terminal window like this one, 40 00:01:28,01 --> 00:01:33,07 and you can type Ollama run gpt-oss:20b. 41 00:01:33,07 --> 00:01:35,05 Again, if you don't have the model, 42 00:01:35,05 --> 00:01:36,07 it'll download it for you. 43 00:01:36,07 --> 00:01:38,05 As you can see, I already have the model here 44 00:01:38,05 --> 00:01:40,05 so I can start chatting with it. 45 00:01:40,05 --> 00:01:44,07 So now Ollama is good, up and running, you're good to go. 46 00:01:44,07 --> 00:01:47,09 Okay, next, let's get our Python environment ready. 47 00:01:47,09 --> 00:01:49,05 Now, I find it's really good practice 48 00:01:49,05 --> 00:01:51,03 to use a virtual environment 49 00:01:51,03 --> 00:01:54,00 that keeps our project dependency separate. 50 00:01:54,00 --> 00:01:56,06 So for example, on a Mac out of the box, 51 00:01:56,06 --> 00:01:58,02 you're going to have Python three, 52 00:01:58,02 --> 00:01:59,06 but we don't want to be using Python three, 53 00:01:59,06 --> 00:02:01,03 I'm just going to be using Python, 54 00:02:01,03 --> 00:02:02,07 and I'll show you how to set that up 55 00:02:02,07 --> 00:02:04,01 with a virtual environment. 56 00:02:04,01 --> 00:02:07,09 You're going to say Python3-m venv, 57 00:02:07,09 --> 00:02:10,04 venv stands for virtual environment, 58 00:02:10,04 --> 00:02:12,04 and then give you a virtual environment a name, 59 00:02:12,04 --> 00:02:15,00 like I could say '.venv' here. 60 00:02:15,00 --> 00:02:17,02 And that's going to create a virtual environment 61 00:02:17,02 --> 00:02:19,07 so any dependencies, any other stuff 62 00:02:19,07 --> 00:02:21,03 that you're going to need to install 63 00:02:21,03 --> 00:02:23,01 to be able to run your application 64 00:02:23,01 --> 00:02:25,02 will go into that virtual environment 65 00:02:25,02 --> 00:02:27,02 and not mess up your main system. 66 00:02:27,02 --> 00:02:30,04 And you're going to activate that with source. 67 00:02:30,04 --> 00:02:36,03 It was called .venv/bin/activate. 68 00:02:36,03 --> 00:02:39,09 And now you can actually say Python instead of Python three 69 00:02:39,09 --> 00:02:41,05 to be able to do any Python command. 70 00:02:41,05 --> 00:02:43,06 So you'll see as I'm going through this course, 71 00:02:43,06 --> 00:02:46,02 I'll be typing Python a lot, and that's how. 72 00:02:46,02 --> 00:02:49,09 And also any installments, any stuff that I need to install, 73 00:02:49,09 --> 00:02:52,00 any requirements and all that kind of thing 74 00:02:52,00 --> 00:02:53,03 are going to be installed 75 00:02:53,03 --> 00:02:55,06 completely in the virtual environment. 76 00:02:55,06 --> 00:02:57,03 And while they're in that virtual environment, 77 00:02:57,03 --> 00:02:59,09 they're not going to impact anything else on your system. 78 00:02:59,09 --> 00:03:00,07 So that's it. 79 00:03:00,07 --> 00:03:03,02 The environment is now set up and is ready to go. 80 00:03:03,02 --> 00:03:05,03 So next up, we're going to take a closer look 81 00:03:05,03 --> 00:03:09,00 at what an AI agent actually is.