Shadowing Practice: How AI Agents Actually Work (Explained in One Python File) - Learn English Speaking with Video

Choose a practice mode

Each mode opens a full-screen practice room.

526 sentences
If sentences are too short or too long, click Edit to adjust them.
1
In this video, you'll learn how to build an AI coding agent from scratch in a little over 200 lines of Python.
2
So before diving in the tutorial, here's a quick little overview of the AI coding agent that we will be building.
3
So we can ask it, for example, what files are in this directory,
4
and it will go through the current directory and list everything that's in there.
5
Now I can ask it what's in the main .py file, and it will tell us what this file is about.
6
And now we ask it to add a simple print statement below this file to see that it can actually edit files.
7
There we go done I've added the print statement
8
and now this whole agent lives inside the single main .py file
9
which is just over 200 lines long
10
so in my opinion this is a must watch for anyone that's interested in building AI agents
11
and has played with frameworks already but wants to get a better understanding of really how they work behind the scenes.
12
Alright
13
and let's get into things
14
now we'll start as always with the github repository link will be in the description for you to clone
15
and follow along which I highly recommend.
16
But before that, I want to quickly give credit to Francis Bison, who is the original author of this repository.
17
So you can see I forked his work.
18
Francis is a member in our data freelancer community, and he was totally fine with sharing this with more people.
19
So with that out of the way, make sure to clone the repository and open it up in your favorite IDE.
20
I am doing this in cursor.
21
And as you can see, I have the repo opened up over here where we have a runbook of all the files
22
that we will be going through but before we do
23
that there's a quick little setup that we need to do
24
and we are going to run the code from this repository using uv
25
so uv is an extremely fast python package and project manager
26
and it can essentially replace pip it's a lot faster
27
i highly recommend to set this up it's super simple to get going
28
you can follow the instructions over here i also have an entire video showcasing how to set this up
29
and why you should use this
30
if you're not using uv already as a python developer you are missing out all right
31
so when you clone the repository
32
and set this up in your favorite ide there's one more thing
33
that we need and that is an api key from entropic
34
because we are going to use the new clod 4 .5 sonnet model
35
which as of the recording of this video was released today
36
so this will be an excellent use case to put this model to the test
37
so if you don't already have a clod api key go to console .entropic .com
38
and then you can find the api keys in the left menu bar over here
39
now throughout this tutorial I'm going to walk you through all of the scripts over here
40
so we start with script number one
41
and then we go up all the way to script number seven these are the main .py file
42
that I've shown you in the beginning of this video broken down into the various sub components
43
so we're going to start really simple in the basic script in one
44
and then in number two we're going to add complexity to it
45
and this way we will build the entire agent sequentially step by step
46
so you'll understand everything all right
47
and let's start with 01 basic script very simple the only goal here is to get it running
48
and to plug in our entropic api key
49
so i'm going to open up a terminal to the right side over here
50
and i'm first going to run the command that is listed over here
51
so export entropic api key and then this is where you should plug
52
that in all right so now within this terminal session we can use the entropic api key
53
and now to run this code what i'm going to do is i'm going to cd into the runbook
54
and i'm going to list the folders over here.
55
So remember the folder structure, right?
56
So we were in the root of the project.
57
Now we're in the runbook where all of the files are.
58
So now coming back over here, I am going to run the first script by using UFI.
59
So it will be UFI run and I will do 01.
60
I can do tap to autocomplete and I can run this.
61
Now you should be seeing AI agent starting.
62
Now that's all for the first file.
63
Super simple to get started, but just to make sure we can run the code.
64
So now it's time to move into the second file
65
which is the agent class and here things are getting a little bit more interesting
66
so here we're going to actually define the tools
67
and create the setup for our agent
68
but first let's talk about what we see over here
69
because this is a little script that we have
70
that instructs uv what dependencies we need in order to run this code
71
so this is a uv feature and this allows us to run
72
Python files with pip installs like Entropic or PyDentic with dependencies with libraries without needing to set up a virtual environment.
73
And this overall simplifies the running of this code base.
74
So that's the script that you see over here and that enables us to now focus on the imports.
75
So we have some default
76
Python libraries like the OS, the system and the typing and then Entropic and PyDentic are external libraries that UV is going to manage for us.
77
All right, and with those imports out of the way, let's look at the goal of this file.
78
So we're going to implement two things.
79
We're going to specify the model for our tools, and we're going to create the actual class for our AI agent.
80
So let's take things step by step.
81
Let's talk about tools first, because all.. really an agent is is a connection with a
82
large language model where we give it a list of tools where it can decide to use
83
that tool then our code will execute that and use
84
that information so we're going to work we're going to work around this principle
85
and it's very important to understand this if you've never worked with tools
86
or with function calling I will link a video below
87
that gives a full introduction to this
88
because this will be the basis of what's going to make our agent an agent
89
and not just a call to a large language model
90
and a tool is simply a list within there an object
91
and that object has a name a description and an input schema
92
so if we then come over to our code over here
93
and we look at the base model
94
that we are creating here using Pydentic you can see our tool definition
95
we give our tool a name a description and the input schema and it matches the data types that the models expect.
96
Now, if you're new to Pydentic, I would highly recommend to look into it because if you're building AI agents with Python,
97
Pydentic is really a must -have library and for the rest of the tutorial,
98
I will assume that you understand the basics of how to work with Pydentic.
99
All right, so that's step number one.
100
We now have a standardized way to specify a tool for our agent.
101
Now let's look into the next class in this file, which is the AI agent class.
102
And here you can see that we initialize our AI agent with three attributes.
103
So first of all, we have the client, which is going to be the Entropic client that we import from Entropic,
104
and then we create a client.
105
So this is the wrapper, the Python SDK that we can use to simply interact with the models from Entropic.
106
And then the next attribute is the messages, which is a list with dictionaries in there.
107
And that is simply a specification of how models like OpenAI and Entropic capture the messages, right?
108
So we have the role, the user, and later we can also add the assistant to this.
109
So that's the second attribute.
110
And then finally, we have the tools, which is now our tool definition, but then put into a list.
111
So coming back to the example again, you can see we have our tool definition, which we just defined using Pidentic.
112
And now the tools variable over here is simply a list with tools in there.
113
So that's the initial setup for the AI agent class.
114
So now in order to run this, we can open up our terminal again.
115
And you can see the command down below here.
116
So we can do UV run and then we can do the agent class.
117
So since we are already in the runbook folder, I can do UV run O2, tap to autocomplete.
118
And then when this runs, what you should see is agent initialized.
119
That's when you know we executed all of the code here correctly and we don't have any errors right now.
120
All right.
121
And with that, we can go into O3 define tools.
122
So first, let's start with a high level overview of everything that we're doing.
123
So we have all of the same files.
124
But now if we go into the AI agent, you can see that we also have a new function over here,
125
which is called set up tools.
126
And if we look at the internalization beyond just creating the empty list of tools,
127
we're also going to call this internal function to set up the tools.
128
So that's the goal of this file to specify those tools.
129
So now let's look at this over here and come back to the specification once more.
130
So with this, again, it's very important to keep in mind
131
this is just a specification for the agent to understand look what actions can i do what can i take
132
and what parameters do i need to plug into the functions
133
we're not going to create the actual functions in python just yet
134
that is what we're going to do in a next step
135
so for now it's all about specification so
136
if we then think about what our minimal mvp coding agent
137
needs to do it needs to be able to read a file
138
it needs to be able to list files in a directory
139
and then it needs to be able to edit files
140
so let's have a look at each of these tool definitions in a little bit more detail
141
so very straightforward name
142
and description simply instructs the ai okay what is this about what can it do
143
and then where it gets more interesting is the input schema
144
so for the read file all this needs is a file path later on
145
when we're going to actually define the function in in python
146
if we give a python function a path we can use internal python libraries to go into
147
that directory and read the specific file that's why we only need a path name in here
148
so that's tool number one and you can see we simply just create a list and we plug that in here.
149
Now let's look at tool number two.
150
So this one is called list files.
151
So this is going to list all the files and directories in the specified path.
152
So again, the only properties that we need is simply a path as an input.
153
We'll let Python do the heavy lifting later.
154
The LLM just needs to figure out, look, where are we?
155
What's the path?
156
Okay.
157
And then tool number three is edit file.
158
So here we're going to edit a file by replacing the old text with the new text
159
and we also create the file if it doesn't exist
160
so let's look at the input schema that we have over here
161
so beyond just the path we also have the old text
162
and the new text
163
and the idea here simply is we let the ai agent go through a directory
164
we let it read a file now it has the context of those file
165
and together with the instructions that we give it it can take those
166
that old text it can send it to the large language model get the new text back
167
and then we replace it so
168
if we then come back to our terminal over here
169
and we do uv run
170
and then o3 define tools .py you can see agent initialized with three tools
171
because upon initialization it will print this
172
and it will take the length of self .tools list
173
and it will print that out hey now real quick
174
if you're a developer or data professional
175
and you've been thinking about starting as a freelancer to maybe make a little bit more money on the site
176
or to learn or to just work on fun projects
177
but don't really know where to start or not sure how to land
178
that first client you might want to check out the first link in the description
179
we have a global community with hundreds of developers who are
180
all here to make more money work on fun projects
181
and create freedom so if that sounds exciting to you
182
but you're not sure where to start make sure to check out the first link in the description okay
183
so that was file number three
184
so now let's get into file number four where we are going to actually implement the tools.
185
So let me first high level show you what we're going to do in here.
186
We are going to expand on the AI agent class where we already covered the initialization.
187
We have set up our tools.
188
So now we are going to implement the actual
189
Python logic that can execute the tools as well as the functions that we can use within
190
Python to interact with our operating system to actually bring our coding agent to life.
191
So before showing you the full implementation here in the AI agent class,
192
what I'm going to do is I'm going to go over the various functions over here that are in the tools folder,
193
which are, these are isolated instances where we are first going to cover the actual logic,
194
the actual Python logic that you can use to interact with your files.
195
Because you first need to understand this
196
and then the implementation in the agent will simply be putting this into a function with some try
197
and accept and error handling that we will put into the class.
198
So let's start with the read file function over here that we have.
199
So when we have to read file function, we can simply take a path, which can be a string,
200
and we can use with open and then read the file contents that are in there.
201
So as you can see over here, we are currently if we look at the setup we are in the read .py file
202
which is in the tools folder so
203
if we for example wanted to check what's in the main .py folder
204
we could do read file then we go one level up in the directory by using the two dot notation
205
and then we get into main .py so let's run this
206
and see what we have over here so you can see
207
that this now prints out all of the content that is within main .py.
208
So we have now successfully created a read file function that's going to form the foundation of our coding agent
209
because it needs to understand what we're working with, right?
210
It needs to understand the environment.
211
Oh, and I noticed this was still close.
212
So this is the full implementation, right?
213
We open a file and then we read it and then we return it.
214
So let's clear this up and then get into number two, which is list file.
215
So we will loop over all of the files in the directory
216
and here's a python snippet to do that
217
so we will use the os library and we use os .list there
218
and then the path in here and then we sort that
219
and then from here we can add all of those to the item list in here
220
and we append it with whether it's actually a directory
221
or whether it's a file so if we run this from within in this directory
222
so you can see we do the list file
223
and then we just put in a dot for the path
224
which means look this is the current directory that we're in
225
and I run this you can see over here
226
that we have in this particular folder we have edit file list files read files
227
so now let's actually see what if we do it like this
228
and I think I can just use the notation over here yes
229
if I do two dots it signals to python look we're in this folder go one level up
230
and check everything that's in the root of this project
231
so you can see all of the files that are in here
232
so that is the implementation of how you can list files within python okay
233
and then we get to the final function over here
234
that is the edit file and here you can see
235
that we're also using the os library
236
and here not only we're going to like take the file path
237
and we're going to read it but we're actually going to read it
238
and then we're going to take the old tags that we have and we're going to use content .replace.
239
So we're going to use
240
Python's internal replace method to.. take the content and to write it back to that file.
241
If we now come over here to the example and you can see, look, we have edit file.
242
We call it text .txt.
243
We have the old text, which we can simply leave empty because we're going to create a new file and then we have the new text.
244
If I run this, you can see that now over here on the left, we have a test .txt file show up with hello world.
245
But now we can also come back to the edit file.
246
And now let's say, look, we have the old text, which is the following and we want to change
247
that with hello world how are you let's run this
248
and let's look at the file there we go
249
so now you can start to imagine
250
that this is already pretty much what a coded coding agent does right
251
so if you've worked with cursor or copilot or any code
252
that are cloud code this is what we're doing we're going through our files we're reading everything
253
and And we as the developers, we are giving instructions, say, look, I don't want this.
254
I want it to be like that.
255
You should fix this.
256
And then all it does is just go through all of the files.
257
It reads it.
258
It takes the path.
259
It says, look, this is what we need to change.
260
And this is what we need to put in here.
261
So with that explanation and these isolated examples out of the way, we can come back to our tool implementation
262
because now it will make sense because now
263
if I come to the read file
264
you can see it's simply exactly the same as what I just previously showed you
265
but we have some try accept logic on there to make our agent a little bit more robust
266
so that when it gets into an error
267
or it cannot execute it it will throw us an exception
268
and it can course correct from there instead of completely blocking the application.
269
So we have the read file we have the list files in here
270
and we have the edit file in here
271
but that's the only difference from the tool folder that you saw me go through over here.
272
So now with this in place our agent has the tool specification and it has the functions.
273
Now the final piece of the puzzle that we need to implement here is the execution.
274
So all we're doing over here in the execute tool function is we're taking the output from the agent
275
and we're looping through it to check for various conditions
276
so we look look did the agent decide to use the read file function
277
if that is the case go and execute it
278
so this is how we loop through it all right
279
so with all of
280
that logic covered in the fourth file coming all the way down to the main part
281
we're going to execute you can see we take the API key we check
282
if it's there and then we initialize the agent
283
and then we call the agent that lists files
284
and we look in this directory so
285
if I come in here make sure I am in the runbook
286
so make sure you're in the correct folder do uvrun04 you know the deal by now we can run this
287
and beautiful we can see
288
that it lists all of the files within this current directory within the runbook
289
so this agent is now configured with the tools
290
and it can also actually execute them and now please note
291
that we're calling the list files method over here directly
292
so this is not using AI this is not using Entropic
293
this is not an agent just yet we're also not using the execute tool function
294
this is simply testing whether the list files function works directly all right
295
and then it's time to get into script number five adding the chat method
296
so scrolling all the way down to our agent what you'll
297
find is the setup will be the same execution be the same we have all of the functions
298
that we now have but there's a new method we have the chat
299
which takes the user inputs which is a string
300
and through this we're going to create a loop that we can actually use to chat with our agent within the terminal
301
So how this works is we're going to use the Entropic SDK
302
that has our client right now that we can use to send requests back and forth,
303
store our messages, and this is how we manage our conversation.
304
So remember that when we are initializing our agent, we had the messages list, right?
305
Which in the beginning is empty.
306
So now what we do within this chat message, the first thing that we do is we take the user input.
307
So when the user asks a question, we're going to build up that message list.
308
So we're going to take the list, we're going to append and then we use the standard dictionary format that's used by OpenAI and Entropic.
309
We say role user content and then we put in the user question.
310
Now here what we have is we have our tool schema.
311
So now we are going to loop over our tools
312
and we're going to convert it to the exact format that the Entropic Python SDK wants.
313
So we take our tools and we convert it to this specification over here from our Pydantic model.
314
So that's what we're doing.
315
over here.
316
And now we're entering a loop.
317
So this is where the chat components comes in.
318
So first of all, we take the user input and we send it to Claude Sonnet 4 .5.
319
We specify the messages, we specify the tools.
320
This is just one way of sending information to the LLM.
321
Now where it gets more interesting is the whole loop that we created around this.
322
So let's see what we're doing.
323
So first of all, we now create a placeholder for the assistant message.
324
So you can see this is currently still empty the content is not there
325
and now we're going to parse this
326
so we're going to look into the answer from the model
327
and we say look
328
if there is a text in there we want to add it to the assistant message
329
so that's what we want to do so this is
330
when an agent decides to reply just with a text output
331
so no tools were used
332
so for example you could say look agent what can you help me with it will just tell you look
333
i can do this this and that
334
and it won't use any of the tools
335
then we get into the second condition in the elif here we say look
336
if the content type is tool use meaning the agent decided instead of just replying
337
i actually need to do something let's read a file let's list the files let's edit the file
338
we're going to append to the message the content
339
and we use the specification used by entropic as well
340
so this is all standard definitions we do tool use
341
we give it an id we give it a content name
342
and we give it an input
343
if you want to learn more about how to specifically structure
344
this the entropic docs over here will get into all of
345
that how that works
346
but for now just bear with me we need to follow
347
this syntax in order for in order for it to work
348
and then we finally append that to the messages
349
so now this is this is the beginning part of the chat right
350
we make a chat completion we manage the message message history in the state
351
and then we continue so now in here we also capture the results
352
so if there is a tool use in there we also need to execute it right
353
so this comes back to what we just covered the LM decides to use a tool now we execute it
354
and we just saw how that works
355
so we put in a name we put in the input
356
and then also we can append that to the results that's done over here
357
so we add that to the messages as well so
358
that is a chat loop that we have going on
359
and I fully understand that this is a lot
360
and this is really abstract
361
so let's just walk through the example
362
I've added some print statements as well to see behind the scenes what the agent is doing
363
and what steps it is taking so
364
if we get into the main over here you can see
365
that we initialize the agent and now we're going to call the chat function
366
so we ask it a single question what files are in the current directory this is what we're doing
367
so let's open up a terminal and say uv run
368
and then we do 05 and then we complete it
369
and let's run this so now we can see this will listen
370
and say look it's now first it's using the tools list file
371
so it's figured out it needs to do that
372
and then it responds
373
so actually behind the scenes we have two llm calls first
374
it decided i need a tool I need more information
375
and then finally it had all of the it had all of the files
376
and now it can answer but let's look at what happens
377
if we change this to for example say what can you help with
378
so now if I save this and I run this one more time you'll see
379
that it will take a little bit again
380
and now instead of assumingly listing tools what it will do it will come back with an answer directly
381
so here you can see here we directly go into responding
382
so there was no tool use
383
so that's what we're doing over here that's the goal of the parsing
384
that we have over here if it is a text response we simply print it out
385
and we can respond if not
386
if there's a tool in there we need to get
387
we need to be a little bit more clever there add it to the messages
388
and then actually call the results append it back to it
389
and do another run for with the large language model in order to get the final answer back
390
so that is really at the core of what tool uses
391
and functions calling is about so that's how all of these files play together
392
and like i said this can be a little abstract there's a lot of
393
if else going on but go through it a couple of times use the examples
394
and use ai to fill in the gaps where needed so take pieces of the code and like ask ai hey, what is it doing?
395
Why is it doing this?
396
But this is the main agent loop that's powering almost all agentic AI applications nowadays, whether you use Entropic, Google,
397
OpenAI, they all use this principle of function calling and using tools.
398
So that's step number five.
399
Congratulations if you made it up until this point.
400
We're almost there.
401
We almost have completed the full loop.
402
So let's continue and get into number six where we're going to create an interactive CLI
403
so let me scroll up again just to all be on the same page again
404
and see what's added to this file so you can see we've set up logging we've imported another library,
405
the arg parse that we can use to create a CLI tool.
406
So let's see, this is all covered.
407
We got our agent.
408
Again, let me go through this in a similar fashion.
409
So you can see everything that we built upon this point.
410
We have the chat.
411
And let's see now if we get into the main file over here, that's the new part.
412
So let's see.
413
So now instead of simply just running the agent and calling the chat method once directly,
414
what we can now do is we can build a CLI tool around this
415
and this will pretty much go
416
and continue capturing user input until you decide to say exit quit
417
or exit out of that terminal and it will print goodbye
418
so we have the same loop a similar setup for the loop
419
that we have that we saw within our agent
420
but now we do it within our main function
421
and we capture user input so that's how we now create a tool around this
422
and let me show you what this looks like so now
423
if i come in here and we do uv run
424
and we're now in 06 and you'll see it will install this
425
and you can see we now have the ai coding assistant in here
426
so you can see first it prints all of this
427
so this is exactly what we see
428
and now you can say look user input u so now we can say what can you do
429
So let's see what the assistant can do.
430
So it will immediately print out the assistant, but then it needs to wait for the LLM API call.
431
So depending on what model would you use, you can see, look, now we have the output over here.
432
So it can say, look, I'm an AI assistant.
433
This is what I can do.
434
I can do file operations, read files, edit files, list directories, all the stuff that we can do, right?
435
So now if we follow the flow of the application, you can see checks for exit or quit, and then it will break out of this.
436
In this case, it's still in an active loop.
437
So it will simply continue.
438
It will output the assistant response that we see over here.
439
And now it will simply loop back because we have the while true.
440
So now we're ready to list all files in this there, for example.
441
And we let the agent go at it.
442
It will decide to use the tool.
443
It will come back to us, send it one more time.
444
And here you can see we have the overview.
445
So that's how you can create a simple CLI tool around your coding assistant, similar to how you work with, for example, Cloud Code.
446
And with this understanding, now let's get into number seven.
447
And that's very simple.
448
We add a personality.
449
So now if I scroll down, we can go to our setup and let's see over here where we specify our agent.
450
We now also have a system prompt.
451
So now we say it look you operate within a terminal environment
452
and you output only with plain markdown so no formatting
453
so before you saw all of the asterisks right
454
and it was a little bit hard to read
455
so this is the only thing that we add to it
456
and here you can go crazy right
457
so whatever agent you're building this is the place where you instruct what you need to do
458
and as a little side track I want to quickly show you this github repository
459
so system prompts and models of AI tools.
460
So this is super interesting to check out.
461
So for example, we can go into the cursor prompts and you can see, let's see, let's take 1 .2 over here, the agent prompt.
462
So here you can see that this is the entire prompt
463
that cursor is using behind the scenes to instruct how the agent works.
464
So you can see this is very extensive.
465
It's a lot of information in here.
466
So that's what you would put over here.
467
So this is very simple.
468
We only have three tools.
469
Of course, we're not building cursor here
470
but we're building a very minimal setup this is where cursor this is where clawed code starts
471
and you can add more
472
and more functionality to this really the sky's the limit here that's the cool part about this
473
so now if we come in here
474
and we scroll all the way down you see the exact same setup
475
so again let's open up the terminal let's do uv run this is the final 0107 will run this
476
and now you can see if I ask like what can you do you will see
477
that now it understands look I'm a terminal assistant
478
so I need to output in a way that's readable within the terminal
479
so here you can see it still did a little bit of the asterisk
480
but okay it's a little bit more readable
481
so let's see let's actually start and tweak this so if we go to the system
482
prompt and we add don't use any asterisk characters in your response
483
and then let's see we quit out of this
484
so this is also how you debug your agent right
485
and how you start to tweak it
486
so let's do it one more time what can you do
487
and now I want a clean output so let's see
488
if it listens let's see if it's working okay that's already better
489
so now you can see it's not using the markdown formatting
490
and we can actually read this
491
so now coming back what files are in this there
492
and also just love how you can just like make all
493
the typos to ai just looks at the tokens doesn't matter it will understand it
494
so let's give it a second
495
and then oh beautiful look now we can actually read this from our terminal in a way
496
that it makes sense and if we then finally come back to our main .py file
497
and just do a uv run main and run this over here
498
and say what can you do the only difference
499
that we have over here is
500
that we have now enabled the logging to keep track of everything for us
501
so we can come in here it will give an output
502
and now we can look into the agent log
503
and say what can it do and we can say list files
504
and now you can see the output from the agent as well
505
so we can just keep track of everything
506
and now it's actually time to put our agent to the test right
507
so let's start here can you create a short test .py file to showcase you can actually create files
508
so let's run this and see what it comes up with
509
so there we go we have a test .py file with a function in here
510
so there we go and now we can say can you add another function to this
511
so let's run this so we have to greet
512
and the main in here
513
so let's see oh we have to calculate square
514
this is awesome right how this is just magically appearing over here
515
so it's actually expanding on first of all the the square in here
516
and then adding more functionality to the main as well.
517
There we go.
518
And now finally, let's ask it to empty the file.
519
And there we go.
520
Completely got rid of everything.
521
All right.
522
And that's how you build an AI coding agent from scratch in a little over 200 lines of Python.
523
So if you found this video helpful, please leave a like and also consider subscribing.
524
And then next, I recommend to check out this video because now you understand the basics of what makes up an agent.
525
This video will teach you how to build reliable and effective agents.
526
So make sure to check that out right now.

Download App

Everything you need to speak fluently

AI PronunciationScore every sentence
IPA PracticeMaster every sound
VocabularyBuild your word bank
Vocab GameLearn while playing

Same Channel

FOR YOU

Recommend Video

Vocabulary and speaking notes for this lesson

This speaking lesson is built on the video “How AI Agents Actually Work”. The speaker keeps coming back to these words: file, tool, agent, function. This video has 526 sentences and 6341 words to shadow. The speech runs for 31:41. The speaker talks fast, about 200 words per minute, so expect linked and reduced sounds. 88% of the words are among the 3,000 most common in English, so the vocabulary is easy to follow.

Key vocabulary in this video

15 words from the video worth learning, with pronunciation and meaning:

WordPronunciationMeaning
directory noun/dɪˈɹɛktəɹi/A list of names, addresses etc, of specific classes of people or organizations, often in alphabetical order or in some classification.
loop noun/luːp/A length of thread, line or rope that is doubled over to make an opening.
input noun/ˈɪnpʊt/The act or process of putting in; infusion.
terminal noun/ˈtɚmɪnəl/A building in an airport where passengers transfer from ground transportation to the facilities that allow them to board airplanes.
edit verb/ˈɛdɪt/To change a text, or a document.
execute verb/ˈɛksɪˌkjuːt/To kill, especially as punishment for a capital crime.
folder noun/ˈfoʊldɚ/An organizer that papers are kept in, usually with an index tab, to be stored as a single unit in a filing cabinet.
output noun/ˈaʊtpʊt/Production; quantity produced, created, or completed.
script noun/skɹɪpt/A writing; a written document.
setup noun/ˈsɛtʌp/Equipment designed for a particular purpose; an apparatus.
specify verb/ˈspɛs.əˌfaɪ/To state explicitly, or in detail, or as a condition.
specification nounAn explicit set of requirements to be satisfied by a material, product, or service.
prompt verb/pɹɑmpt/To lead (someone) toward what they should say or do.
implementation noun/ˌɪmplɪmənˈteɪʃən/The process of moving an idea from concept to reality. In business, engineering and other fields, implementation refers to the building process rather than the…
format noun/ˈfɔːɹ.mæt/The layout of a publication or document.

Phrasal verbs you will hear

WordPronunciationMeaning
go through verbTo travel from one end of something to the other.
see over verbTo inspect something fully.
set up verb/ˌsɛt ˈʌp/To make ready for use.
check out verbTo record the departure or withdrawal of someone or something (such as guests, employees, books, etc.).
have over verbTo host (a visiting guest) at one's house.
open up verbTo open.
do over verb/ˈduˌoʊvɚ/To cover with; to smear or spread on to.
figure out verbTo come to understand; to discover or find a solution; to deduce.

Grammar in this video

The structures the speaker uses most, with the exact words from the video:

StructureIn the video
Present perfect have/has + past participle — a past action that still matters nowI've added · has played · I've shown
Relative clauses who / which + clause — extra information about a person or thingfile, which is · client, which is · messages, which is
Passive voice be + past participle — the focus is on what happens, not who does itwas released · is listed · is called

Pronunciation to watch

The speaker uses 97 contractions and reduced forms, such as we're, I'm, you're. Say them the short way, as you hear them.

  • The “sh” and “zh” sounds: implementation /ˌɪmplɪmənˈteɪʃən/, capture /ˈkæp.(t)ʃɚ/, instruction /ɪnˈstɹʌkʃən/, execution /ˌɛk.sɪˈkjuː.ʃən/, dictionary /ˈdɪk.ʃəˌnɛ.ɹi/
  • Long words — get the stress right: directory /dɪˈɹɛktəɹi/, implementation /ˌɪmplɪmənˈteɪʃən/, developer /dɪˈvɛləpɚ/, execution /ˌɛk.sɪˈkjuː.ʃən/, dictionary /ˈdɪk.ʃəˌnɛ.ɹi/

How to practise with this video

  1. Listen to the whole video once without speaking and note the words you do not know.
  2. Start at 0.75× speed, shadow it sentence by sentence, then go back to normal speed once it feels easy.
  3. Record yourself and compare with the original, paying attention to words like directory, loop, input.

What is the Shadowing Technique?

Shadowing is a science-backed language learning technique originally developed for professional interpreter training and popularized by polyglot Dr. Alexander Arguelles. The method is simple but powerful: you listen to native English audio and immediately repeat it out loud — like a shadow following the speaker with just a 1–2 second delay. Unlike passive listening or grammar drills, shadowing forces your brain and mouth muscles to simultaneously process and reproduce real speech patterns. Research shows it significantly improves pronunciation accuracy, intonation, rhythm, connected speech, listening comprehension, and speaking fluency — making it one of the most effective methods for IELTS Speaking preparation and real-world English communication.

Shadowing technique: read the full step-by-step guide →